diff options
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index 8d21dd1f58..0ac4949355 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh | |||
@@ -84,9 +84,9 @@ disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | s | |||
84 | swap_size=$((disk_size*swap_ratio/100)) | 84 | swap_size=$((disk_size*swap_ratio/100)) |
85 | rootfs_size=$((disk_size-boot_size-swap_size)) | 85 | rootfs_size=$((disk_size-boot_size-swap_size)) |
86 | 86 | ||
87 | rootfs_start=$((boot_size + 1)) | 87 | rootfs_start=$((boot_size)) |
88 | rootfs_end=$((rootfs_start+rootfs_size)) | 88 | rootfs_end=$((rootfs_start+rootfs_size)) |
89 | swap_start=$((rootfs_end+1)) | 89 | swap_start=$((rootfs_end)) |
90 | 90 | ||
91 | # MMC devices are special in a couple of ways | 91 | # MMC devices are special in a couple of ways |
92 | # 1) they use a partition prefix character 'p' | 92 | # 1) they use a partition prefix character 'p' |
@@ -113,13 +113,13 @@ echo "Creating new partition table on /dev/${device} ..." | |||
113 | parted /dev/${device} mklabel msdos | 113 | parted /dev/${device} mklabel msdos |
114 | 114 | ||
115 | echo "Creating boot partition on $bootfs" | 115 | echo "Creating boot partition on $bootfs" |
116 | parted /dev/${device} mkpart primary 1 $boot_size | 116 | parted /dev/${device} mkpart primary 0% $boot_size |
117 | 117 | ||
118 | echo "Creating rootfs partition on $rootfs" | 118 | echo "Creating rootfs partition on $rootfs" |
119 | parted /dev/${device} mkpart primary $rootfs_start $rootfs_end | 119 | parted /dev/${device} mkpart primary $rootfs_start $rootfs_end |
120 | 120 | ||
121 | echo "Creating swap partition on $swap" | 121 | echo "Creating swap partition on $swap" |
122 | parted /dev/${device} mkpart primary $swap_start $disk_size | 122 | parted /dev/${device} mkpart primary $swap_start 100% |
123 | 123 | ||
124 | parted /dev/${device} print | 124 | parted /dev/${device} print |
125 | 125 | ||