Solved

Corrupt ext3 partition on Ubuntu laptop

Posted on 2010-09-15
12
722 Views
Last Modified: 2012-05-10
Hi,

I have a problem with a corrupt disk on an Ubuntu laptop. When the machine attempts to boot, GRUB throws error 24 - unable to boot when kernel not loaded (I think).

I have also tried booting from a USB stick and running fsck against the partitions, on both sda1 & 2 fsck errors asking whether this is a zero length partition.

I hope there's some other tool I can use to restore the data as there's some important stuff on this machine - this is a high priority problem so assigning maximum points.

Fingers crossed!!

Thanks

George
0
Comment
Question by:georgemason
  • 4
  • 2
  • 2
  • +2
12 Comments
 
LVL 6

Expert Comment

by:collins23
ID: 33680475
what is the result of fdisk -l when you boot from the USB ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 33680704
First of all boot the PC with the UBCD and run the HD manufacturer's diagnostic utility on it. Some errors it may be able to fix, but if there are too many or they are too serious, it'll tell you to replace it, which you should then do.

http://ultimatebootcd.com
0
 
LVL 6

Expert Comment

by:collins23
ID: 33680722
http://www.linuxquestions.org/questions/linux-hardware-18/fsck-could-this-be-a-zero-length-partition-508099/

If your hard disk is partitioned , and its only one partition that is damaged, you will be able to salvage date from the partitions that are fine using a livecd.
0
 
LVL 35

Assisted Solution

by:torimar
torimar earned 500 total points
ID: 33680976
Please get the Parted Magic Live CD ( www.partedmagic.com ), boot the laptop off it and see if that rescue system will let you access some or all of your data.
If not so, run TestDisk, which you will find among the system utilities on that CD. Here's how to run TestDisk:
http://www.cgsecurity.org/wiki/Running_TestDisk
And here's how to use it to look for backup superblocks on Ext2/Ext3:
http://www.cgsecurity.org/wiki/Advanced_Find_ext2_ext3_Backup_SuperBlock

You could also use the Parted Magic Live CD to create a sector by sector clone of your failing drive with 'dd' or 'ddrescue'. See "Disk Duplication" on the bottom of this page: http://www.cgsecurity.org/wiki/Damaged_Hard_Disk
This way you would have a clone of your data to try recovery tools on even after your disk has finally turned unusable.

If all else fails, you may have to recur to R-Linux from R-tools Technology: http://www.r-tt.com/data_recovery_linux/
It is a free program, however it requires to be run from Windows, so you'd have to hook your laptop drive up to another system via a SATA-USB enclosure.
0
 
LVL 2

Expert Comment

by:prince_ban
ID: 33681179
Well,. refrain from using any tools other than opensource,can use gparted for getting partition info.

Well, the GRUB error means that

http://www.uruk.org/orig-grub/errors.html

GRUB unable to recognize your partition info, means corrupted superblocks, well i have one way that could save the asses here:


Try installing another OS , a bit away from corrupted sectors & try rebooting the machine ,any case ,
If you dropping down to GRUB shell:

1. press tab to see if you are getting GRUB kernel parameter options.
2. then type "root (hd0,0)
3. type "setup (hd0)

See if the corrupted MBR is getting re-written so that partition info in recognized.
reboot the machine and see if the corrupted partition can be accessed or corrected by above mentioned tools.

Regards
Prasoon
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Accepted Solution

by:
georgemason earned 0 total points
ID: 33735303
Thank you all for your comments. After some research I realised that the problem might be a corrupt superblock. I found out that ext3 stores copies of the superblock at various locations around the disk, so decided to try running fsck using one of those. I did the following to solve my problem:

1. Created a USB stick with a bootable Ubuntu installation using usb-creator
2. Booted from the stick and tried to mount the partition - got the error mentioned in the OP - zero length partition?
3. Listed all backup superblocks on the partition
4. Ran fsck using a backup superblock

After two runs, the partition came up clean and I was able to mount it.

 This page was very very helpful:  http://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/

Thanks to all that posted by the solution in the end was something I found for myself so am requesting the closure of this question.
0
 
LVL 35

Expert Comment

by:torimar
ID: 33743172
"The solution was something other than suggested by the experts."

I'm sorry to object, but this is simply not quite correct.
You solved the problem by listing backup superblocks and then repairing the partition using one of them with fsck. I suggested to do just that. The program I recommended for getting a list of the superblocks is TestDisk; I then linked to a resource on the TestDisk homepage which explains how to use such a backup superblock with fsck: http://www.cgsecurity.org/wiki/Advanced_Find_ext2_ext3_Backup_SuperBlock

Though the method you used is slightly different, the principle remains exactly the same. Following my advice you would have arrived at an identical solution. If instead you chose to ignore my comment to begin with, you are of course free to do so, however, that should not mean that a valid solution posted in a thread you initiated may also be passed over when it comes to closing said thread.

It's completely up to you to decide how valuable my contribution to this issue has been, but ignoring it entirely is neither correct nor just.
0
 
LVL 35

Expert Comment

by:torimar
ID: 33764620
The only person able to evaluate contributions adequately is, of course, the original author. Unfortunately, he has not posted back since my objection, hence must be deemed no longer interested.

Which leaves it to me to make the following recommendation:
Split points between asker's final comment: http://www.experts-exchange.com/OS/Linux/Q_26474224.html#33735303 and torimar's comment: http://www.experts-exchange.com/OS/Linux/Q_26474224.html#33680976
0
 
LVL 1

Author Comment

by:georgemason
ID: 33779306
Apologies for not responding to this thread - it seems my smtp gateway is blocking EE mails.

I have no objection to the question being closed as suggested by torimar. Apologies to have not used your solution but I found the other solution whilst searching for a way around my problem and since I had the tools to hand it was a simple fix.  

However I have no objection to the points being split as mentioned above. Thanks to all for your comments.
0
 
LVL 35

Expert Comment

by:torimar
ID: 33779479
Thank you, georgemason and _alias99
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now