can't mount root on boot, gentoo

Hi,

I have installed gentoo but when I boot I get a kernel panic and I cannot mount the root partition, it looks like /etc/fstab is ok and II think the kernel modules are all there.  I may be mistaken here.

What now??

Gav.
mbpssgmsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

troopernCommented:
What does your fstab look like and how is your partitions divided and what partition is supposed to be mounted as / etc.
0
mbpssgmsAuthor Commented:
Hi,
/etc/fstab
/dev/sda2   /boot   ext2   defaults,noatime   0 0
/dev/sda3   /            ext2   defaults                   0 0
/dev/sda5    swap    sw       defaults                    0 0
/dev/sda6      /home   ext2   defaults                    0 0
/dev/sda7      /scratch  ext2   defaults                     0 0

proc and tmpfs are also mounted as in manual
fd0 cdrom mounted
sizes
/ 5G
/boot 100 M
/home 3G
/scratch 0.5G
swap 1G

I don't understand 'cos ext2 and devfs are in kernel.  I tried ext3, this didn't work with its support.  /dev/sda1 is for palo on a hp.

Hope this helps.

Gav.
0
troopernCommented:
Seems correct to me, and I assume that / is sda3 and so on ?

Could help some to see what the kernel outputs before the panic too, if you've got a chance to "copy" that.

Though, sda sounds to me like an external device (USB/IEE1394 Harddrive) If so is the case, is the correct drivers loaded ?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mbpssgmsAuthor Commented:
Hi,
It's nice to be able to 'chew over' this with omeone.  I've been struggling for 3 weeks!  I started with ext3 but I thought the prob may be there so now it's all ext2.  The same istrue for the kernel.  I started with 2.6 now have 2.4.

The error is
'kernel panic:VFS:can't mount root on 08:03'  08:03 is /dev/sda3.

The real bitch is when I have compiled a kernel and it's failed, before I can do another image I have to reformat and start from stage1 AGAIN.  DAYS!

I have
/devfs support
/ext2 support /proc fs support
auto mount at boot in the kernel.

I'M STUMPED and close to giving up.
Gav.
0
troopernCommented:
You should only have to boot the Gentoo LIVE CD and mount and chroot to the environment. To rebuild the kernel.

As for the kernel panic I'm quite "bummed" about how to solve it. I can't come up with anything, can't find anything that might brighten the situation either.

It sure is nice to have someone to discuss a matter of a problem with. It's really helpful too.
0
BotHunterCommented:
It almost looks like your kernel is either not detecting the SCSI card, or it is detecting more devices on the SCSI bus than the gentoo kernel did. I would try rebuilding the kernel.  Can you watch for any lines that show when your scsi devices are detected and what partitions are found?

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 1440705792 512-byte hdwr sectors (-361869 MB)
Partition check:
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 >

I've seen custom linux kernels detect additional devices(or detect them in a different order) that the stock kernel didn't find, such as a tape drive or CD-rom.  In that case, your root partition would end up being /dev/sdb2 or /dev/sdc2.  

Also, what kind of SCSI card do you have?
0
mbpssgmsAuthor Commented:
Hi,

I am using genkernel because I had a bit of a prob with the kb and m.  This machine uses the hppa gentoo but in the manual for hppa it doesn't mention the command for updating mtab from mounts.  As a consequence I couldn't execute 'df'.  It said 'cannot read fs table'.  Also when the kernel hung on boot a remember seeing something to do with mtab.  I don't know how mtab is used.  But could this be the prob?

I have rebuilt the system again and got 'df' worling by copying /proc/mounts to /etc/mtab.  The kernel is ready to go with a kernel.  Should I use the kernel put in /boot or copy vmlinux from /usr/src/linux to /boot and boot onto that?

Thanks for sticking with it.
Gav.
0
mbpssgmsAuthor Commented:
Hi,
Obviously, mtab's not read until / is mounted, I'm stupid!  I will investigate your scsi idea,but, have you any idea how I can do the kernel wihout reinstalling?  Thanks.
GS.
0
BotHunterCommented:
You can use the gentoo live cd and enter the chroot environment.  Then just skip to the kernel part.
0
mbpssgmsAuthor Commented:

Hi,

I had a look in /dev and sda->d are there, I don't know what this means.  I will try rebuilding the kernel today.  Will I have to sit and watch the whole of genkernel, it takes about 2hr?

Since this is a hp visualize workstation, I don't know the type of hardware is attached.
thanks
GS  
0
mbpssgmsAuthor Commented:
Hi,
I tried a manual inst of the kernel.  But, as I feared I got 'no rule to make bzimage stop'.  It is this that fails unless I start afresh.  Before this I used 'dmesg' and saw sda as the scsi disk.  It is beginning to appear futile.
GS
0
BotHunterCommented:
If you were using the gentoo kernel, it will show you what SCSI driver you need to compile in your own kernel.  Watch the boot messages on your kernel to see what is happening.  You can use Shift+PgUp to scroll back in that screen.  Look for the same message that you saw when you typed dmesg.  Check the partition map line which should look like the one I posted earlier.

Did you enter all the right commands to enter the chroot environment?

#Replace these lines to work with your partition scheme
mount /dev/sda1 /mnt/gentoo
mount /dev/sda2 /mnt/gentoo/home


mount -t proc none /mnt/gentoo/proc

chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

0
mbpssgmsAuthor Commented:
Hi,
Yes I did these.  What I am gonna do is, start again but do stage 3.  If I get this working use vmlinux from this when I do again fromst1.  I noticed before when I run palo (lilo for hp) I saw a message telling me my home couldn't be mounted since it was in a unreachable part of the hdd.  Could this be the cause of my anomoly?
GS
0
mbpssgmsAuthor Commented:
Hi,
I think I've cracked it.  I made my fs reiser and used the vmlinux32 image off the cd.  Now it boots most of the way, but doesnt recognise reiser.  Now I can either start again and either, make my fs ext2 or rebuild the kernel off the cd.  This seems easiest.  How do I do it?  Or, I could start again with reiser and use genkernel.  Pls advise.

Reiser seems the anwser or it may be the cd kernel containing the necessary drivers, less likely.

GS.
0
BotHunterCommented:
I think it's both.. The CD kernel probably has all the support you need, except reiserfs.  Your kernel probably is missing something that you need to boot the hard drive, (but it has reiserfs)

0
BotHunterCommented:
As for starting over, it's really up to you.  

Personally, I would try to figure out what the gentoo kernel has turned on that you need in order to read the hard drive, and recompile a kernel with that feature.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mbpssgmsAuthor Commented:
Hi,

So I don't have to endure loads of trial and error,  is there a way of listing the modules in the cd bootimg?

Also, I am considering booting onto the 64bit kernel image from livecd.  Do you know the pro's and cons of this?  Also, need I do a full reinst. for this?

Thanks.
GS.
0
BotHunterCommented:
dmesg should tell you what modules and drivers are sucessfully loaded.

I usually have dmesg on one virtual screen while I configure a kernel for a system I'm unfamiliar with.
0
mbpssgmsAuthor Commented:
Hi,
I noticed whilst reading the kernel manual that hdd's of 9b+ need another module for large disk support, which i haven't put in.  I always see an error that the end of my sd /sga6 cannot be read, this is /home.  Do you think this could be a contributory factor to the prob?

Also, do you know wht the 64bit fernel source is called,; so I can emerge it?

Gav.
0
mbpssgmsAuthor Commented:
Hi,
I'm still messing with this.  Using fdisk, which partition should be marked boot, / or /boot?

Also, I have been using gentoo from my 'new' enviroment.  I emerged x11 but when I startx the commands xauth and xinit are not found.  What else need I emerge to get x working?

When this is done I have a fully operational system.  How do I unmount the livecd so I can use the cd.  At least I will have a system while I sort out the kernel.

Can you recommend a different kernel source to use?

Thanks.
0
BotHunterCommented:
It doesn't matter what partition you set as "boot" if you install lilo to the "root" sector /dev/hda, instead of /dev/hda1, etc.

Read the XWindows guide on the gentoo site to figure out what else you need to emerge.

http://www.gentoo.org/doc/en/xorg-config.xml
http://www.gentoo.org/doc/en/gnome-config.xml 

Once you get your system to boot, it shouldn't even mount the CD on bootup.  Try removing it then.

As far as the kernel source is concerned, I usually use the vanilla sources.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.