Alexander iLminsky Posted June 29 Posted June 29 (edited) Good day. I built an image for SDCARD on the rockchip3568 board using the project from here https://github.com/armbian/build This framework creates an image for SDCARD, consisting of two partitions: 1 - boot (Fat32 - 256 MiB) 2 - root file system (ext4) (all remaining capacity on SDCARD, I use a 16GiB card) I need a different, custom, file system partition. How can I make three partitions, for example of these sizes: 1. boot - 256MiB 2. root - 2GiB 3. work - the entire remaining capacity of the SDCARD while the size of the image file is not all 16GiB, but 256MiB (boot) + 2Gib (root) + 256MiB (work) = 2.5GiB and the last partition would take up all the remaining space on the card? I managed to modify two scripts: partitioning.sh and rootfs-to-image.sh and, as I understood, to make the last partition for the entire remaining capacity of the card, when forming the script for marking partitions for sfdisk (in the partitioning.sh file), you do not need to specify the size of the partition, which is what I did. However, the desired result did not work. Can someone help with this problem? Thanks in advance. Edited June 29 by Alexander iLminsky 0 Quote
Solution eselarm Posted June 29 Solution Posted June 29 check those files /usr/lib/systemd/system/armbian-resize-filesystem.service /usr/lib/armbian/armbian-resize-filesystem 0 Quote
tabrisnet Posted 8 hours ago Posted 8 hours ago It's worth noting that you don't have to necessarily change anything in the build process. As long as you plan to not insert partitions in the middle, you can: write the image to the card with parted, resize the root partition to whatever you want make a new partition If you want to have more than 4 partitions total, this works best with GPT partition table, but legacy msdos works too with a little more effort `fsck.ext4 -f /dev/foo` where foo is the root partition `resize2fs /dev/foo` after you have the machine booted, you can then mkfs the new partition [you could probably do it in advance of booting the system too] I do this regularly, b/c I typically only partition about 1/2 or 1/4 of the SD card to leave the rest for wear-leveling. Are you trying to do this as a one-off or are you trying to do it for a dozen or more SBCs of the same type? 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.