LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-21-2009, 09:00 AM   #1
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Rep: Reputation: 16
fsck failed it says, but my system has crashed


Hi HELP!

Al I was doing was, creating a recovery disk for my Ascer Aspire One Netbook using the disk supplied by them on my Desktop. I have Opensuse 11 86 x 64 and using the Gnome desktop.

Since I did not have a USB stick with 2GB memory I used my external USB harddrive. As far as I remember this is what happened.

My Desktop booted with the Aser disk.
Copied something
USB Buffalo Harddrive - Select
Error - and all went blank.

When I rebooted the system it went to maintanance mode.

Lots of messages, the top ones were sorte of positive the error ones I am giving below.

waiting for /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB030RG1V3EB-part1: no more events
Checking file systems.....
fsck 1.40.8 (13-Mar-2008)
error on stat() /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB030RG1V3EB-part1: no such file or directory
error on stat() /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB030RG1V3EB-part1: no such file or directory
fsck.ex3: no such file or directory while trying to open /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB030RG1V3EB-part1
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB030RG1V3EB-part1:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem(and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>

bootsplash: status on console 0 changed to on
blogd: no message logging because /var file system is not accessible ehci-hcd ohci-hcd uhci-hcd usb-ohci usb-uhci usbcore: registered new interface driver hiddev
usbcore: registered new interfacedriver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:usb HID core driver

fsck failed for atleast one file system (not /).
please repair manually and reboot
the root file system is is already mounted read-write.

attention: only CONTROL-D will reboot the system in this maintanance mode. shutdown or reboot will not work.

Please give me clear instructions as I am not familiar with linux commands.

Cheers,
 
Old 07-21-2009, 09:58 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
My Desktop booted with the Aser disk.
Copied something
There you go.

It wrote to your HDD, overwriting your data... probably just the first superblock.

The disk acer supplied was for a windows/dos system?
You don't need one - you have a far superior recovery system available: linux.

Next thing to do is boot to recovery mode an follow the advise:
Quote:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem(and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>
 
Old 07-21-2009, 10:26 AM   #3
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Original Poster
Rep: Reputation: 16
Hi Simon,

Why did it write to my HDD when it was supposed to write to my External drive. My Acer Aspire came with the Lipus Lite LInux, so I assumed it would work on a linux system. The instructions just said to use it on another pc. It did not say a windows pc. I was making the recovery disk for the aser netbook as it does not have a cd drive, I was supposed to create a recovery USB thing for the Aser.

Coming back to my problem. I do not understand the advice. When I entered e2fsck -b 8193 <device> it gave bash: syntax error near unexpected token 'newline'

Am I supposed to enter something instead of device, if so what?

Cheers,
 
Old 07-21-2009, 10:58 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by yaarappa View Post
Hi Simon,

Why did it write to my HDD when it was supposed to write to my External drive. My Acer Aspire came with the Lipus Lite LInux, so I assumed it would work on a linux system. The instructions just said to use it on another pc. It did not say a windows pc. I was making the recovery disk for the aser netbook as it does not have a cd drive, I was supposed to create a recovery USB thing for the Aser.
Because acer mess stuff like this up. I have an aspire 4315 which came with a bunch of windows only disks, and documentation which only works with windows, but it had Ubuntu installed in a broken configuration.

Without knowing exactly what the disk did, or was intended for, I can only speculate.

Quote:
Coming back to my problem. I do not understand the advice. When I entered e2fsck -b 8193 <device> it gave bash: syntax error near unexpected token 'newline'

Am I supposed to enter something instead of device, if so what?
You are supposed to enter the filename corresponding to the offending hard-drive partition.

enter

fdisk -l

to reveal what the HDD partitions are called. You want to run this command for the drive which is type ext2 or ext3 (probably just called "linux"). For this to work, you cannot hove the partition mounted - so you must boot from something else.

Not having an optical drive is odd - which aspire is this?
It is also a problem.
 
Old 07-22-2009, 04:48 AM   #5
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Original Poster
Rep: Reputation: 16
Hi Simon,

Thank you for that. Following is the result for fdisk -l. How do I know which one to select?

Disk /dev/sda: 160.0.GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00096284

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / solaris
/dev/sda2 * 263 19322 153099450 83 Linux

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

/dev/sdb - i am pretty sure is the documents or data disk, no programmes in it.

I remember, I a backup of the xorg.conf file on my desktop. If that will work can you tell me the commands to copy it to the right folder.

Or will repair installation work with the original Opensuse disk.

BTW the Acer Aspire One A150 is fine, as I was going to do some experiment on it as a precaution I wanted to create a recovery disk, thats when my desktop got messed up.


Value your advice on this please.
Cheers,
 
Old 07-22-2009, 05:13 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could try the "undelete partition" feature from the SuSE install disk.
Look in /etc/fstab and see how /dev/sdb1 was mounted. If it isn't mounted on a system directory, then comment the line. This will let you boot up successfully.

---

If only the partition table was wrecked, you could try and see if you can use losetup to mount the first partition. In almost all cases the first partition starts on block 63.

sudo /sbin/losetup -fs /dev/sdb -o $((63*512))

It should respond with a loop device, e.g. loop0

You can examine if there is a file system there with:
sudo file -s /dev/loop0

If you remember the filesystem used, you could try mounting it. For example:
sudo mount -t ext3 /dev/loop0 /mnt

If that is successful, look at "df --block-size=512 /mnt"
That will give you a clue where the next partition might start.

If you can repeat this process, for each partition, you will be able to reconstruct the original partition table.

---
The program you ran somehow thought that the usb drive was the second drive. Sometimes there can be a conflict between what the BIOS sees as the second drive and how the kernel sees it. Especially if you have a mixture of SATA, PATA and USB drives. Grub even has a file (device.map) to rectify this problem so you can run grub-install.

Even if you had a 2GB pendrive, if you were to do this again, disabling the second drive in BIOS might be prudent.

Last edited by jschiwal; 07-22-2009 at 05:23 AM.
 
Old 07-22-2009, 08:53 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I'm inclined to defer to jschiwal's familiarity with OpenSUSE.
I agree that it is probably the broken sdb that is preventing a smooth boot.
So... what he said.
 
Old 07-22-2009, 12:32 PM   #8
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Original Poster
Rep: Reputation: 16
Angry

Quote:
Originally Posted by jschiwal View Post
You could try the "undelete partition" feature from the SuSE install disk.
Look in /etc/fstab and see how /dev/sdb1 was mounted. If it isn't mounted on a system directory, then comment the line. This will let you boot up successfully.
I did vim /etc/fstab - following is the result

/dev/disk/by-id//scsi-SATA_Hitachi_HDS7216_PVG904Z9SRGBJV-part1 swap swap defaults 0 0
/dev/disk/by-id//scsi-SATA_Hitachi_HDS7216_PVG904Z9SRGBJV-part2 / ext3 acl,user _xattr 1 1
/dev/disk/by-id//scsi-SATA_Hitachi_HDP7250_GEB030RG11V3EB-part1 /home ext3 defaults 1 2

proc /proc proc defaults 0 0
sysfs /sys sysfs no auto 0 0
debugfs /sys/kernel/debug debugfs no auto 0 0
usbfs /proc/bus/usb usbfs no auto 0 0
devpts /dev/pts devpts mode=0620, gid=5 0 0

Quote:
Originally Posted by jschiwal View Post
If only the partition table was wrecked, you could try and see if you can use losetup to mount the first partition. In almost all cases the first partition starts on block 63.

sudo /sbin/losetup -fs /dev/sdb -o $((63*512))

It should respond with a loop device, e.g. loop0
losetup: could not find any device /dev/loop#

Quote:
Originally Posted by jschiwal View Post
If that is successful, look at "df --block-size=512 /mnt"
That will give you a clue where the next partition might start.

If you can repeat this process, for each partition, you will be able to reconstruct the original partition table.
Filesystem 512B-blocks used available Use% Mounted on
/dev/sda2 301390648 12194648 273886056 5% /

Quote:
Originally Posted by jschiwal View Post
The program you ran somehow thought that the usb drive was the second drive. Sometimes there can be a conflict between what the BIOS sees as the second drive and how the kernel sees it. Especially if you have a mixture of SATA, PATA and USB drives. Grub even has a file (device.map) to rectify this problem so you can run grub-install.
grub> setup --stage2 = /boot/grub/stage2 (hd0,1) (hd0,1)
checking if "/boot/grub/stage1" exists... yes
checking if "/boot/grub/stage2" exists... yes
checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0,1)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,1)"... failed (this is not fatal)
Running "inistall --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0,1) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit


