Re: [RFC PATCH] Move actually mounting the root filesystem into its own series of hooks.

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

 



Hi Victor,

I didn't test this patch yet, but I need this kind of structure in order to implement different kinds of netboot.

root=dhcp is a kernel cmdline given by the bootloader (syslinux, grub, pxelinux, etc.) which directs the initrd during runtime to bring up eth0 and do DHCP. It then mounts the rootfs depending on options given by the DHCP server. Fedora 10 mkinitrd implements the following two types of mounts with root=dhcp.

        option root-path "172.31.100.254:/path/to/target_root";
        option root-path "nbd:172.31.100.254:2000:squashfs:ro";

An existing RFC specifies syntax for iscsi that could be implemented as well. (Although iscsi is problematic because some types require authentication.) Arbitrary types of root=dhcp rootfs mounts can be implemented with hooks made possible with your patch.

Generation
==========
∘ read mode from dracut.conf i.e. MODE=network
∘ if network
	‣ install network modules
	‣ install tools (mount.nfs, nbd, etc.)
	‣ install squashfs.ko
	‣ install custom udev rules to handle network

Boot (contents of udev rule)
============================
∘ if root=dhcp (or later hard coded network)
	‣ ifup eth0
	‣ dhclient
	‣ parse root-path
	‣ if nbd
		• modprobe nbd
		• nbd-client with parameters
		• (mount rootfs)
	‣ if nfs
		• (mount rootfs)

Warren Togami
wtogami@xxxxxxxxxx
--
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