View Full Version : [ubuntu] 8.04 superblock could not be read

May 9th, 2008, 11:25 PM
Last night I upgraded to 8.04. Everything seemed to go without issue until the reboot. Then I received the following:

fsck.ext3: No such file or directory while trying to open /dev/hda3
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains and ext2 filesystem (and not swap of ufs or something else), then the superblock is corrupt, and you might want to try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

fsck dies with exit status 8

* File system check failed.
A log is being saved in /var/log/fsck/checkfs if that location is writable.
Please repair the file system manually

A search of the forums found some suggestions. sudo fsck -f /dev/hda1 didn't work. Another indicated that it was the new version treating the drive as SCSI instead if IDE and had one changing the etc/fstab file.

sudo fdisk -l

Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1912 15358108+ 83 Linux
/dev/hda2 9539 9726 1510110 5 Extended
/dev/hda3 1913 9538 61255845 83 Linux
/dev/hda5 9539 9726 1510078+ 83 Linux swap / Solaris

hda1 is the boot drive with the OS and hda3 is where my home directory is so the suggestion was to change the hda1 to sda1. Except that this is what the file actually looked like:

unionfs / unionfs rw 0 0
tempfs /tmp tmpfs nosuid,nodev 0 0
/dev/hda5 swap swap defaults 0 0

It was pointing to the swap. I didn't hink changing that would work but I tried anyway but after the reboot and the fail again I found that it had reverted from sda5 bach to hda5.

Noone has commented on my additions to those other threads (I suspect they have been pretty much resolved for the user's that had the problems) so I am posting a new thread.

May 10th, 2008, 12:36 AM
:) Hello kordite,

What to do if you have a bad ext3 superblock (http://users.bigpond.net.au/hermanzone/p10.htm#superblock_restoration_frombackup)

Just run the following command to see where all the backups of your superblock for the file system in /dev/hda3 are located,

sudo dumpe2fs /dev/hda3 | grep -i superblockThen run a command similar to this one,

sudo e2fsck -b 32768 /dev/hda3Where: '32768' is a block number you received in the output from the previous command.
That should fix it.
If that doesn't work, try again with another backup of the superblock, (a different number).

Regards, Herman. :)

May 10th, 2008, 01:57 AM
I made three separate attempts using the above procedure all to the same result. The first time, it ran with plenty of "Free blocks count wrong" and "Free inodes count wrong" and at the end said that there were still errors. A reboot threw the same superblock error. I tried three more times with different backups. There were still the wrong counts but not the errors at the end. Reboot to same superblock error.

May 10th, 2008, 03:30 AM
I don't know what else you can do to fix your file system from here.
You may need to reformat the partition with a new file system and restore your files from a backup.
I hope you have made a backup.

If you don't have a recent backup of at least your important files, you might want to look at some file recovery programs like TestDisk's PhotoRec.
Ubuntu Rescue Remix (http://ubuntu-rescue-remix.org/) has the programs you need, or you can use your Ubuntu Live CD and install TestDisk in it (good for as long as you keep the LiveCD operating system running), and use PhotoRec that way. You would probably need a USB flash memory or external hard disk to copy the files to.

...unless someone else has an idea to contribute.

Regards, Herman :)

May 10th, 2008, 04:26 PM
Many things are backed up. Some recent data is not. There's not a lot on the drive (5 gig total but under a gig that's important) but I'd rather not loose it if I can.

When I use the Live CD I can see all the files on HDA1 (boot) and HDA3 (home) but it won't let me copy files from there to a USB drive because of permissions. I have a Knoppix disk around here somewhere that I read should be able to work past the permissions issue. If I can't find it I'll have to download a new one and try.

Saving the files will allow me to start from scratch. I'd rather not, though, so if anyone else has any ideas I would really appreciate it.

May 10th, 2008, 09:25 PM
I had a strange experience something like this during one of my test installs of the Beta version of Hardy.
I'm not sure, but I think I was using the 'Alternate' cd and I just ignored the problem because I was mainly concerned with trying out the installer and running it through its paces. For some weird reason a different installation of Ubuntu that the installer wasn't even supposed to have touched had this problem. I tried to fix it with commands already described above, but it didn't work for me either, and since I was in a hurry I just ignored the problem and performed another test install regardless. Again, by another strange co-incidence the problem went away again by itself. :confused:

Maybe you could back up your data first and then try re-installing your /root partition with the 'Alternate' CD for Ubuntu Hardy and see what happens. If you're lucky like I was, it might magically fix the file system in your /home partition at the same time and you won't need the backup. It's a longshot and doesn't seem to make any sense but that's what happened to me.
If it doesn't work you can still reformat the partition and replace all your data from a backup.