But nothing has changed, still the same

on top of my above blurb I thought I would ask!

Is there any way I can use the original Opensuse 11 cd and repair the damaage?

Hope you can shed some light
Cheers

Last edited by yaarappa; 07-22-2009 at 02:36 PM. Reason: Further question
 
Old 07-22-2009, 10:28 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Code:
/dev/disk/by-id//scsi-SATA_Hitachi_HDS7216_PVG904Z9SRGBJV-part1 swap swap defaults 0 0
/dev/disk/by-id//scsi-SATA_Hitachi_HDS7216_PVG904Z9SRGBJV-part2 / ext3 acl,user _xattr 1 1
/dev/disk/by-id//scsi-SATA_Hitachi_HDP7250_GEB030RG11V3EB-part1 /home ext3 defaults 1 2
The second hard drive was for your /home directory. You can comment out this line and be able to boot up. Since you will be logging in as root, you don't need it. Root's home directory is /root which is on the filesystem for the system. (/dev/sda2)
You should be able to boot and then you should have a loop device available.

---
I remember an option in the SuSE install disk to undelete partitions. I don't remember where however. Also, I install from the CD, but that shouldn't make a difference.

---
If more than 32 KB were written to /dev/sdb, then you probably will need to use a forensic tool to recover files from this drive. If there were important files on it, it is safest to clone the disk to an image file to prevent damaging it further in attempts to fix it.

