Friday, December 3, 2010

Ubuntu update failed and it did not start - the filesystem does not have /sbin/init

I started normal updates through Update Manager for my Ubuntu 10.04 but it failed: just hang up in the middle of it. I had to physically shutdown the machine. And what I was afraid did happened. The Ubuntu failed to start. It did go through grub and then got an error that said.
The target filesystem doesn't have /sbin/init
No init found. Try passing init=bootarg

1. Retart in Recovery Mode
The first I tried to start with RECOVERY MODE that gave me an option to try to automatically fix the error. It did not fix, but it gave me an important information: which disk is having a problem. I have 4 x 1TB disks, one of which is a Window Vista. I needed to know exactly which disk to fix.
fsck from util-linux-ng 2.17.2
/dev/sdd1 contains a file system with errors, check forced.
/dev/sdd1 I***s that were part of a corrupted orphan linked list found.
(i.e., without -a or -p options)
mount all: fsck / [430] terminated with status 4
mount all: Filesystem has errors: /
So, the problem resides in /dev/sdd1.

2. Restart with Live CD and Fix with e2fsck
a. Backup my files.
After booting up with a Live CD, I mounted all drives and backed up my home directory from File System drive to another drive - just in case.
b. Unmount all drives.
Before running e2fsck, I unmounted all drives.
c. Run e2fsck.
$ sudo e2fsck -f -y -v /dev/sdd1
e2fsck 1.41.11 (14-Mar-2010)
Pass 1: Checking iノードs, blocks, and sizes
Pass 2: Checking ディレクトリ structure
Pass 3: Checking ディレクトリ connectivity
Pass 4: Checking reference counts
Pass 5: Checking グループ summary information

  309128 inodes used (0.51%)
     409 non-contiguous files (0.1%)
     329 non-contiguous directories (0.1%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 279193/243
35484518 blocks used (14.68%)
       0 bad blocks
       1 large file

  238984 regular files
   33026 directories
      60 character device files
      26 block device files
       5 fifos
     507 links
   36963 symbolic links (29536 fast symbolic links)
      55 sockets
  309626 files

3. Restart the machine.
It started without problem.

4. Rererences

No comments:

Post a Comment