Actually, I am very surprised that you can 'see' any data there at all if there are no superblocks that can be read.

Anyhow, since you can 'see' all your data it should be possible to make a backup of it all now.
To back up your data you can either use a sudo command from a terminal in your live cd or you could try to solve the file permissions issue and copy and paste your files.

Here's the way I mount an ext3 file system for a file rescue, Mount a Ubuntu ext3 or reiserfs filesystem (http://users.bigpond.net.au/hermanzone/p10.htm#Mounting_Ubuntu_with_Dapper_Desktop_LiveCD ).

If you mount it like that and you still can't copy and paste your files out, just try chmodding your mount point first, (not the whole file system, as that will damage your /home partition beyond repair). (So do not use the -R option).

sudo chmod 777 /media/ubuntuSee if that fixes it.

Or, it it's your USB device you are having trouble with file permissions for, just chmod the mount point for that as well.

Or, you could just use a 'sudo' command and that should get the job done, for example, something like this,

sudo cp -Rf /media/ubuntu/* /media/disk/Here's a link to my attempt to explian file ownerships and permissions in a way I hope will be easy to understand, File Ownership and Permissions (http://users.bigpond.net.au/hermanzone/p10.htm#File_Ownership_and_Permissions) - fix read, write, execute and ownership issues in case you would prefer to use that approach. :)

May 11th, 2008, 04:33 PM
Well, that didn't go quite as planned. I thought I had backed up things. It had the copy progress bar and no errors and everything but much was not copied for some unknown reason.

I tried reinstalling to the boot partition and it worked but I couldn't get my previous home directory to be the new home directory. It just saw the other drive as another drive. Inconvenient.

So, I redid the whole thing, only to find when I start restoring things that a lot of stuff wasn't backed up. I was able to get Firefox and Thunderbird back, so I didn't loose my bookmarks and email, but picture folders were lost. Music folders were lost. Videos were lost. Three months of book purchases were lost from my database.

All in all, a crappy upgrade. I'm afraid to do the upgrade on my laptop because I have no confidence that it will work. Not good.

May 11th, 2008, 05:01 PM
I just upgraded to 8.04 with the same results: bad superblock reported on two partitions. One is a complete SATA drive and one is a partition on an IDE drive. All other IDE partitions and SATA drives appear to be ok. However, booting with an independent 7.10 on another partition comes up with no problems at all: both are ok. I also tried dropping back to the second kernel (2.6.22-14-386), and that booted up with no errors at all. As one of the reportedly bad partitions is my /home, I am unable to boot to anything but root using the most current kernel (2.6.24, I believe). Can anyone provide a clue as to why the most recent kernel has issues with some of my superblocks, but no other version does?

May 11th, 2008, 07:44 PM
It happened to me again last night too, I had an experimental installation in a USB flash memory stick and I made a backup of it with a 'dd' command. After making another test install I wanted my old install back so I 'dd'ed it back again and tried to run a file system check. (I expected to need a file system check after restoring with 'dd'). The file system check didn't work, same symptoms about the superblock being not found or corrupt. I tried replacing the superblock without success.
Then, remembering my earlier episode, I decided to just try booting the USB anyway. Much to my surprise, it booted without any trouble and after I shut it down I was able to run a file system check in it okay then. "Go Figure" :confused:
I'm really sorry you can't get your files, kordite. I would hate it if that happened to me.
There is still a chance you can recover most of your files if you try running PhotoRec in that partition.
You can run PhotoRec from Ubuntu Rescue Remix, System Rescue CD, GParted LiveCD, or your Ubuntu Live CD if you install TestDisk (temporarily) in it.
You'll probably need a big empty partition to rescue the data to or a blank hard disk or USB disk.
My favorite way to run PhotoRec is to use a USB external hard disk drive with Ubuntu installed in it, because PhotoRec will just copy everything to the /home/username folder and I hate it when it says it ran out of room. You should be able to get at least some of your files back if you try.

May 11th, 2008, 08:13 PM
All in all, a crappy upgrade. I'm afraid to do the upgrade on my laptop because I have no confidence that it will work. Not good.I never was an advocate of either installing with a separate /home partition 'to preserve your data if anything happens', or of the practice of upgrading.

I always advise people to install Ubuntu in a nice single '/ ' partition so you'll have enough disk space for a fresh new Ubuntu install instead of uprading. The idea is, you have time to try the new version out before you transfer your files into it. It only takes a few minutes to transfer files from one partition to another.
The operating system itself only takes up about 1.8 GB of hard disk space, which is less than the extra you need to allow for future expansion when you split your install in two, (root + home), so why not have two installations?

And also, from now on make sure you back up your data to some separate media like another hard drive or to DVDs or something before you do anything to your system that involves disk partitioning or major system changes. :)