LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2003, 04:11 PM   #1
azl
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
Unhappy Custom Kernel / No INIT / initrd?


First timer, I'm building my first custom 2.4.22 kernel. I am able to initialize the file system but inevitably hang at the "Kernel Panic - Try passing INIT=" line.

I find that if I hit "c" at the GRUB menu and enter the following commands:

kernel /vmlinuz-2.4.22
initrd /initrd-2.4.22.img
boot


then the boot will proceed (oddly, many modules do not load such as my NIC, and some odd USB/HID modules). But it DOES boot all the way to X!

I don't really understand the NEED for an initrd-x.x.x.img file. It was my understanding that that was just a container for modules necessary to allow Linux to find boot-critical code (such as SCSI) before being able to access the file system. I have a simple configuration, an IDE disk (/dev/hdb) and ext3.

My grub.conf:

default=2
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.22)
root (hd1,0)
kernel /vmlinuz-2.4.22 ro root=/dev/hdb1 hdd=ide-scsi
initrd /initrd-2.4.22.img
title Red Hat Linux (2.4.20-20.9)
root (hd1,0)
kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-20.9.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1


My partition list:

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4864 39070048+ 7 HPFS/NTFS

Disk /dev/hdb: 20.4 GB, 20490559488 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 2296 18338197+ 83 Linux
/dev/hdb3 2297 2491 1566337+ 82 Linux swap


What I don't understand:

1) Why can Linux 2.4.20-20.9 load just fine with a "root=LABEL=/", but 2.4.22 gets completely lost unless I specifiy "root=/dev/hdb1"?

2) If I'm doing this right, do I even need the initrd line? I don't need SCSI support.

3) I built a monolithic kernel. I didn't select any portion of the code to be modular. Could this be part of my problem?

4) How come Linux can find INIT just fine if I manually specify kernel & initrd via the GRUB console?

I searched and searched all over the forum and the net. This forum is extremely helpful. I just can't seem to get over this bump.

Thanks a lot,
Daniel
 
Old 11-01-2003, 04:19 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Here are two threads where other people had the same problem with initrd.

http://www.linuxquestions.org/questi...hreadid=105090

http://www.linuxquestions.org/questi...threadid=99181

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 11-01-2003, 10:32 PM   #3
azl
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the reply Steve. Turns out it was something simple (as usual). So for future search reference to hopeless newbies like myself:

I had root=/dev/hdb1 and I should have had root=/dev/hdb2.

Boots fine now. Just some minor issues with modules.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/sbin/init problems with initrd-boot Fonk Linux - Software 1 03-06-2005 01:48 PM
Custom initrd for bootable cd deoren Linux - General 13 02-12-2005 12:38 PM
Creating custom initrd image in suse 9.1 Anmol SUSE / openSUSE 1 01-08-2005 03:31 AM
custom initrd not working -- INIT errors michael_util Slackware 9 11-24-2004 12:58 PM
Custom install initrd for megaide - how to make? silversail76 Debian 1 07-27-2004 06:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration