Author: Roy Stogner
Email: roystgnr@iname.com
Web Page: http://linuxwebmap.ml.org
Date Submitted: Mon, Oct 19, 1998
Status: New Entry

Requester: Robin
Email: robingar@io.com
Request Made: Thu, Sep 3, 1998

Releases: all
Platform: all
Category:  Booting and LILO
Category Listing:  Boot error during install: VFS: Cannot open root device

Issue

I tried to install a previous version of linux (from no BS Linux) 
called Linux Pro release 4.1a. I formated and made partitions, but it 
would not mount root. So I bought redhat 5.1 and using the boot disk, 
it stop with the messages as follows: VFS: Cannot open root device 
08:21 Kernal panic: VFS: Unable to mount root fs on 08:21 The boot disk did 
recognize the partitions I had made with the other version of 
linux. I want to start over with redhat 5.1, what do I do? 

Response

There are usually only a few possible reasons why you get a 
"Cannot open root device" message on bootup. If your root partition 
is corrupted beyond belief it could happen, but that probably 
isn't the case here. If the kernel is simply trying the wrong root 
partition (e.g. you gave a wrong parameter at the LILO prompt) this 
is the message you get, but it doesn't sound like you've done that. 
The most common reason for this message, and the one that sounds 
like it applies in your case, is that you're trying to boot using 
a root partition that your kernel doesn't have support for, either 
at a filesystem or device level. Since device 08:21 (major number 8, 
minor number 21, check your /dev directory to see) is on a SCSI drive, 
and most default kernels won't have your SCSI card driver 
compiled in, I'd say that was the problem. A successful Red Hat 
install will use their default kernel with an initial RAM disk 
to load the SCSI module for your card. Since it's not doing this, 
I'm guessing something went wrong. The best way to fix this (the 
only way without reinstalling) is to first manually get into your 
system with a generic kernel and the SCSI module with your card. 
The RedHat 2-disk set will allow you to do this in "rescue mode". You 
will eventually get to a shell prompt with a kernel capable of 
reading SCSI disks. From here, you need to make a /dev entry for 
your root partition, "mknod /dev/sdb5 8 21" for instance. "mkdir /temproot; 
mount /dev/sdb5 /temproot" should then mount your root partition. "cd 
/temproot; /temproot/usr/sbin/chroot /temproot; su -" will give you your 
normal root account to play with. The surest way to fix the 
problem then is to recompile your kernel with your SCSI device 
built in monolithically, then edit /etc/lilo.conf and re-run /sbin/lilo 
to boot to that kernel. See the Kernel-HOWTO for details on that. I 
had to do go through this for a friend once when he was 
switching drives around a few months after installing Linux; if 
this is a fresh install it's probably easier to reinstall from 
scratch and let RedHat's install program set up SCSI support 
correctly from the start. 

References

/usr/doc/HOWTO/Kernel-HOWTO