LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-19-2005, 06:56 PM   #1
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Rep: Reputation: 0
Kernel panic: VFS: Unable to mount root fs on 03:01


I have Red Hat 8.0 currently on my system. As soon as I figure out an effective way to get to Fedora 3 without losing my data, I will most likely do that. In the meantime I'm still learning about Linux and I powered my system off. Opened it up and did a normal cleaning on it. When I plugged it back in, powered it on I received the following error:
Code:
Kernel panic: VFS: Unable to mount root fs on 03:01
At first I thought maybe I knocked a cable loose or something. Powered off, unplugged and replugged the cables, then powered it back on. I get to the GRUB screen and then after it goes past it I get the same error. If I edit the boot option from the GRUB screen I see this:
Code:
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /initrd-2.4.18-14.img
I haven't made any changes on my system and have rebooted plenty of times without any issues, except for now. Anyone have any idea what is causing this or how I can fix it? Thank you.
 
Old 06-19-2005, 09:51 PM   #2
mkachline
LQ Newbie
 
Registered: Jun 2005
Location: Oklahoma City
Distribution: RedHat *; Fedora; Knoppix
Posts: 4

Rep: Reputation: 0
Does BIOS find the hard disk in which you think Linux is running?
Do you know which device your root partition is supposed to be? (Ie, /dev/hda1, /dev/hdb1, etc.)?


Your kernel booted up, but could not find the partition in which your "root" filesystem (ie '/') usually lives. Redhat uses the concept of a "partition label" to try to resolve the problem of moving hard disks around in your box and running into exactly this problem.


Something to try....

Figure out which actual partition you believe your "/" resides on.
Make sure BIOS sees that physical hard disk (ie, primary master, secondary master, etc.)
Reboot computer
When Grub comes up, use arrow keys to highlight the kernel you want to boot.
Hit "e" for edit.
Use arrow keys to move to the line containing "root=LABEL=/"
Hit "e" for edit (again)
Change line to "root=/dev/hda1" (Or whatever your root device is).
Hit enter (saves changes, but not to disk).
Hit "b" for boot.

Another handy thing would be to boot up from a "live CD" (such as "damn small linux" or "knoppix") and "mount" each of your partitions by hand in order to find out which one is indeed, your "root" partition.
 
Old 06-19-2005, 11:09 PM   #3
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Well I seem to have gotten it to boot me to a login at least now. However it doesn't load in graphical anymore as if the XServer config files were never setup. I'm not sure what else is missing or corrupt so I will probably backup, format and restart. To help save time in the future without having to pull everything off or if I want to change my Linux OS again without wiping the whole thing can someone explain a little more about the partitions and suggested settings.

I have two hard drives both of them 160 GB. I would like the second drive to be storage where I can install the programs and storage. I would like the primary drive to mainly be OS and some storage as well. Essentially that way if I need to reinstall or install a new OS I can do so without losing the data on the second drive. Is that possible?
 
Old 06-21-2005, 07:58 AM   #4
mkachline
LQ Newbie
 
Registered: Jun 2005
Location: Oklahoma City
Distribution: RedHat *; Fedora; Knoppix
Posts: 4

Rep: Reputation: 0
What did you do to get your Linux booting?

At home, I usually use three partitions "/" "/mnt/home" and "swap".

"/" is "linux". "/mnt/home" is "user home directories". With most linux distro's I've seen, one of the first things you are asked to do, is create a "user". It is a simple task to point the user account's "home directory" to your "/mnt/home/username" directory; thus, preserving personal data, even across OS upgrades.

The "swap" partition is an entire partition dedicated to what I believe Windows calls the "virtual memory file". Personally, I do not tend to make very large swap partitions. If my box needs to swap *that much* memory out, I've either got a program which is a runaway, or am just running too damned much.

As far as suggested settings (Man, I only wish I had 160 GB), cutting up the disks will ultimately boil down to "what you want to do". If you don't know that yet, then, I would suggest...

Assuming you have two IDE drives, I would suggest:

(/dev/hda)
/ - 20 GB
swap - 5 GB
/var - 80 GB
/tmp - 55 GB


(/dev/hdb)
/mnt/home - 80 GB
/usr/local/ - 80 GB


So, we have a few things here:

Your "home directories" will live in "/mnt/home", on your second disk. In my experiences, this one partition ("/dev/hdb1" for you) will be most valuable. Linux distros will come and go, but /mnt/home will always stay the same.

When you download "tarballs", compile and then install them, the installs usually wind up going in "/usr/local" by default. This too, will be on your second HDD.

