It looks like there are good reasons to install a default kernel as part of the installation process. I'll attach a few data points from -dev.
From: Yannick Koehler <yannick.koehler@colubris.com> Subject: [gentoo-dev] Gentoo Kernel Installation Doc To: gentoo-dev@gentoo.org Date: Fri Jan 10 10:04:19 2003 -0500 I think it would be nice that I could take the kernel from the LiveCD and installed it as is (including moduels) over my new installation PC instead of building a new one. For sure I would like to do that past the first reboot but I often got problems where I forgot some required kernel option rebooting into a "Missing console" kernel critical stop or into a "Missing DevFS" state. Then I have to reboot from the CD, remount everything as it was, chroot and recompile ... It would be really great that the installation start by having you install the LiveCD kernel with the module get this to be the default kernel for your installation then once rebooted to that new kernel from the hard disk you could then start installing/playing with a new version of the kernel. At least at that point if the new kernel failed, a simple reboot with the selection through grub/lilo to pick the previous working kernel would be enough to get you back inside a working state to debug your kernel. That installation could also be simplified by creating an ebuild such as livecd-kernel and having the admin type emerge livecd-kernel to do that step for him. This would also make it easier for an installation software to get that step automatically done.
From: Alain <alain@rexorient.com> Subject: Re: [gentoo-dev] Gentoo Kernel Installation Doc To: Yannick Koehler <yannick.koehler@colubris.com> Cc: gentoo-dev@gentoo.org Date: Fri Jan 10 10:47:29 2003 -0500 I tend to agree with this, as it would also eliminate a problem I ran into (which I'm assuming will get fixed for the final 1.4 release): The 1.4 RC2 CD boots with a 2.4.20 kernel, which happens to recognize and support the nVidia ethernet port on my Asus A7N8X motherboard (later version of the 2.4.20 kernel also recognize the 3COM ethernet port, but alas.. I need only one port to get gentoo going). After the gentoo install was completed and I rebooted, I ended up with a 2.4.19 kernel, which doesn't support either of the ethernet ports without being patched. Once a new kernel is compiled, the install kernel could be added as a "fail-safe" backup kernel to the boot menu.
Arcady -- I'm ok with this but someone has to figure out to do this. The LiveCD kernel is initrd-based, while the default install uses a standard boot-loaded kernel. It is not trivial to figure out which of the auto-detected SCSI modules need to get compiled into the kernel, or for arranging a default initrd to load them as modules.. I'm assigning this to you so that you can work on it.
I cannot commit any time to this project. Perhaps someone else is willing to pick this up. Punting to bug-wranglers.
genkernel addresses this issue, but we may have a direct-from-LiveCD approach being worked on by pvdabeel, so assigning to him.
not really, no. I think genkernel would be our best guess, since we're going to use that in combination with catalyst. Reassinging to brad_mssw.
well, genkernel's concept is to provide a default kernel config for each architecture and each major kernel release (2.4/2.6). Something that is well tested by the arch maintainers, and is probably an identical kernel config to that which should be used on the livecds, as I see no reason for it not to be. The docs should only need to say which kernel they should emerge then run genkernel on. I'll be posting a genkernel-3.0.ebuild fairly soon for people to start testing, which is a complete rewrite over previous versions. Also, the new linuxrc initrd scripts we're providing will allow you to actually either boot it as a livecd kernel (e.g. passing cdroot=1 as a kernel option), or as a live system kernel (e.g. passing real_root=/dev/hda3 or whatever as a kernel option), so the concept of using the exact compile that exists on the livecd _would_ be possible. It would simply be a matter of copying the kernel itself, the initrd image, and the /lib/modules/* over to the proper places. Though obviously since livecd stuff is heavily module based, you'd need to make sure you had hotplug/kudzu or something running in order for it to configure the proper devices upon bootup (like network), unless you want to guide the users through modules.autoload.d . -Brad
*** Bug 41538 has been marked as a duplicate of this bug. ***
Merging in bug #41538: * * * ------- Additional Comment #4 From Brad House 2004-02-14 19:59 PST ------- to use the kernel off the livecd, you MUST be using the 2004.0 beta/rc livecds, previous release WILL NOT work. Then from _outside_ the chroot, but with the root and boot mounted, you'd need to do this : cp /mnt/cdrom/isolinux/${KN} /mnt/cdrom/isolinux/${KN}.igz /mnt/gentoo/boot mkdir -p /mnt/gentoo/lib/modules cp -Rp /lib/modules/`uname -r` /mnt/gentoo/lib/modules ${KN} is the kernel name, usually something like 'gentoo' or 'smp' Then you need to edit your boot loader config as in the gentoo handbook. Now at this point, this may or may not work depending on your IDE/SCSI controller and the config that was used. You may need to add 'doscsi' to your kernel line in your bootloader if you use sata or SCSI drives to boot. You also need to make sure you've got 'hotplug' emerged, and you rc-update add hotplug default in the chroot. In the future, we'll have a minihotplug in the initrd so you don't have to pass a 'doscsi' or likewise. We'll also have binary kernel packages that you can just 'emerge', and we'll definately include the package of the kernel used on the livecd. * * * So that just leaves us with documenting this procedure and informing users that all they need to do is to ensure that they have something like kudzu/discover at bootup; or tell them to merge in ``lsmod'' into /etc/modules.autoload.d: $> cat /proc/modules | cut -d\ -f1 >> \ /etc/modules.autoload.d/kernel-`uname -r | cut -d. -f-2` ...should do the trick from within the chroot.
Hrm, I don't see how this is a genkernel bug since genkernel is merely an application for building a kernel. Reassigning to livecd - if this bug does not belong to you, then please send it to the wranglers. Thanks!
This looks like a documentation issue, as Brad said, everything is already in place for this to be possible. Personally, I think it isn't really a good idea and wouldn't impliment it myself, but I'll leave that up to the handbook guys.
I haven't added it to the Gentoo Handbook but to the Gentoo Installation Tips 'n Tricks document.
Moving these so we can remove the "Install CD" component from "Gentoo Linux". I apologize to everyone for this spam, but according to the bugzilla developers, this is the only reasonable way to do this.