I am trying to boot Linux (Ubuntu 12.10) without an
initrd image. There are various sources online, but I'm not able to find anything that is detailed. There are many pointers as to how to achieve this. So I tried to do this myself, and obviously ran into problems.
The general idea is:
- Configure and re-build the kernel, to disable
RAM disksupport (I did this to optimize for size, maybe optional)
- Also make sure to make all drivers available
- Configure GRUB to not load an
- The root filesystem should be sufficiently modified to be able to boot easily (which I have no clue how)
initrd is used to solve the chicke-egg problem. There are drivers necessarily be loaded to load the kernel.
I have done the following on my system.
RAM filesystem and RAM disk support
I disabled this, which can be found in
General Support in the
make menuconfig option menu
![RAM filesystem and RAM disk support]
RAM block device
I disabled the
RAM block device support
![RAM block device support]
GRUB boot screen, I hit
e and and edited the command line, and removed the line
The final result was a kernel that hung during:
Loading initial ramdisk...
Although, I removed
ramdisk support from the kernel I built, the kernel doesn't seem to load. I'm obviously missing something. Do I need to modify
init scripts in the kernel I built, to make the bootloader not load the
initrd image. This would mean I use the busybox init scripts.
I analyzed the grub script that loads the kernel, It does a few module insertions, like
insmod part_dos insmod ext2
Will it be possible for me to insert a few kernel modules that is required to boot the kernel and boot the kernel with
And further the boot time that is reduced when
initrd isn't used, should be great. So do systems with single digit boot-time have
PS: To anyone wondering why I want to disable initrd in the first place, I am doing this as a good learning experience. Thank you.