The "/var" partition is (at least, on later redhat versions) where your "apache root directory" is, ie, where you will put files which show up on your website (if you choose to run one). It's also where your mailserver (if you run one) puts inboxes, and finally, where system logs go.

The "/tmp" partition is just a partition for temporary files. Later down the road, you can likely re-use this partition for something else, if you see fit. It's basically just "space to burn".

Linux will fit in 20 GBs (think about it, it fits on 5 CDs).

I would tend not to have too large as "swap" partition. If your system has to actually use that much virtual memory, you've got a runaway program, and you probably want it to die sooner, rather than later.

An important point to note. Having equally sized partitions on each of your seperate disks (80 GB /mnt/home and 80 GB /var) gives you the option, later down the road, to create a "RAID Mirrorset" of the two partitions into a single "virtual" partition. Thus, in this case, if you find that you believe your "/mnt/home" partition to be really, really valuable, you can ultimately use the "/var" partition as a mirror partition to "/mnt/home". (This takes some work, but is quite doable without requiring a re-install of Linux)
 
Old 06-21-2005, 10:04 AM   #5
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Original Poster
Rep: Reputation: 0
It started to boot and then had trouble loading into KWindows, something about configuration file wasn't setup or corrupt. It finally got me to a login which let me login as root. I did a shutdown since I didn't have time to work on it at that moment. When I powered it back on it said it wasn't properly shutdown and asked me to select Y for a file check. When I did that everything went downhill. There are a lot of errors that came on the screen during the file check and now it won't even boot up at all again. I get to the GRUB screen fine but as soon as I past that various errors, I believe they said segmentation fault or something like that.

I know I have a home and usr partition, fairly sure I have a swap but can't remember what the others are.

Unfortunately I haven't created a user account yet. I have an account for mySQL database, a samba user and root.

I believe my drives are hdc and hdd at least those are the ones it finds when it tries to load and since I only have two hard drives, those have to be it. I can't get into the OS so I am not sure what the partitions are set at. I was hoping at least get back to a login then I can setup samba or turn on SSH and transfer my files off, reformat and reinstall.

So from the sounds of it, if I properly set it up then /home will always stay and I can reinstall other distros without effecting it or losting the data. /home was where I doing most of my file storage and saving. I do have mysql and a few other server programs installed in /usr/local. But it sounds like if it was setup right then home and /usr/local should be on my second hard drive. While /var and /tmp are on the primary hard drive.


Let's say that I do keep each of the partitions equal or just set it up as RAID mirrorset. Right now I have the two hard drives operating on Primary SATA and Secondary SATA, both of them are masters. If I add another two hard drives to give me more space, will moving one of those drives to a slave or adding two new slave drives mess things up?
 
Old 06-21-2005, 11:08 PM   #6
mkachline
LQ Newbie
 
Registered: Jun 2005
Location: Oklahoma City
Distribution: RedHat *; Fedora; Knoppix
Posts: 4

Rep: Reputation: 0
Your files are probably just fine. As a newbie, I would suggest you do the following to "save" your files off:

1) Get "Knoppix 3.9"
2) Boot from the "Knoppix" CD.
3) When Knoppix comes up in X, you will find a "knoppix" menu on the start bar. You will also find that you can "start ssh daemon" and I believe, a samba server as well.
Your only potential gotcha here is the use of SATA drives. I don't know whether Knoppix supports Sata yet, but, would be suprised if they are *not* supported (knoppix is running a 2.6 kernel).


