systemimager-dracut: devel help needed (root= known only in initqueue)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for initial long post, but this is worth reading :)


Hi,

I'm main active developper for systemimager (http://www.systemimager.org), a software that automates image deployments on cluster nodes that was initially developped by Brian Elliott Finley.
The imager consist of an initramf that initialise the disk, download the image and runs post installs.
The historic initramfs was build from scratch including kernel and was extremely hard to maintain.

I rewrote the whole stuff using dracut which is the perfect tool for that.
(https://github.com/finley/SystemImager/tree/initrd-from-imageserver-and-dont-package-initrd)

For that I wrote a somewhat complex (but easy to maintain) dracut module:
https://github.com/finley/SystemImager/tree/initrd-from-imageserver-and-dont-package-initrd/lib/dracut/modules.d/51systemimager

This works perfectly, but I want to go BEYOND a reboot after imaging.
I want, after imaging, to finish booting as normal boot (imaging is finnished in initqueue hook) if imager kernel has matching modules in imaged system.

My PROBLEM IS:
/sysroot is not automatically mounted and I'm trying to have it mounted without doing ugly hacks.

How I proceed: (CentOS7, fedora-27, Open SuSE 42.3 (and in another form CentOS-6))
1/ in cmdline, I set root='UNSET' and rootok=1
 => It ends in /dracut-state.sh and cmdline hook is happy

2/ in initqueue/online, I retrieve disk layout, image name, ... and using that I initialise the disk(s), raid if any, lvm if any and I install the image, configure bootloader, and runs some chrooted postinstall

3/ in initqueue/online (at the end, I umount all filesystems) and update /dracut-state.sh with root=block:/the/correct/root/device
=> is overridden with "none" between initqueue and pre-mount hooks ???? WHY? WHERE? 
=> So I save it in /etc/cmdline.d/systemimager-rootfs.conf (rootfs-generator ignores /dracut-state.sh and uses getarg)

4/ in initqueue/finished (/sysroot is empty), I run systemctl daemon-reload to triggger dracut-rootfs-generator.
=> devexists-\x2fdev\x2fsystemvg\x2frootlv.sh is generated correctly
BUT, sysroot.mount is not generated anywhere (neither in /etc/systemd/system, nor in /lib/systemd/system)

QUESTION 1: what am I missing to have sysroot.mount be created AND mounted.
QUESTION 2: why /dracut-state.sh is overwritten between initqueue/finished and pre-mount hooks and why is it not used by dracut-rootfs-generator?
QUESTION 3: On CentOS-6 I use /tmp/root.info, how to I get the rootfs mounted without systemd? should I only settle udev?

Many thanks for any tips.

-- 
   Olivier LAHAYE
   CEA DRT/LIST/DIR







--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux