View: 4603|Reply: 2

SD image with custom partitioning scheme?

[Copy link]

2

threads

4

posts

18

credits

Novice

Rank: 1

credits
18
Published in 2016-4-7 16:42:14 from mobile | Show all floors |Read mode
Is there any way I can create an SD card image with customized partitioning? I'd like to have a card with a small FAT32 partition for purposes of data transfer, but all the downloads I've seen just seem to create a new partition table on the device without giving any choice about layout. I have a desktop linux system available that I could use to perform the partitoning, and have no objections to getting my hands dirty at a low level, but I don't really know enough about how uboot works on these systems to just do it myself.

1

threads

30

posts

159

credits

Registered member

Rank: 2

credits
159
Published in 2016-4-11 21:48:24 | Show all floors
@Jules ... depend on which uboot you are refering.
If we are talking about loboris images, then you can copy the 1st 20MB from that image to something like : loboris-uboot.bin (using dd for example, dd if=loboris.img of=loboris-uboot.bin bs=1024 count=20480).
After that, create your own FAT starting from sector 40960 (512 byte/sector) with your needed size. Then create your ext2/ext4 partition directly after that FAT partition. After you format all of them, copy loboris-uboot.bin to unused area .. dd if=loboris-uboot.bin of=/dev/sdb

(after that you have to copy uImage and script.bin to the FAT partition, and linux rootfs image to the ext partition).

Hope is it helpful.

7

threads

81

posts

317

credits

Intermediate member

Rank: 3Rank: 3

credits
317
Published in 2016-4-7 19:48:04 | Show all floors
@Jules
A graphical tool for repartitioning sdcards on your linux system is gparted.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list