Good Luck!
 
Old 07-23-2009, 05:45 AM   #10
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Original Poster
Rep: Reputation: 16
Thanks for all the suggestions, can you please give me the commands and steps to do it as I have no clue as to how to do them.

Cheers,
 
Old 07-24-2009, 04:33 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
I did vim /etc/fstab - following is the result

/dev/disk/by-id//scsi-SATA_Hitachi_HDS7216_PVG904Z9SRGBJV-part1 swap swap defaults 0 0
/dev/disk/by-id//scsi-SATA_Hitachi_HDS7216_PVG904Z9SRGBJV-part2 / ext3 acl,user _xattr 1 1
/dev/disk/by-id//scsi-SATA_Hitachi_HDP7250_GEB030RG11V3EB-part1 /home ext3 defaults 1 2
You can use any text editor. But from the rescue console, another editor might not be available.
In vim,
1) Cursor down to the line with /home in it. Make sure you are at the start of the line.
2) Press these keys:
i#[ESC]
3) Press these keys to save and quit:
:sq

Now see if you can reboot successfully. You won't be able to log in as a regular user without a home directory, buy you can log in as root.

Report back if you could boot up.
 
Old 07-24-2009, 05:14 AM   #12
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Original Poster
Rep: Reputation: 16
Hi,

Thank you for your suggestions. But I could not boot up. Several things came up and it said something about fstab.

I found a button on the original dvd for repairing partitions. But it could not restore it but instead it did something else because the original version of suse is running not the updated one. I got fed up and installed the whole thing again. I had most of my files backed up on the external hard drive so my files are safe.

I have to build the system the way it was. At the moment my wife is not well, I will come back on the forum to ask a couple of things.

Thanks for your help.
Cheers,
 
Old 07-24-2009, 06:06 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I hope your wife feels better soon.
 
Old 07-24-2009, 06:37 AM   #14
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Computer recovery by remote control can be frustrating - sometimes it is just best to reinstall and restore from backup. So many people we see do not keep regular enough backups, so it is good to see your example.

Let us know how you (and your wife) get on.

jschiwal: you can undelete partitions?
A user in another thread needs to know how.
 
Old 07-25-2009, 01:49 PM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by Simon Bridge View Post
Computer recovery by remote control can be frustrating - sometimes it is just best to reinstall and restore from backup. So many people we see do not keep regular enough backups, so it is good to see your example.

Let us know how you (and your wife) get on.

jschiwal: you can undelete partitions?
A user in another thread needs to know how.
If you enter the same start & stop values in the partition table, and the filesystem wasn't corrupted, yes. It is best to use a block size of 512. This eliminates rounding differences.

The SuSE install disk has an option to do that. Identifying where the partition starts can be the tricky part if there is a gap between partitions.

Thanks for pointing out the other post. But I'm afraid their filesystem is corrupt as well.
It was the first partition of their installation.

Last edited by jschiwal; 07-25-2009 at 02:14 PM.
 
  


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
"fsck failed. Please repair manually and reboot" after chaning non-system partition undeaf SUSE / openSUSE 17 02-07-2014 12:18 PM
failed upgrade to 8.04 from 7.10 missing system files from forced fsck bradb-acc Ubuntu 5 06-17-2008 01:21 AM
PC with /home crashed; how to do surface ext2/3 fsck at every single boot ? frenchn00b Linux - General 4 04-22-2008 10:15 PM
Crashed and Stuck in FSCK loop bnations Linux - General 5 07-27-2007 11:20 AM
[LFS 61][failed fsck] with reiser file system mr_demilord Linux From Scratch 3 10-13-2005 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:36 AM.

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