0

I recently installed Windows and Arch linux on dual boot. I left 512MB of empty space for windows to create the boot partition in, but it only used 100MB. Now I need more space in the boot partition so I resized the partition using cfdisk, but as expected, that didn't resize the file system.

The EFI boot partition (/dev/sda2) is formatted as fat32, as shown by parted.

$ sudo parted /dev/sda2
(parted) print                                                            
Model: Unknown (unknown)
Disk /dev/sda2: 512MiB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start    End     Size    File system  Flags
 1      0.00MiB  512MiB  512MiB  fat32

But when I try to use fatresize, it complains about the partition format.

$ sudo fatresize -s 512M /dev/sda2
fatresize 1.1.0 (20200405)
Error: /dev/sda2 is not valid FAT16/FAT32 partition.

So how can I resize the file system? I would rather not have to reinstall windows.

5
  • 1
    If you just want to get the job done and don't care about understanding the issue, just copy all files from the partition, mkfs a new FAT32 and copy files back.
    – gronostaj
    Apr 13, 2021 at 10:41
  • @gronostaj thanks! So just copy/pasting the files out and back in shouldn't affect the boot? And do I need to regenerate the fstab? Apr 13, 2021 at 10:45
  • 1
    Yes. Unlike BIOS, UEFI is purely file-based. There are no bootsectors etc. You may have to update fstab entries if you're mounting the partition using filesystem's ID.
    – gronostaj
    Apr 13, 2021 at 11:28
  • I just did it, everything went smoothly, I just had to update the uuid of sda2 in the fstab (and I regenerated grub.cfg just in case) Apr 13, 2021 at 11:31
  • 1
    Great! I don't think my comments are detailed enough to post a proper answer, but feel free to do it yourself. Self-answering is welcome here if you've managed to solve your problem.
    – gronostaj
    Apr 13, 2021 at 11:34

0

Your Answer

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

Browse other questions tagged or ask your own question.