Man in a van wrote:
> I think there is a max size of 2gb using this method (unless you go for
> the whole card :))
Oh, I just wanted to go to 100 or 200 MB. Turned out the issue is that
"fdisk -l /dev/mmcblk0" output is different from what "autoresize.sh"
expects. On my installation (RPi3B+, 32 bit), I get
tc@picore1:/var/www/cgi-bin$ fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 29.83 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6859b4ad
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 139263 131072 64M c W95 FAT32 (LBA)
/dev/mmcblk0p2 139264 548863 409600 200M 83 Linux
However, autoresize.sh expects this (from the script's inline
documentation):
# $ fdisk -l
# Disk /dev/mmcblk0: 3724 MB, 3904897024 bytes, 7626752 sectors
# 119168 cylinders, 4 heads, 16 sectors/track
# Units: cylinders of 64 * 512 = 32768 bytes
#
# Device Boot StartCHS EndCHS StartLBA EndLBA
Sectors Size Id Type
# /dev/mmcblk0p1 128,0,1 127,3,16 8192 73727
65536 32.0M c Win95 FAT32 (LBA)
# /dev/mmcblk0p2 128,0,1 639,3,16 73728 172031
98304 48.0M 83 Linux
#
# f 1 f 2 f 3 f 4 f 5
This results in the wrong field being cut by
pcp_fdisk_part2() {
PART2_START=$(fdisk -l $DEVICE | tail -n 1 | sed 's/ */ /g' | cut -d'
' -f 4)
...
Instead of "-f 4", it needs "-f 2" to get the right field with my
output. Also, after resizing fdisk ask whether it should keep the ext4
FS signature on the new partition, which is not reflected in the
commands given by pcp_fdisk_part2(). Manually resizing the partition and
touching /home/tc/resize2fs_part2_required beforehand (followed by "pcp
bu") seems to have worked.
------------------------------------------------------------------------
pputzer's Profile: http://forums.slimdevices.com/member.php?userid=36842
View this thread: http://forums.slimdevices.com/showthread.php?t=113512
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix