0

After some errors on the many pis I manage with raspbian buster, I had some no space left on device issues and saw that the /boot partition has only 54M /dev/mmcblk0p1 43M 23M 21M 53% /boot. I resized it after having moved and shrinked the / partition with gparted. On resizing the /boot partition gparted threw me an error but seemed to have done something anyways... I now want to resize2fs /dev/mmcblk0p1 but it doesnt' work

sudo resize2fs /dev/mmcblk0p1                                                                                                                    
resize2fs 1.43.4 (31-Jan-2017)                                                                                                                                                                              
resize2fs: Bad magic number in super-block while trying to open /dev/mmcblk0p1                                                                                                                                 
Couldn't find valid filesystem superblock.
Philippe Gachoud
  • 277
  • 3
  • 14

3 Answers3

2

resize2fs will resize ext2,ext3 and ext4 filesystems. Your boot partition is not any of those. It is a vfat. Therefore fatresize is the command to use.

Call me paranoid, but your remark:

gparted threw me an error but seemed to have done something anyways

gave me the idea that something is not going as you planned.

Shrinking the root partition takes room at the end. The /boot is at the beginning. So probably, the /boot and the root partition are still contiguous and therefore, the partition for /boot is probably not enlarged (which might be the error message) and therefore, fatresize will probably do nothing. But that is just based on what I have in my Pis.

Ljm Dullaart
  • 2,539
  • 11
  • 16
1

You have presumably "updated" from a previous release - which is NOT supported.

Buster needs a larger boot partition.

You CAN NOT do this on the Pi although it can be done on a Linux computer.

You should do a fresh install.

If you search this Forum you will find similar questions.

Milliways
  • 62,573
  • 32
  • 113
  • 225
1

Actually, the solution was to resize the boot partition after resizing the slash partition smaller and move it right. Resizing the boot partition needs a

  1. mount partition on /tmp/some_dir
  2. copy data to it cp -rp /mnt/mounted_boot_partition/* /tmp/some_dir/
  3. delete the partition with gparted or any other tool
  4. create a bigger partition with boot flag (am not sure its mandatory)
  5. restore data cp -rp /tmp/some_dir/* /mnt/mounted_boot_partition/
  6. umount sync && /mnt/mounted_boot_partition/
  7. try it!
Philippe Gachoud
  • 277
  • 3
  • 14