Skip to content

Fix: no tag for the builder image on linux.#73

Merged
iMilnb merged 1 commit into
NetBSDfr:mainfrom
ylecuyer:fix-builder-linux-yle
Mar 17, 2026
Merged

Fix: no tag for the builder image on linux.#73
iMilnb merged 1 commit into
NetBSDfr:mainfrom
ylecuyer:fix-builder-linux-yle

Conversation

@ylecuyer
Copy link
Copy Markdown
Contributor

On NetBSD it fetches directly the image from https://github.com/NetBSDfr/smolBSD/releases/download/latest/build-amd64.img.xz

but on linux it builds it

Atm it builds it with the :latest tag and later on it fails to start qemu

ylecuyer@hawk:~/Projects/smolBSD$ ./smoler.sh build dockerfiles/Dockerfile.basic 
ℹ️ basic already exists, recreating
✅ basic service files generated
➡️ press enter to build basic image or ^C to exit
✅ netbsd-SMOL is fresh
✅ netbsd-SMOL sha256 checks out
✅ base.tar.xz is fresh
✅ etc.tar.xz is fresh
✅ pkgin is fresh
✅ pkg_tarup is fresh
✅ pkg_install is fresh
✅ sqlite3 is fresh
➡️ building the builder image
🔲 destination architecture: amd64 / x86_64
✅ netbsd-SMOL is fresh
✅ netbsd-SMOL sha256 checks out
✅ base.tar.xz is fresh
✅ etc.tar.xz is fresh
✅ pkgin is fresh
✅ pkg_tarup is fresh
✅ pkg_install is fresh
✅ sqlite3 is fresh
➡️ creating root filesystem (512M)
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 0.202418 s, 2.7 GB/s
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
mke2fs 1.47.2 (1-Jan-2025)
Discarding device blocks: done                            
Creating filesystem with 523264 1k blocks and 130560 inodes
Filesystem UUID: 9784c388-1108-4455-9f25-f48f0106fe02
Superblock backups stored on blocks: 
        8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, 81921, 
        90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457, 155649, 
        163841, 172033, 180225, 188417, 196609, 204801, 212993, 221185, 229377, 
        237569, 245761, 253953, 262145, 270337, 278529, 286721, 294913, 303105, 
        311297, 319489, 327681, 335873, 344065, 352257, 360449, 368641, 376833, 
        385025, 393217, 401409, 409601, 417793, 425985, 434177, 442369, 450561, 
        458753, 466945, 475137, 483329, 491521, 499713, 507905, 516097

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 

extracting pkgs/amd64/pkgin.tgz to /usr/pkg.. done
extracting pkgs/amd64/pkg_tarup.tgz to /usr/pkg.. done
extracting pkgs/amd64/pkg_install.tgz to /usr/pkg.. done
extracting pkgs/amd64/sqlite3.tgz to /usr/pkg.. done
extracting sets/amd64/base.tar.xz.. done
extracting sets/amd64/etc.tar.xz.. done
executing ../service/build/postinst/prepare.sh
🧊 system root filesystem will be read-only
✅ image ready: images/build-amd64:latest.img
➡️ creating the disk image
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 0.199579 s, 2.7 GB/s
➡️ starting the builder microvm with
  ⚪ 1024MB RAM
  ⚪ 2 cores
➡️ port forward set: ::22022-:22
➡️ using QEMU version 10.0.8 (Debian 1:10.0.8+ds-0+deb13u1+b1)
➡️ using kernel kernels/netbsd-SMOL
➡️ using console: viocon
➡️ using disk image images/build-amd64.img
🔚 ^D to stop the vm, ^A-X to kill it
qemu-system-x86_64: -drive if=none,file=images/build-amd64.img,format=raw,id=hd-y741k3Hh0: Could not open 'images/build-amd64.img': No such file or directory

I removed the :latest tag and now it works as expected

ylecuyer@hawk:~/Projects/smolBSD$ ./smoler.sh build dockerfiles/Dockerfile.basic 
ℹ️ basic already exists, recreating
✅ basic service files generated
➡️ press enter to build basic image or ^C to exit
✅ netbsd-SMOL is fresh
✅ netbsd-SMOL sha256 checks out
✅ base.tar.xz is fresh
✅ etc.tar.xz is fresh
✅ pkgin is fresh
✅ pkg_tarup is fresh
✅ pkg_install is fresh
✅ sqlite3 is fresh
➡️ building the builder image
🔲 destination architecture: amd64 / x86_64
✅ netbsd-SMOL is fresh
✅ netbsd-SMOL sha256 checks out
✅ base.tar.xz is fresh
✅ etc.tar.xz is fresh
✅ pkgin is fresh
✅ pkg_tarup is fresh
✅ pkg_install is fresh
✅ sqlite3 is fresh
➡️ creating root filesystem (512M)
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 0.143354 s, 3.7 GB/s
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
mke2fs 1.47.2 (1-Jan-2025)
Discarding device blocks: done                            
Creating filesystem with 523264 1k blocks and 130560 inodes
Filesystem UUID: f504ec68-834d-4ebf-8572-36efe6165e33
Superblock backups stored on blocks: 
        8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, 81921, 
        90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457, 155649, 
        163841, 172033, 180225, 188417, 196609, 204801, 212993, 221185, 229377, 
        237569, 245761, 253953, 262145, 270337, 278529, 286721, 294913, 303105, 
        311297, 319489, 327681, 335873, 344065, 352257, 360449, 368641, 376833, 
        385025, 393217, 401409, 409601, 417793, 425985, 434177, 442369, 450561, 
        458753, 466945, 475137, 483329, 491521, 499713, 507905, 516097

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 

