Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .