( so twice in 2 days, GParted has not left my partition/filesystem
in good shape.
The first time, i'm not sure how I fixed it. It seemed
running GParted and increasing the recently decreased partition size
rectified itself but this is what I did today with gparted.
)
I have several partitions on my one hard drive.
I have LucidLynx on /dev/sda5 and on a following, adjacent partition,
/dev/sda8, I have a recently installed (yesterday) PrecisePangolin
installation.
Today, I wanted to shrink /dev/sda5 by 4 GB and give it to /dev/sda8
using GParted.
I booted up PrecisePangolin, on /dev/sda8, and
using GParted, I shrank /dev/sda5 by 4 GB, and applied the changes.
Rebooted.
Chose from Grub to boot up /dev/sda5.
That failed, I got kicked out to that intraramfs prompt, or something like that.
I then boot up my PrecisePangolin, and tried to mount /dev/sda5, I get
this from `dmesg`:
EXT4-fs (sda5): bad geometry:
block count 3586958 exceeds size of device (2560142 blocks)
With 4096 byte blocks, "3586958" represents the old size of /dev/sda5 of 14 GB, and "2560142" represents the new smaller size of /dev/sda5 at 10 GB.
So GParted, altered something correctly, the MBR, I imagine,
cause `sudo fdisk -l` shows the correct resized entry:
Device Boot Start End Blocks Id System
/dev/sda5 4289418 24770559 10240571 83 Linux
(this is shown in 1024 byte size blocks: "10240571" = 10 GB)
I've Googled around, and there seems to be no clear answer on how to
fix this and it does appear to be close to rocket science.
Here are a few commands that I tried:
$ sudo resize2fs -f /dev/sda5
resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on /dev/sda5 to 2560142 (4k) blocks.
resize2fs: Can't read an block bitmap while trying to resize /dev/sda5
Please run 'e2fsck -fy /dev/sda5' to fix the filesystem
after the aborted resize operation.
$
$ sudo e2fsck -f /dev/sda5
e2fsck 1.42 (29-Nov-2011)
The filesystem size (according to the superblock) is 3586958 blocks
The physical size of the device is 2560142 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes
$
Help!
Bookmarks