Gagal Boot Setelah Resize Partisi Linux Mint

Ini pengalaman yang sangat berharga saat melakukan resize partisi pada partisi root (/) di linux. Berikut kira-kita error yang tampil saat proses booting:

...[sdb]  No Caching mode page found...[sdb]  Assuming drive cache: write through
... Wrong diagnostic page
... Failed to bind enclosure -19
Wellcome to emergency mode! After logging in, type "journalctl -xb" to view ...

Berikut langkah untuk memperbaikinya:

  • Firstly, boot into a live CD or USB
  • Find out your partition number by using
sudo fdisk -l|grep Linux|grep -Ev 'swap'
  • Then, list all superblocks by using the command:
sudo dumpe2fs /dev/sda2 | grep superblock

Replace sda2 to your drive number

You should get a similar output like this

Primary superblock at 0, Group descriptors at 1-6 
Backup superblock at 32768, 
Group descriptors at 32769-32774 Backup superblock at 98304, 
Group descriptors at 98305-98310 Backup superblock at 163840, 
Group descriptors at 163841-163846 Backup superblock at 229376, 
Group descriptors at 229377-229382 Backup superblock at 294912, 
Group descriptors at 294913-294918 Backup superblock at 819200, 
  • Choose an alternate superblock from this list, for this case alternate superblock # 32768

Now, to check and repair a Linux file system using alternate superblock # 32768:

sudo fsck -b 32768 /dev/sda2 -y

The -y flag is used to skip all the Fix? questions and to answer them all with a yes automatically

You should get similar output like this:

fsck 1.40.2 (12-Jul-2007) e2fsck 1.40.2 (12-Jul-2007) /dev/sda2 was not cleanly unmounted, check forced. 
Pass 1: Checking inodes, blocks, and sizes 
Pass 2: Checking directory structure 
Pass 3: Checking directory connectivity 
Pass 4: Checking reference counts 
Pass 5: Checking group summary information Free blocks count wrong for group #241 (32254, counted=32253). 
Fix? yes Free blocks count wrong for group #362 (32254, counted=32248). 
Fix? yes Free blocks count wrong for group #368 (32254, counted=27774). 
Fix? yes .......... /dev/sda2: 
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
  • Now try mounting the partition
sudo mount /dev/sda2 /mnt
  • Now, try to browse the filesystem with the following commands
cd /mnt 
mkdir test 
ls -l cp file /path/to/safe/location
  • If you are able to perform the above commands, you have most probably fixed your error.
  • Now, restart you computer and you should be able to boot normally.




Leave a comment

Your email address will not be published. Required fields are marked *