Page 1 of 1

usb_inst.sh creates partition starting at sector 1

Posted: 10 Nov 2014, 13:36
by skoehler
I just used usb_inst.sh to install systemrecuecd on my USB stick. It creates a FAT32 partition starting at sector one. See this proof:

Code: Select all

# fdisk -l /dev/sdb

Disk /dev/sdb: 15 GiB, 16039018496 bytes, 31326208 sectors
Units: Sektoren 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: 0x000007cc

Gerät     Boot Start      Ende   Blocks  Id System
/dev/sdb1 *        1  31326207 15663103+  c W95 FAT32 (LBA)


That's not really state of the start. Please following the standard partitioning guide lines and let the partition start at sector 2048 (1MB). This particular important as people may continue using their drives as partitioned by the usb_inst.sh script. Unaligned partition on USB sticks are just as bad as they are on SSD drives or SD cards.

Note that many Sandisk SD cards come partitioned in a way such that the first partition starts at sector 8192 instead of 2048. So you may consider using 8192 instead of 2048.

Re: usb_inst.sh creates partition starting at sector 1

Posted: 10 Nov 2014, 14:32
by skoehler
Fixing this is easy. Just change the mkpart command in usb_inst.sh to either

Code: Select all

mkpart primary fat32 1MiB 100%
or

Code: Select all

mkpart primary fat32 4MiB 100%
.

Re: usb_inst.sh creates partition starting at sector 1

Posted: 24 Dec 2014, 23:13
by skoehler
Any chance this will be fixed?