Skip to content

Commit 2b360c3

Browse files
committed
[devices]: Fix arista-convertfs for aligning flash via sfdisk in Jessie (sonic-net#2402)
The sfdisk in Jessie use unit Cylinder by default. To perform 1M aligning partition, 2048 sector unit is desirable instead.
1 parent 1a84813 commit 2b360c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

files/initramfs-tools/arista-convertfs.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ umount "$root_mnt"
170170

171171
# Create a new partition table (content in flash_dev will be deleted)
172172
err_msg="Error: repartitioning $flash_dev failed"
173-
cmd="echo '2048' | sfdisk $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
173+
cmd="echo '2048' | sfdisk -u S --force $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
174174
run_cmd "$cmd" "$err_msg"
175175

176176
sleep 5

0 commit comments

Comments
 (0)