Doing an "/sbin/fdisk -l /dev/hda" will list all of your partions on your primary master drive. Do similar for /dev/hdc (assuming you have your drives on primary master / secondary master. That way, you can get your bearings on "where is my stuff?" From what I recalll, knoppix mounts your disks (read only, I think) and drops them on your desktop; that may well be easier.


As far as partitioning, yes, to be really, really safe, create two partitions on one of your drives; both "primary" partitions. One will ultimately be your "/mnt/home", and the other ultimately "/usr/local". I would advise against having a "/usr" partition, as, "/usr" gets populated with new distro's (whereas most distros just give you an empty /usr/local which you can easily swap out with your already populated /usr/local partition).

I have had my "home" directories on it's own partition for many years; lasting through many, many linux distro installs. None of the installs really do anything to your home directory. You will note, however, that I mount my home directory under "/mnt/home", only because it is easier for me to keep track of "now which files are on which parttions?" Creating a symlink from /home -> /mnt/home solves the problem of distros creating accounts with a default home directory in /home.


Regarding adding drives? That should not be a problem. It will likely be easiest for you to just drop the new drives into the open slots (presumably /dev/hdb and /dev/hdd?) As far as RAID-ing disks, your current setup (primary master, secodary master) is perfect; you have two seperate drives on two seperate channels; this is supposed to give optimal performance and minimize the potential of issues in the event that a hardware problem occurs.
I would suggest, however, that you wait on the RAID option. Your best bet currently, is to plan out your partition scheme, keeping in mind that you want equal size partitions on different physical hard disks; that allows you the potential of putting together raidsets down the road.


As far as user accounts, you want to create one. Given that there is a lot of stuff you initially have to do as root, look into using the "sudo" program.
 
Old 06-22-2005, 10:24 PM   #7
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you for the suggestion. I downloaded and created me a Knoppix 3.9 and tried it and unfortunately could not get into X. I downloaded and created another cd in case there was some corruption with the first one. It loads to a boot screen, presses enter and goes through the auto-detect. I then get a gray screen of death. It is as if it stuck trying to boot into X, I can move the X on my screen as that is all my mouse cursor is. The background is just a grayish background.

Another friend suggested that while it was writing to the hard drive there might of been hardware failure somewhere, thus why part of the system got corrupted and is no longer bootable. I am going to power it down, open it up and reseat everything, including swapping out the video card. Maybe it will either boot up or at least the Knoppix 3.9 cd will work.
 
Old 06-23-2005, 07:58 AM   #8
mkachline
LQ Newbie
 
Registered: Jun 2005
Location: Oklahoma City
Distribution: RedHat *; Fedora; Knoppix
Posts: 4

Rep: Reputation: 0
At the knoppix boot prompt, "knoppix 2" will boot you into command line mode. If knoppix was unable to give you an X screen, swapping out the video card will likely make a significant difference.

As far as the hardware errors, it's hard to say. I know that on my box, I am unable to enable my on-board soundcard and PCI firewire card at the same time. Doing so results in random lockups.


BTW, I will be out for a few days, so, I'm not ignoring your posts if I don't reply for a while.
 
Old 06-27-2005, 11:05 AM   #9
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Well good news is that my system is back up, at least temporarily. It was a RAM issue afterall. Even though when I initially did the mem check it didn't find anything, the second time it did right away. I have some RAM in there temporarily enough to at least get access to it so I can plan my next step. This has made me realize that I don't have a good backup/restore plan set nor do I really understand my file structure so I figured I would start with that. I am going to upgrade to Red Hat 9 and possibly dual boot it to run distro's to test and get more familar with Linux but keep Red Hat 9 as my base server OS for now.

It looks like I don't have any hda or hdb that both my hard drives are currently hdc and hdd. I believe hdc is my primary hard drive and hdd is my secondary drive.

This is what "/sbin/fdisk -l /dev/hda" displays:

Disk /dev/hdc: 255 heads, 63 sectors, 24321 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 267 2040255 82 Linux swap
/dev/hdc3 268 24191 192169530 83 Linux
/dev/hdc4 24192 24321 1044225 f Win95 Ext'd (LBA)
/dev/hdc5 24192 24321 1044193+ 83 Linux
[root@localhost home]# /sbin/fdisk -l /dev/hdd

Disk /dev/hdd: 255 heads, 63 sectors, 24321 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 24255 194828256 83 Linux
/dev/hdd2 24256 24320 522112+ 83 Linux


This is what "df -h" displays, this is more what I know but wasn't sure how it translated into what actual physical drive files are at. Or what files get overidden when installing a new distro, etc.

Filesystem Size Used Avail Use% Mounted on
/dev/hdd2 494M 296M 172M 64% /
/dev/hdc1 99M 9.2M 84M 10% /boot
/dev/hdc3 180G 1.9G 169G 2% /home
none 503M 0 503M 0% /dev/shm
/dev/hdd1 183G 2.5G 171G 2% /usr
/dev/hdc5 1004M 102M 851M 11% /var

I have most of my network shared files in /home as well as tomcat. Then I have java, mysql, php, apache installed in /usr.

Any suggestions on how I should modify the setups to make it better organized?
 
  


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
Kernel panic: VFS: Unable to mount root fs on 00:00 Evan P. Linux - Enterprise 4 06-14-2005 05:59 PM
Kernel Panic:VFS:Unable to mount root fs on 03:09 shizzo Linux - Newbie 0 11-12-2003 08:23 AM
Kernel panic: VFS: Unable to mount root fs on 07:01 rzward Linux - General 14 01-20-2003 10:05 AM
kernel panic:vfs:unable to mount root fs on 03:06 brianlan Linux - Software 4 06-28-2002 10:16 PM
Kernel panic:VFS:unable to mount root fs on 01:03 Marc Linux - Software 2 12-08-2001 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:33 PM.

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
Open Source Consulting | Domain Registration