Skip to main content

Timeline for How to expand FAT32 SD Card Image

Current License: CC BY-SA 4.0

10 events
when toggle format what by license comment
Jan 26, 2024 at 23:33 comment added eyoung100 You misunderstood: edit the /etc/fstab of the system that needs booting. See if you get an error when it mounts as type fat32instead of vfat
Jan 26, 2024 at 23:30 comment added fm_user8 @frostschutz thank you for the suggestion, but I get various errors with fatresize. It says it cannot detect the filesystem of my original sd_card.img, will not resize it because it is "outside of the device ~/sd_card.img" and when I try cp sd_card.img fatresize.img && cat test_zeros >> fatresize.img && fatresize fatresize.img -s 2500M is fails from Assertion (disk != NULL) at libparted/disk.c:1620
Jan 26, 2024 at 22:13 comment added eyoung100 Older versions of parted do not support fs.type=vfat. Try type fat32
Jan 26, 2024 at 22:02 comment added fm_user8 @eyoung100 yes, it does mention updating fstab, but this SD card is used to boot another device so the local fstab would not apply. After booting the other device, that device mounts the SD card, so maybe something on that device needs to be changed in some fashion, though from what I have seen it is automounted so the size seems to be set automatically. mount on that device shows: /dev/mmcblk0p1 on /run/media/mmcblk0p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Jan 25, 2024 at 20:07 comment added eyoung100 Knowing it is headless does help. After the partition table looks the way you want resizepart1 100% is correct, along with quit which should save the changes. Did you receive any status message from parted about updating fstab? See here
Jan 25, 2024 at 20:01 comment added frostschutz @fm_user8 gparted is a software on its own, not merely a frontend to parted. parted no longer resizes filesystems; resizepart merely resizes the partition. you can either use a very old version of parted that still resizes fat32 on its own (resize command instead of resizepart); or try a different tool like fatresize.
Jan 25, 2024 at 19:16 comment added fm_user8 A main point of divergence is that the only Linux machine I can insert an SD card into is headless so I can only ssh into it and I am not looking to set up an x11 session of some sort. That is why my question and responses all involve parted, rather than GParted. But parted is part of GParted so the same operations should work. I updated my question with details on how following your steps went. As mentioned previously, it is for some reason not working as expected.
Jan 25, 2024 at 17:30 history edited eyoung100 CC BY-SA 4.0
Reworded Confusion
Jan 25, 2024 at 17:10 history edited eyoung100 CC BY-SA 4.0
Reworded
Jan 25, 2024 at 17:03 history answered eyoung100 CC BY-SA 4.0