Operating Systems > Linux and UNIX
kernel + init
KernelPanic:
I just compiled a new (well only 2.4.18) kernel and it seem to be booting fine until it cant find init. It suggested to pass init= to the kernel. So I added init=/sbin/init to my grub file but I had the same problem again.
I think I have done the init= bit wrong.
using RH8.0
voidmain:
Actually you shouldn't need the "init=" line. What you most likely have wrong is you don't have the boot (/boot) or root (/) partitions right. On my setup I have this:
--- Code: ---
--- End code ---
The "root (hd0,2)" is actually the partition where the kernel and boot loader reside and happens to be my "/boot" partition on /dev/hda3 which = (hd0,2). That tells grub where the kernel is. The kernel is passed parameters to know where the root (/) partition is "root=LABEL=/". In my case I have my file system on "/dev/hda7" labeled "/" so the kernel knows that the file system labeled "/" is to become the root file system. I could also have used "root=/dev/hda7" and it should work. You can check the label of the filesystem by typing "/sbin/tune2fs -l /dev/hda7 | grep volume".
So to summarize, use the "root (hdx,x)" in grub.conf to specify the partition that your "/boot" directory resides. Then pass the location of your root (/) partition to the kernel as a parameter.
[ October 19, 2002: Message edited by: void main ]
Master of Reality:
ummm.... dont you have to set
init=/boot/initrd (or just the /initrd if grub is using boot as root (if you have boot on a separate partition)).
Master of Reality:
damn you void main!!!
voidmain:
I just edited my message (the original reply to the first message) because I originally had it horribly wrong. It should be accurate now. And you only need the "initrd" line if in fact you use an "initrd" file. It usually isn't necessary unless you have SCSI drives.
[ October 19, 2002: Message edited by: void main ]
Navigation
[0] Message Index
[#] Next page
Go to full version