1 (edited by mfleetwo 2023-10-30 23:25:01)

Topic: Can't resize Ubuntu Filesystem Partition

I am trying to resize my Ubuntu 22.04 Filesystem Partition of original size ~245GB (lot more than required) and now I wanted it to resize to 35GB.
I have booted from Ubuntu ISO on usb and tried to do it using GParted but I have encountered this error.
I have run the command mentioned https://i.ibb.co/nrfyHXx/IMG-20231029-164932.jpg

Edit: Correct URL to image [mfleetwo]

2

Re: Can't resize Ubuntu Filesystem Partition

The screen shot shows this:

Shrink /dev/sdb2 from 244.14 GiB to 35.00 GiB

> calibrate /dev/sdb2

> check file system on /dev/sdb2 for errors and (if possible) fix them

v shrink file system
  v resize2fs -p '/dev/sdb2' 36700160K
      Resizing the filesystem on /dev/sdb2 to 9175040 (4k) blocks.
      Begin pass 2 (max = 1132003)
      Relocating blocks      XXXXXXXXXXXXXXXXXXXXXXXXXXXXX-----------

      resize2fs 1.46.5 (30-Dec-2021)
      resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev
      Please run 'e2fsck -fy /dev/sdb2' to fix the filesystem
      after the aborted resize operation.

3

Re: Can't resize Ubuntu Filesystem Partition

As the error message from resize2fs says check the file system for errors.  Run this from your booted Ubuntu ISO:

sudo e2fsck -fy /dev/sdb2