Link to home
Start Free TrialLog in
Avatar of addady
addady

asked on

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
Avatar of Gns
Gns

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
Avatar of addady

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of Gns
Gns

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of addady

ASKER

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.
A better filesystem utility to use is tune2fs. It blows fsck out of the water.
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
"refkect" == "reflect"

-- Glenn (a.k.a. Le Grand Typo)
Avatar of addady

ASKER

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.
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
Avatar of addady

ASKER

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.
Avatar of addady

ASKER

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.
Avatar of addady

ASKER

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 ?
You might be able to use explore2fs from windows (get it at http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm)

-- Glenn
Avatar of addady

ASKER

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 ?
Avatar of addady

ASKER

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.
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
Avatar of addady

ASKER

Spurgeon,
Why do you think it will work ?
look at my note from 03/21/2003 01:53PM PST

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
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