Newer Kernels and the Need for Initrd
I'm sure this has been discussed time and again, but a search is not getting me any definitive answers to my question.
I've always booted Slackware with an initrd until recently. With my new installation of Slack Current (13.37), I didn't bother to create an initrd because of the constantly updating/transient nature of the current branch at the moment. My question is this: when 13.37 does go final in a few days, should I go back to my normal practice of booting with an initrd? Also, I think I understand how the initial ramdisk works, but is it really needed with the more modern kernels? Thanks in advance... ~Eric |
Slackware (32-Bit) comes with 4 kernels:
kernel-huge kernel-huge-smp (supports multi cpu) kernel-generic kernel-generic-smp (supports multi cpu) Slackware64 comes with 2: kernel-huge kernel-generic (Note: these are both 'smp' kernels even though they don't have 'smp' in the name) Slackware's 'huge' kernels don't require an initrd, but they aren't recommended for daily use. It is recommended to switch to one of the 'generic' kernels, which do require an initrd, after installing/booting Slackware for the first time. |
One other note /boot/vmlinuz usually linked to the huge kernel
|
Initrd is needed when you build things that are necessary to boot as modules, and thus are stored separately from the kernel on the HDD. For example filesystem support. The bootloader knows where the kernel is on the disk, and so can load it without needing anything. However, it doesn't know where the modules are and cannot access them without some modules, like filesystem support, IDE or SATA support, etc (catch22). So, you just make an initrd, which is an image containing these modules that is loaded with the kernel into RAM. piratesmack is correct, in that the huge kernels have everything built-in and thus don't need an initrd. However, if you make a custom kernel, like I do, I build in the things that are needed and leave the rest as modules, which is obviously the best thing to do. No bloated kernel, no initrd.
|
Even with everything built into the kernel, an initrd is still needed for things like / on LVM, luks, or RAID.
|
For those who (for religious reasons) can not use initrd, they still can use a ROOTFS embedded in the kernel, an initrd which is included in bzImage, at build time.
After all, all options can be set in the initrd command line ... ;) |
Might want to give /boot/README.initrd a look-see. Should answer a lot of your questions definitively on when you need to make an initial ramdisk...
|
Quote:
Those links are created by whichever kernel package was last installed. |
Quote:
Code:
mkinitrd -c -k 2.6.38.2-server -m ext4 -f ext4 -r /dev/sda1 Code:
mkinitrd -c -k 2.6.38.2 -m ext4 -f ext4 -r /dev/sda1 |
Use '2.6.38.2-server'
The same name as the /lib/modules/<kernel version> folder But if you build ext4 support into your custom kernel by setting 'CONFIG_EXT4_FS=y' (not 'm'), then you don't even need an initrd (unless you use LVM, LUKS, or RAID like said above) |
Quote:
|
If you use the /etc/mkinitrd.conf file. It's easy to create a new one by changing the kernel version in the file then running
mkinitrd -F Set it up once with all your modules and partitions then you don't have to remember all the command line switches. |
For me, there are good reasons to use an initrd instead of using the huge kernel. I don't always run Slackware on "modern" hardware but I still want to be able to run a "modern" kernel.
|
Thanks all. Thanks very much. Those were some great answers. I'll probably go back to booting with the initrd after reading all these replies. I appreciate the time y'all took to answer my queries. :)
Regards, ~Eric |
Just a quick update... I'm back to booting with the initrd on all my systems. :)
|
All times are GMT -5. The time now is 09:29 AM. |