Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am unable to boot into my Ubuntu system.

First I get that fsck died with exit status 4 Then I try to do it manually as prompted and I get that an Inode has illegal blocks and asked to clear it.

Upon googling, I found that is because my HD has some problems

I booted via Live cd and took a dd of the entire Ubuntu on an external HDD just in case.

Is it safe to clear all the illegal blocks.

How do I safely restore my environment if I replace my HD.

Is there any thing i can do in the meanwhile to continue to use my laptop without significant loss of data.

Perhaps a related error, the x server fails to start

share|improve this question

1 Answer 1

Can you mount the hard disk when booting from the live CD? ie. can you read the files from it. If you can mount the hard disk then do that and back up all the files you care about - that is rather more useful than just a dd of the disk.

Once you have your best possible backup, then go back to the fsck and tell it to clear the illegal blocks. In fact, assuming you are using ext3 (the default ubuntu filesystem) I would use e2fsck with the -p option to just go ahead and fix what it can.

If that doesn't work (you still can't boot), you may want to try badblocks on the disk. This will tell you how much of the disk is ok, though it will take a while. If the number of badblocks isn't too much, you can reformat with mkfs.ext3 -c /dev/sdx which will make sure it doesn't use the bad blocks. Then you need to reinstall, though from memory you may have to use the alternate install disk to install the root filesystem on to a disk without reformatting it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.