Branko Badrljica wrote:
Jason wrote:
initrd is exactly how you do it. In the case of booting off of USB, there are too many variables (drive detection order, different hardware, etc) to handle on the kernel command line. An initrd gives you the flexibility to solve these problems.

You could use initrd/initramfs, but seems like a lot of complications for little gain...

I wouldn't call a portable, writable, boot from anywhere Linux OS on a thumbdrive a trivial gain. ;-)

But y<ou have the headache of interface at the old and new root across the pivot root. What happens if you execute something that was dynamically linked from intramfs and it decides to load and link another module with dlopen() from new root ? If you have that module and it belongs to the same version, then probably everything is fine. Otherwise it might not be.

1.) a good initrd will use only statically linked executables.
2.) you shouldn't start any servers or background processes from initrd.
3.) initrd's are tied to kernels. Every distro's initrd generator is re-run upon upgrading the kernel. The modules versions won't be out of sync then. Gentoo has genkernel for this purpose.

Also, opened files and extra nodes in /dev during intiramfs phase tend to cause a headache or two...

If your initrd follows the 3 suggestions, above, there won't be any processes running to hold a file or device open. Unless you had something else in mind?

Jason.
--
gentoo-amd64@lists.gentoo.org mailing list

Reply via email to