extracting pkgs/amd64/pkgin.tgz to /usr/pkg.. done
extracting pkgs/amd64/pkg_tarup.tgz to /usr/pkg.. done
extracting pkgs/amd64/pkg_install.tgz to /usr/pkg.. done
extracting pkgs/amd64/sqlite3.tgz to /usr/pkg.. done
extracting sets/amd64/base.tar.xz.. done
extracting sets/amd64/etc.tar.xz.. done
executing ../service/build/postinst/prepare.sh
🧊 system root filesystem will be read-only
✅ image ready: images/build-amd64.img
➡️ creating the disk image
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 0.202557 s, 2.7 GB/s
➡️ starting the builder microvm with
  ⚪ 1024MB RAM
  ⚪ 2 cores
➡️ port forward set: ::22022-:22
➡️ using QEMU version 10.0.8 (Debian 1:10.0.8+ds-0+deb13u1+b1)
➡️ using kernel kernels/netbsd-SMOL
➡️ using console: viocon
➡️ using disk image images/build-amd64.img
🔚 ^D to stop the vm, ^A-X to kill it
[   1.0000000] smolBSD 11.0_BETA (SMOL)        Notice: this software is protected by copyright
[   1.0000000] Detecting hardware... (QBOOT    000000000000)
[   1.0398472]  done.
[   1.0478444] kernel boot time: 81ms
Created tmpfs /dev (1835008 byte, 3552 inodes)
add net default: gateway 10.0.2.2
/dev/dk0 on / type ext2fs (read-only, local)
Starting local daemons:.
➡️ host filesystem mounted on /mnt
kern.maxfiles: 548 -> 20000
➡️ building basic image
ℹ️ exported variables
⚪ SERVICE="basic"
⚪ ARCH="amd64"
⚪ PKGVERS="11.0"
⚪ MOUNTRO=
⚪ BIOSBOOT=
⚪ PKGSITE="https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/11.0/All"
⚪ ADDPKGS="pkgin pkg_tarup pkg_install sqlite3"
⚪ MINIMIZE="y"
⚪ BIOSCONSOLE="com0"
⚪ FROMIMG=
⚪ IMGTAG=:latest
🔲 destination architecture: amd64 / x86_64
➡️ creating root filesystem (512M)
/dev/rld0: Partition 1 added: 49f48d5a-b10e-11dc-b99b-0019d1879648 1024 1046528
/dev/rld0: Partition 1 attributes updated
newfs: Warning: changing optimization to space because minfree is less than 5%
/dev/rdk1: 511.0MB (1046528 sectors) block size 8192, fragment size 1024
        using 12 cylinder groups of 42.59MB, 5451 blks, 10624 inodes.
super-block backups (for fsck_ffs -b #) at:
32, 87248, 174464, 261680, 348896, 436112, 523328, 610544, 697760, 784976,
...............................................................................
extracting pkgs/amd64/pkgin.tgz to /usr/pkg.. done
extracting pkgs/amd64/pkg_tarup.tgz to /usr/pkg.. done
extracting pkgs/amd64/pkg_install.tgz to /usr/pkg.. done
extracting pkgs/amd64/sqlite3.tgz to /usr/pkg.. done
extracting sets/amd64/base.tar.xz.. done
extracting sets/amd64/etc.tar.xz.. done
executing ../service/basic/postinst/postinst-0.sh
executing ../service/basic/postinst/postinst-1.sh
➡️ resizing image to 278MB
✅ image ready: images/basic-amd64:latest.img
✅ build finished, Ctrl-A X to exit
➡️ killing the builder microvm
qemu-system-x86_64: terminating on signal 15 from pid 46100 ()
WARNING: Image format was not specified for 'images/basic-amd64:latest.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Image resized.

@iMilnb
Copy link
Copy Markdown
Contributor

iMilnb commented Mar 17, 2026

Nice catch!

@iMilnb iMilnb merged commit 62de246 into NetBSDfr:main Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants