mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
installer: add gpt support.
This commit is contained in:
1
config/rootfiles/installer/parted
Symbolic link
1
config/rootfiles/installer/parted
Symbolic link
@@ -0,0 +1 @@
|
||||
../packages/parted
|
||||
@@ -372,7 +372,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
fclose(handle);
|
||||
|
||||
snprintf(commandstring, STRING_SIZE, "/sbin/sfdisk -L -uM %s < /tmp/partitiontable", hdparams.devnode_disk);
|
||||
if (disk < 2097150) {
|
||||
// <2TB use sfdisk and normal mbr
|
||||
snprintf(commandstring, STRING_SIZE, "/sbin/sfdisk -L -uM %s < /tmp/partitiontable", hdparams.devnode_disk);
|
||||
} else {
|
||||
// >2TB use parted with gpt
|
||||
snprintf(commandstring, STRING_SIZE, "/usr/sbin/parted -s %s mklabel gpt mkpart boot ext2 1M 64M mkpart swap linux-swap 64M 1000M mkpart root ext4 1000M 5000M mkpart var ext4 5000M 100%% disk_set pmbr_boot on", hdparams.devnode_disk);
|
||||
}
|
||||
|
||||
if (runcommandwithstatus(commandstring, ctr[TR_PARTITIONING_DISK]))
|
||||
{
|
||||
errorbox(ctr[TR_UNABLE_TO_PARTITION]);
|
||||
|
||||
Reference in New Issue
Block a user