Solved

Corrupt ext3 partition on Ubuntu laptop

Posted on 2010-09-15
12
733 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 88

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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

717 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