LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-08-2005, 08:38 PM   #1
vi595
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Rep: Reputation: 0
HELP !! Unable to mount root fs (from RESCUE DISK)


I have a dual boot machine - Dell , 128MB, 10GB.

On hda1 I have Windows 98SE with the partition size about 1.5GB

The rest of the HDD is occupied by Debian Linux (2.4) with the following config:

hda2 : /boot
hda3 : SWAP
hda5 : /
hda6 : /usr
hda7 : /var
hda8 : /home
hda9 : /opt

LILO is the boot loader.

A few days ago I was running Windows98 on this machine. When I tried to shutdown/restart it went crazy (all kinds of numbers filled the screen). I couldn't get the LILO boot menu , I couldn't boot to anything. So I figured the MBR must be corrupted and I did fdisk /mbr to overwrite it. And with that I am able to boot to Windows98 and it works fine.

However I cannot boot to Linux now since LILO is gone. So I tried to do a rescue using the installation CD , by doing
boot : rescue root=/dev/hda5

and it gives me the error : Kernel panic unable to mount root fs 03:05

There are also other messages above it :

attempt to access beyond end of device
03:05 rw=0, want=1, limit=0
dev 03:05 blksize=1024 blocknr=0 sector=0 size=1024 count=1
EXT2-fs unable to read superblock

attempt to access beyond end of device
03:05 rw=0, want=1, limit=0
dev 03:05 blksize=1024 blocknr=0 sector=0 size=1024 count=1
FAT bread failed

attempt to access beyond end of device
03:05 rw=0, want=1, limit=0
dev 03:05 blksize=1024 blocknr=0 sector=0 size=1024 count=1
FAT bread failed
invalid session number or type of track

attempt to access beyond end of device
03:05 rw=0, want=1, limit=0
dev 03:05 blksize=1024 blocknr=0 sector=0 size=1024 count=1
isofs_read_super: bread failed dev=03:05 iso_blknum=16 block=32
Kernel Panic : VFS : unable to mount root on 03:05


When I installed it , I had chosen EXT3 filesystem. Still the error message above seems to indicate EXT2 filesystem.

Can anyone help me ??

Does anyone know of anyway to re-install LILO in the MBR even if I can't boot to Linux. I even tried setting hda2 (/boot) as the Active Partition using fdisk. It didn't work (No operating system).
Is there any way to install LILO in MBR from DOS/Windows ??

Last edited by vi595; 07-08-2005 at 08:53 PM.
 
Old 07-09-2005, 01:56 AM   #2
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
try this

boot : linux root=/dev/hda5

also u can have a look here
http://masand.sourceforge.net/linux/bootloader.html
additionaly u wil need to mount the /boot partition once u chmod to the root(/) partition

regards
 
Old 07-09-2005, 05:19 AM   #3
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Quote:
EXT2-fs unable to read superblock
Are you sure the partitions were not deleted?

Quote:
When I installed it , I had chosen EXT3 filesystem. Still the error message above seems to indicate EXT2 filesystem.
EXT2 is identical to EXT3, except for journaling. I think Linux mounts the / filesystem as EXT2 read-only to check it before remounting it read-write.


masand:
Quote:
once u chmod to the root(/) partition
Did you mean "once u chroot to the root(/) partition"?

Last edited by stefan_nicolau; 07-09-2005 at 05:22 AM.
 
Old 07-09-2005, 08:10 AM   #4
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
thanks for correcting me
it is chroot
 
Old 07-09-2005, 09:11 AM   #5
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
The first thing I would do is use a live cd didtro to boot the system. Then use fdisk to look at the partition table and make sure all is fine with your partitions. Then you can mount them and chroot into it to fix lilo.
 
Old 07-09-2005, 01:03 PM   #6
vi595
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Still Unable to BOOT !!

Thank you all for your suggestions.

I tried doing : linux root=/dev/hda5

Now, it took me into the installation menu. Here I tried the option "Mount a previously initialized partition" but the only two fs available are /dev/hda2 and /dev/hda1 . How can I mount /dev/hda5 which is my root filesystem. Other options like "Make System Bootable" won't work because root is not mounted.

Specifying the root=/dev/hda5 at the boot: prompt doesn't seem to work, it is not recognizing it as the root partition.

I am now wondering if I setup the partitions correctly when I installed it. I would appreciate if someone could verify the following ( I have a lot to learn when it comes to disk partitions, cylinders etc.)

Here's what the partitions look like :
/dev/hda1 : Cylinders 1-148 : PRIMARY DOS Partition : Bootable - Windows98

/dev/hda2 : Cylinders 149-149 : PRIMARY NON-DOS Partition - Linux /boot

/dev/hda3 : Cylinders 150-168 : PRIMARY NON-DOS Partition - Linux Swap

/dev/hda4 : Cylinders 169-1026 : EXTENDED DOS Partition - Contains all the other linux partitions including root.


I am a little hazy about the whole 1024 cylinders restriction, but as I understand it, as long as the /boot is inside of 1024 cylinders it should be fine even though the root partition (/dev/hda5) is contained in the EXtended DOS partition which goes to 1026. Am I correct here or is my partition table completely out of whack ?
And remember this setup did work for me . I was using Linux for a while before this problem occured.

Aside from blowing away my partitions and re-install ( i really don't want that) , is there anything I can do ??

How do I proceed after I do linux root=/dev/hda5.

Thanks .
 
Old 07-09-2005, 01:14 PM   #7
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
A) Have you checked that all the partitions are still there?
B) Boot a cd/floppy, mount -t ext3 /dev/hda5 <somewhere>, chroot <somewhere>, post errors (if any)
C) If the above works, mount /boot and restore your system

About the 1024-cylinder limit: all you posted is right, but I would like to add that:
A) This has nothing to do with your problem.
B) Computers manufactured in the last 5 or 6 years usually don't have this problem.
 
Old 07-09-2005, 01:43 PM   #8
vi595
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for your response Stefan

A) When I check the partitions using FDISK (from DOS or from Linux installation menu) , it only shows me the 3 PRIMARY and 1 EXTENDED partition. It does not show the contents of the EXTENDED partition.
Another tool that I used Ranish Partition Manager , gives the following info for the Extended Partition when I highlight it :
" Invalid Layout of extended partition chain. Boot sector does not have valid information "
It does show the other partitions however.

But this tool gives the same message "Boot sector does not have valid information" even for my Windows partition. But that works fine. So I am not sure about the accuracy of this tool.

B) How can I do a mount or chroot when I can't even get to a prompt ?

C) Haven't got there yet .

Thanks for the clarification about 1024 cyl.

Last edited by vi595; 07-09-2005 at 01:49 PM.
 
Old 07-09-2005, 01:50 PM   #9
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Quote:
B) How can I do a mount or chroot when I can't even get to a prompt ?
Get a live cd:
www.knoppix.org
http://www.frozentech.com/content/livecd.php
 
Old 07-11-2005, 12:54 AM   #10
vi595
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
is my root filesystem corrupted ?

OK, I downloaded Knoppix and booted from it. Tried the following basic steps to see what was wrong and here are the outputs. (see above posts for my filesystem setup as I had created during installation)

1) fdisk -l
<output>
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5
Warning: invalid flag 0x7ad5 of partition table 5 will be corrected by w(rite)

Disk /dev/hda: 8455 MB, 8455200768 bytes
255 heads, 63 sectors/track, 1027 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 149 1196811 c W95 FAT32 (LBA)
/dev/hda2 150 150 8032+ 83 Linux
/dev/hda3 151 169 152617+ 82 Linux swap
/dev/hda4 170 1027 6891885 5 Extended
/dev/hda5 ? 128717 243465 921709730+ b2 Unknown
</output>

Why is my /dev/hda5 showing as Unknown? what does that mean? And I don't see my other filesystems/partitions hda6-hda9. Are they gone ?


2) fsck /dev/hda5
<output>
fsck 1.37 (21-Mar-2005)
e2fsck 1.37 (21-Mar-2005)
fsck.ext2: No such device or address while trying to open /dev/hda5
Possibly non-existant or swap device?
</output>


3) mount /dev/hda5 /mnt/hda5
<output>
mount : /dev/hda5 is not a valid block device
</output>


Is my root filesystem pretty much fried ?

Linux gurus , please help !! I want to know how I can fix this .

Thanks.
 
Old 07-11-2005, 02:22 AM   #11
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
Use fdisk to set the partition type on /dev/hda5 to 83. Then use the p command to see if the partitions are all there. If you can't see them you may have to delete /dev/hda5 and /dev/hda4 and recreate them.
I think your partition table is corrupt. If fdisk allows you to do as I siad it will not do any further harm.
 
  


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
unable to mount root fs awreneau Debian 3 06-11-2004 11:51 AM
Please Help.. Unable to mount Root Skibz Linux - Newbie 13 04-19-2004 10:54 PM
unable to mount root recon2 Linux - Software 18 10-13-2003 04:55 PM
Unable to mount root fs moger Linux - General 2 01-25-2003 03:28 PM
Unable to mount root fs on 16:03 mvbashyam Linux - Newbie 3 12-14-2002 03:22 PM


All times are GMT -5. The time now is 09:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration