Quote:
Originally Posted by auspex
Well, a smart design would be to create the two fixed size partitions and then create the FAT partition to use the 'remainder' - which any linux partitioning tool can do, and from Gergith's post would seem to be what actually happens.
|
And unfortunately, as I said, I have no memory of anyone reporting they did a factory reset after the replacing the SD card with a larger one. That is why I asked the question.
But, I should have checked myself. I had my Glo apart a little while ago and took a copy of the recoveryfs. The rcS script is run to do the recovery. The lines needed are:
Code:
mount /dev/mmcblk0p3 /mnt/user
echo 3 > /proc/sys/vm/drop_caches; sleep 2
[ -e /mnt/user/.kobo/KoboRecovery.tgz ] && ( zcat /mnt/user/.kobo/KoboRecovery.tgz > /dev/null && tar zvxf /mnt/user/.kobo/KoboRecovery.tgz -C /upgrade && rm -rf /mnt/user/.kobo/KoboRecovery.tgz )
umount /mnt/user && sync && sync
/etc/init.d/upgrade-generic.sh $UBOOT TOTALLY_NOT_USED /upgrade/$PLATFORM/uImage mmcblk0
echo 3 > /proc/sys/vm/drop_caches; sleep 2
mkfs.ext4 -L rootfs -m 0 /dev/mmcblk0p1 && sync && sync
mkfs.vfat -n KOBOeReader /dev/mmcblk0p3 && sync && sync
mount -o norelatime,noatime,nodiratime /dev/mmcblk0p1 /mnt/root
echo 3 > /proc/sys/vm/drop_caches; sleep 2
( zcat /upgrade/fs.tgz > /dev/null && tar zvxf /upgrade/fs.tgz -C /mnt/root) || reboot
umount /mnt/root && sync && sync
Unless I am reading this wrong, the "mkfs.vfat" is only reformatting the partition without changing the partition size. That means the partition size needs to be changed to fill the SD card but the factory reset can be used to recreate the filesystem to fill the partition.
An interesting thing in this code is that Kobo have a mechanism to change factory reset firmware.