[Solved] Problems resizing FAT16 boot partition

Post Reply
joelnet
Posts: 23
Joined: Thu Mar 19, 2015 5:16 am
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

[Solved] Problems resizing FAT16 boot partition

Post by joelnet »

Distribution: ubuntu-16.04.3-minimal-odroid-c1-20170914.img

This distro creates a 128MB boot partition. I am having problems following the directions (ODROID-C1 mainline (experimental!)) at https://github.com/umiddelb/armhf/wiki/ ... ARM-device

This kernel produces over 500 files, which I am unable to copy to /media/boot. Though I have enough space, I believe I am being limited by the number of files.

I have attempted to resize the boot partition using gparted by:
* shift beginning of /dev/sdc2 by 128MB.
* grow /dev/sdc1 to a total of 256MB.
* apply all operations

But I get errors when trying to grow the partition:

Code: Select all

- grow file system to fill the partition
    using libparted
- libparted messages
    GNU Parted cannot resize this partition to size. We're working on it!
Then I tried the method here (https://learn.adafruit.com/resizing-ras ... partitions), delete and recreate the partition. But I couldn't get it to boot after.

How can I reformat this partition as FAT32 or resize the partition?

My goal is to just modify the /media/boot partition so it will allow the 500+ files to be created.

Cheers!
Last edited by joelnet on Wed Jan 24, 2018 2:23 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 36385
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1431 times
Been thanked: 980 times
Contact:

Re: Problems resizing FAT16 boot partition

Post by odroid »

Refer this default partition table.
https://wiki.odroid.com/odroid-c1/softw ... tion_table

Did you have no issue when you shift/resize the EXT4 partition?
Did you run gparted on your Linux PC?

joelnet
Posts: 23
Joined: Thu Mar 19, 2015 5:16 am
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Problems resizing FAT16 boot partition

Post by joelnet »

Okay, does this mean the partition must be FAT16 (and not FAT32) based on that default partition table link?

resizing the EXT4 is successful. resizing the FAT16 half works. The FAT16 partition is resized, but it doesn't grow to fill the partition. The system will boot up, so there doesn't seem to be any corruption, but /media/boot remains at 128MB instead of the full 256MB partition.

I am using gparted on a separate linux pc with the odroid's micro sd plugged with a usb converter.

joelnet
Posts: 23
Joined: Thu Mar 19, 2015 5:16 am
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Problems resizing FAT16 boot partition

Post by joelnet »

I think I have this figured out.

Some things that got me:
* I had to boot the device at least once before modifying the partitions. Dunno why.
* Can't resize FAT partitions. Just have to delete and recreate them.
* the FAT16 partition (boot) could only hold 164 maximum files.

This is what I did:

Fire up the device after a fresh install of the image. Turn off. Pull microsd and put in USB stick on Linux desktop.

Code: Select all

# backup files on boot
find /media/joel/boot -type f -printf "%f\n" | xargs tar cf boot.tar -C /media/joel/boot

# unmount
sudo umount /media/joel/boot

# format FAT32
sudo mkfs.fat -F32 -v -I -n "boot" /dev/sdc1

# mount
sudo mount /dev/sdc1 /media/joel/boot

# copy files back to boot
sudo tar -xvf boot.tar -C /media/joel/boot

User avatar
odroid
Site Admin
Posts: 36385
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1431 times
Been thanked: 980 times
Contact:

Re: [Solved] Problems resizing FAT16 boot partition

Post by odroid »

In the first booting process, the OS runs its own rootfs resizing task.

Anyway, good to hear you successfully resized the boot partition.

meikuam
Posts: 1
Joined: Sat Dec 12, 2020 12:48 am
languages_spoken: english, russian
ODROIDs: orangepi PC 2
Has thanked: 0
Been thanked: 0
Contact:

Re: [Solved] Problems resizing FAT16 boot partition

Post by meikuam »

joelnet solution works for me, except we should change flag for printf:

Code: Select all

find /media/user/BOOT -type f -printf "%P\n" | xargs tar cf boot.tar -C /media/user/BOOT

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 5 guests