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.
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.

| improve this answer | |
  • thx, see my complete answer, at the end donno if its about gparted version I have but had to delete/recreate/restore-data for the /boot partition – Philippe Gachoud Aug 13 at 23:40
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.

| improve this answer | |
  • Of course, but if you have hours configuring an image it worths doing an update and grow the boot partition.... I cannot afford doing a new image every time a new release gets out.... but thx, I saw it too! – Philippe Gachoud Aug 13 at 23:35
  • 1
    @PhilippeGachoud New OS are only released every 2 years or so (Raspbian is on its 4th release since 2012) and it takes longer to "fix" than a fresh install, but if you want to do this see raspberrypi.stackexchange.com/a/114556/8697 – Milliways Aug 14 at 0:03
0

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!
| improve this answer | |
  • Please mark the answer as the accepted one with a click on the tick on its left side. That prevents your Question from being shown as a unsolved Post to the community and saves them/us a lot of work. – Ingo Aug 18 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.