fix partitioning
This commit is contained in:
parent
adc20fe055
commit
8f2b909d59
1 changed files with 10 additions and 12 deletions
22
imagesync.sh
22
imagesync.sh
|
|
@ -21,18 +21,16 @@ esac
|
|||
|
||||
disk=/dev/sda
|
||||
|
||||
sfdisk -J /dev/sda << PARTTABLE
|
||||
{
|
||||
"partitiontable": {
|
||||
"label": "dos",
|
||||
"id": "0x2708bc46",
|
||||
"device": "/dev/sda",
|
||||
"unit": "sectors",
|
||||
"partitions": [
|
||||
{"node": "/dev/sda1", "start": 2048, "size": 497664, "type": "83", "bootable": true},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
size_part_1=$((3072 * 1024 * 1024 / 512))
|
||||
|
||||
sfdisk /dev/sda << PARTTABLE
|
||||
label: dos
|
||||
label-id: 0xdeadbeef
|
||||
device: /dev/sda
|
||||
unit: sectors
|
||||
|
||||
/dev/sda1 : start= 2048, size= $size_part_1, type=83
|
||||
PARTTABLE
|
||||
|
||||
mke2fs -t ext4 ${disk}1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue