• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1385
  • Last Modified:

Can't boot, the error "VFS: Can't find an ext3 filesystem"

Hello,

I'm using redhat 7.3 with ext3 partition.
After tring to reboot the machine hang. here are the last lines on the screen:

Red Hat nash version 3.3.10 starting
Loading jbd module
Journalled Block Device driver loaded
Loading ext3 module
Mounting /proc filesystem
Creating root device
Mounting root filesystem
VFS: Can't find ext3 filesystem on dev ide0(3,1).
mount: error 22 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
Freeing unused kernel memory: 220k freed
Kernel panic: No init found.  Try passing init= option to kernel.

and then the computer dies.

I allso fail to boot from the boot diskete.
Booting form redhat 7.3 cd in rescue mode
say "You don't have any linux partition"

How can I fix it ?
Please help

Addady
0
addady
Asked:
addady
1 Solution
 
GnsCommented:
As I'm sure you've already gathered, the OS can't find any valid root filesystem.

If you boot to rescue mode, what does fdisk -l report for the drives?

-- Glenn
0
 
addadyAuthor Commented:
fdisk -l output:
           
/dev/hda1 *(boot) 1 9313 74806641 83
....

0
 
GnsCommented:
Hm, the "83" partition type is "Linux Native", so that should be OK. And this is all there is? No swap partition, /boot ... Just one big / is it?

Still in rescue mode, if you try to mount it somewhere, what happens then?
mount -t ext2 /dev/hda1 /mnt
should work (if you're using ext3, mounting it as ext2 should still be OK).

If the mount works, do a "chroot /mnt" then check if you are using filesystem labels ... check in the /etc/fstab file, if the first column is something like "LABEL=/", you are.
In that case, check that the label is intact on the filesystem with
e2label /dev/hda1

If the mount doesn't work, try running e2fsck on it. If it complains that it cannot find a superblock, try giving it a backup superblock via the -b option... I'll cut-n-paste the relevant passage from e2fsck here:
       #b superblock
              Instead  of  using  the  normal  superblock,  use an alternative
              superblock specified by superblock.   This  option  is  normally
              used  when the primary superblock has been corrupted.  The loca#
              tion of the backup superblock is dependent on  the  filesystem#s
              blocksize.    For  filesystems  with  1k  blocksizes,  a  backup
              superblock can be found at block 8193; for filesystems  with  2k
              blocksizes,  at  block  16384;  and  for 4k blocksizes, at block
              32768.

              Additional backup superblocks can be  determined  by  using  the
              mke2fs  program  using  the  #n  option  to  print out where the
              superblocks were created.   The #b option to mke2fs, which spec#
              ifies blocksize of the filesystem must be specified in order for
              the superblock locations that are printed out to be accurate.

              If an alternative superblock is specified and the filesystem  is
              not  opened  read#only,  e2fsck  will make sure that the primary
              superblock is  updated  appropriately  upon  completion  of  the
              filesystem check.

-- Glenn
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
GnsCommented:
Note that the - (dash) got replaced with # (hash) in the paste above....grmbl.

Also note that you probably have a blocksize of 4K, so your first backup superblock is probably at 32768, so you can try with
e2fsck -b 32768 /dev/hda1
if a plain e2fsck doesn't work.

-- Glenn
0
 
addadyAuthor Commented:
Hello Glenn

I could not mount it and was super disk problems so I did:
e2fsck -b 32768 /dev/hda1
there whore some problem it fix.

But now it fail to boot on:
...
ext3 : No journal on filesystem on ide0(3,1)
...

I guess after the e2fsck in is no longer ext3

now when booting using the rescue I cam mount it !
but commands like ls and vi are not available in this mode.

>Hm, the "83" partition type is "Linux Native", so that >should be OK. And this is all there is? No swap >partition, /boot ... Just one big / is it?

ther is allso swap and fat(unuse) partition I did mention.
0
 
haydes007Commented:
A better filesystem utility to use is tune2fs. It blows fsck out of the water.
0
 
GnsCommented:
Apples and pears haydes007, apples and pears...
They perform completely different tasks... which is evident from their names, and even more so from their man-pages. tune2fs will not repair filesystem damage, while e2fsck will not finetune filesystem parameters.

The problem now addady is that you have converted your fileystem to ext2... One of the  things e2fsck's done is to remove the journal (actually "corrected" the parameter telling that there is one).
So the remedy is real simple... Just add it again:-).
I recommend this over changeing your /etc/fstab file (making it refkect that / now is ext2) because of the added security features of ext3. Might It be that you have a plain vanilla 7.3 install? ISTR there being issues with ext3 ... possibly massive filesystem damage resulting from a flaw... Check that you have updated to the latest kernel after you get it booting again;-). IIRC that should fix any issues.

How to add the journal?
Simply (yes haydes007, now you need tune2fs:-)
tune2fs -j /dev/hda1
from the rescue boot.

-- Glenn
0
 
GnsCommented:
"refkect" == "reflect"

-- Glenn (a.k.a. Le Grand Typo)
0
 
addadyAuthor Commented:
I tune2fs -j /dev/hda1 and now it continue
to boot and hang in:

Stating system logger
and hang
It seems to me that some important file are missing

>Might It be that you have a plain vanilla 7.3 install?
No I update the kernel some time ago.

I tryed to mount this partition from the rescue disk
to look around, but after the mount command all the shell commands are gone.  So I can't copy or edit files.
0
 
GnsCommented:
How did you mount it?
Or do you mean after the chroot I suggested?

What seems to be becoming clear is that for some reason (as of yet, and perhaps forever, undetermined) your filesystem might have experienced massive filesystem damage.
If that is the case, you should perhaps not try the chroot, but rather constrain yourself to the tolls provided by the rescuemode shell.

If it hangs on starting syslog, everything cannot be lost... at least it finds the kernel, and _some_ files... even init:-).

Depending on how much damage there is (look in /lost+found on /dev/hda1, fsck will have put "salvaged files" there... the ones it couldn't determine where else to put), you might be forced to reinstall. If you have the space, you could back up any files that you deem irreplaceable (and that isn't to damaged) in a tar archive on your fat partition... that way they will be easy to restore after the reinstall.

Exactly what happened here isn't really possible to tell. One theory could be that the journal got corrupted, and "corrected" the filesytem into oblivion upon the reboot... or something entirely different.

-- Glenn
0
 
addadyAuthor Commented:
I tune2fs -j /dev/hda1 and now it continue
to boot and hang in:

Stating system logger
and hang
It seems to me that some important file are missing

>Might It be that you have a plain vanilla 7.3 install?
No I update the kernel some time ago.

I tryed to mount this partition from the rescue disk
to look around, but after the mount command all the shell commands are gone.  So I can't copy or edit files.
0
 
addadyAuthor Commented:
I tune2fs -j /dev/hda1 and now it continue
to boot and hang in:

Stating system logger
and hang
It seems to me that some important file are missing

>Might It be that you have a plain vanilla 7.3 install?
No I update the kernel some time ago.

I tryed to mount this partition from the rescue disk
to look around, but after the mount command all the shell commands are gone.  So I can't copy or edit files.
0
 
addadyAuthor Commented:
Sorry abut the last two port ( I hit refrash)

>How did you mount it?
>Or do you mean after the chroot I suggested?

#mount -t ext2 /dev/hda1 /mnt
#chroot /mnt
sh: chroot: command not found
(amy command will not work from this point)

if I will reinstall do I have to format the partition and loss at the data ?
Is there any other way to be able to access the data beside redhat rescue ?
0
 
GnsCommented:
You might be able to use explore2fs from windows (get it at http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm)

-- Glenn
0
 
addadyAuthor Commented:
if I will reinstall linux (red-hat 7.3)on the same partition will I loss the previous data (e.g. /home)?

Do you think upgrade to red-hat 8 (using the redhat upgrade option) will rebuild all the currpt system files ?
0
 
addadyAuthor Commented:
OK , I add 2nd hard disk.  define the new disk as master, and the old disk as slave (now is hdb[1]).
I install redhat 8.0 on the new disk. and mount the old one
as read only.  I can see all the files !

My question is:
Can I some how re activeate the old system with the old disk?. I save me data but I want allso to save the time of installing  and redefineing  all softwares etc.
0
 
SpurgeonCommented:
when you tuned your fs
tune2fs -j /*/*
it converted your system to ext3
so you'll also have to update your /etc/fstab
put ext3 instead of ext2
0
 
addadyAuthor Commented:
Spurgeon,
Why do you think it will work ?
look at my note from 03/21/2003 01:53PM PST

0
 
GnsCommented:
Great going adaddy!

So... now we really could start "thrashing" the 7.3 install:-).

Keep the old disk as slave, add an entry for it in the bootloader (grub? that's the default), and, very important(!), from the RH8 install _relabel_ the 7.3 partition with something distinctive like "e2label /dev/hdb1 73_/" and make the 7.3 /etc/fstab reflect that change, or go with the actual device handle /dev/hdb1 in the 7.3 /etc/fstab.

And that is more or less it!

You should then be able to boot either 8.0, 7.3 or windows... (provided rh8 found/added your windows part;).

What happens if you mount the rh7.3 filesystem as read-write from rh8?

-- Glenn
0
 
GnsCommented:
You can probably find out a more or less correct entry fro grub in /<wherever_you_mounted7.3>/boot/grub/menu.lst (On RHs this is usually a symlink to grub.conf). Just remeber to change the "root (hd0,0)" to "root (hd1,0)" (or whatever is appropriate) since the drive now is "the second".

-- Glenn
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now