?
Solved

can't mount root on boot, gentoo

Posted on 2004-11-29
21
Medium Priority
?
672 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:mbpssgms
  • 11
  • 7
  • 3
21 Comments
 
LVL 7

Expert Comment

by:troopern
ID: 12695092
What does your fstab look like and how is your partitions divided and what partition is supposed to be mounted as / etc.
0
 

Author Comment

by:mbpssgms
ID: 12695918
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
 
LVL 7

Expert Comment

by:troopern
ID: 12697632
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:mbpssgms
ID: 12698013
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
 
LVL 7

Expert Comment

by:troopern
ID: 12698294
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
 

Expert Comment

by:BotHunter
ID: 12721928
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
 

Author Comment

by:mbpssgms
ID: 12724713
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
 

Author Comment

by:mbpssgms
ID: 12744685
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
 

Expert Comment

by:BotHunter
ID: 12745694
You can use the gentoo live cd and enter the chroot environment.  Then just skip to the kernel part.
0
 

Author Comment

by:mbpssgms
ID: 12752832

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
 

Author Comment

by:mbpssgms
ID: 12753433
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
 

Expert Comment

by:BotHunter
ID: 12755318
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
 

Author Comment

by:mbpssgms
ID: 12755482
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
 

Author Comment

by:mbpssgms
ID: 12773058
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
 

Expert Comment

by:BotHunter
ID: 12776540
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
 

Accepted Solution

by:
BotHunter earned 1200 total points
ID: 12776567
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
 

Author Comment

by:mbpssgms
ID: 12782726
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
 

Expert Comment

by:BotHunter
ID: 12785413
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
 

Author Comment

by:mbpssgms
ID: 12785540
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
 

Author Comment

by:mbpssgms
ID: 12820951
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
 

Expert Comment

by:BotHunter
ID: 12823386
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question