Skip to main content
Topic: want to write a VM buildimg that acts like buildiso (Read 118 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

want to write a VM buildimg that acts like buildiso

Looking to create custom Artix based VM boot images with a mechanism like buildiso where packages can be hand picked.  QEMU being used to test these for now but cloud-hypervisor is the ultimate target (so no virtsh/libvirt).  The ISO images from buildiso have multiple rootfs overlays that are quite the pain to figure out, I'd very much like to mount a single disk image (with or without partitions) with a straight up writable ext4 or squashfs for root.

The boot log from my present state of progress ends with:
Code: [Select]
...
:: running hook [artix]
:: running hook [artix_loop_mnt]
:: running hook [keymap]
:: Loading keymap...kbd_mode: KDSKBMODE: Inappropriate ioctl for device
@done.
:: Mounting '/dev/disk/by-label/ROOT_PT' to '/run/artix/bootmnt'
[    1.525895] EXT4-fs (vda2): INFO: recovery required on readonly filesystem
[    1.527218] EXT4-fs (vda2): write access will be enabled during recovery
[    1.590417] EXT4-fs (vda2): orphan cleanup on readonly fs
[    1.591371] EXT4-fs (vda2): recovery complete
[    1.595175] EXT4-fs (vda2): mounted filesystem f8f4300c-1a80-4ca7-8e5f-1acd6c1dd243 ro with ordered data mode. Quota mode: n.
:: Device '/dev/disk/by-label/ROOT_PT' mounted successfully.
:: Mounting /run/artix/cowspace (tmpfs) filesystem, size=256M...
:: Mounting overlay root (tmpfs) filesystem, size=75%...[    1.617058] overlayfs: missing 'lowerdir'
mount: /new_root: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
:: running cleanup hook [artix_shutdown]
:: running cleanup hook [udev]
ERROR: Failed to mount the real root device.

using a kernel command line of:

Code: [Select]
edd=off locale=en_US keymap=us trace_clock=local amd_pstate=disable loglevel=9 console=ttyS0,115200n8 earlyprintk=serial root=UUID=f8f4300c-1a80-4ca7-8e5f-1acd6c1dd243 label=ROOT_PT

I can set label=BOOT_PT as clearly /run/artix/bootmnt is the wrong place for a rootfs, but there is nothing useful in the BOOT_PT partition and then the rootfs mount fails the same way as above.

Anyway, the artix packages artools and iso-profiles got me this far, but I've been hoping a vm-profiles or cloud-profiles would be lurking somewhere?

Fastest path now would be to tweak the running hook scripts, which are found in (one of ?) the /hooks root directories, but I've not been able to find the artix package that buildiso is using to provide these.

As this is a clearly a feature ask, I'm not expecting support, but I'd appreciate it if anyone has a pointer or idea ...

 

Re: want to write a VM buildimg that acts like buildiso

Reply #1
Unfortunately, buildiso is specifically developed to create both live and root overlays. As it is, one needs at least a bootable live overlay to get any type of working environment, but I haven't tested a completely root-less overlay ISO (base profiles are live-less).

In theory, you can take any profile, remove it's live-overlay and populate root-overlay with whatever you like. Whatever resides in live-overlay is only present when live-booting, in our case the calamares installer and its deps.