PaulStoffregen
Posts: 1
Joined: Sat Nov 30, 2013 2:05 am

Resizing the boot (FAT) partition, not the root (EXT4) one

Sat Nov 30, 2013 2:19 am

Is it possible to resize the FAT formatted boot partition, so that Windows users can easily copy video files onto the SD card?

Please forgive me if this is already answered, and feel free to give me a strongly worded RTFM (with a link please)? I've spent quite a while searching and found mountains of information about resizing the root (EXT format) partition, and info about a EXT filesystem driver for Windows, and even questions from people who tried to create a big FAT data partition (Windows isn't smart enough to recognize more than one FAT partition on a SD card... big surprise, Windows being dumb). I've also found suggestions to play media from a USB stick, rather than the SD card.

The idea seems simple enough, "just" grow the Windows-visible boot partition, then mount it and play whatever media files are present. Maybe this has already been done, but my feeble searching didn't find it? Or maybe there's some technical limitations or gotchas to messing with the boot partition?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Resizing the boot (FAT) partition, not the root (EXT4) o

Sat Nov 30, 2013 1:51 pm

You can do that with parted / gparted running on the RPi.
But it will involve
  1. shrinking the ext4 partition
  2. moving the ext4 partition to the end of the card
  3. expanding the VFAT (type 0x0c) partition
it's ugly.

There are other better ways to do it.
  • Create a new PRIMARY VFAT partition mount that using mount /dev/mmcblk0p4 /media. That way you're not risking the /dev/mmcblk0p1 /boot partition
  • Or would be easier with the RPi booted from one SDCard and the one you're trying to tinker with mounted in a Fuji USB SDCard reader. I often have two SDCards mounted on my RPi. You can umount it, pull the card, fiddle with it using Windows and mount it again (no RPi reboot needed).

    You could even set that up to use the whole SDCard as a single VFAT format (same format as used for a camera).
  • Set up your RPi on your network and share the ext4 filesystem using SAMBA. Windows users can can use

    Code: Select all

    net use \\myrpi.local\home z: /user:pi /password:*****
    to make the RPi into a Z: drive.
    It may be slower than copying directly to the card, but that's a billion times easier.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
jojopi
Posts: 3274
Joined: Tue Oct 11, 2011 8:38 pm

Re: Resizing the boot (FAT) partition, not the root (EXT4) o

Sat Nov 30, 2013 2:09 pm

DougieLawson wrote:Create a new PRIMARY VFAT partition mount that using mount /dev/mmcblk0p4 /media. That way you're not risking the /dev/mmcblk0p1 /boot partition
It has been reported that Windows does not support having multiple FAT partitions on a removable drive. So you may have to copy the boot files to the new partition, delete the old boot partition, and renumber the new one as partition 1. (It does not matter if the partitions are physically out of order.)

Return to “Beginners”