Fix für das löschen und erstellen von nvme SSD´s keine Partitionen konnten erstellt werden und es wurden keine gelöscht!!!
This commit is contained in:
parent
c671ae454b
commit
4b18f9f424
1 changed files with 979 additions and 958 deletions
25
arch-install
25
arch-install
|
@ -155,26 +155,47 @@ function mountencrypt() {
|
|||
function partioniere() {
|
||||
wipefs -a -f ${device}
|
||||
sgdisk -o ${device}
|
||||
if [ "${m2ssddevice}" == "y" ]; then
|
||||
sgdisk -a 2048 -n ${bootpartitionnummer: -1}::+1024K -c ${bootpartitionnummer: -1}:"BIOS Boot Partition" -t ${bootpartitionnummer: -1}:ef02 ${device}
|
||||
sgdisk -a 2048 -n ${efipartitionnummer: -1}::+1G -c ${efipartitionnummer: -1}:"EFI Boot Partition" -t ${efipartitionnummer: -1}:ef00 ${device}
|
||||
if [ "${swap}" != "n" ]; then
|
||||
sgdisk -a 2048 -n ${swappartitionnummer: -1}::+8G -c ${swappartitionnummer: -1}:"Linux swap" -t ${swappartitionnummer: -1}:8200 ${device}
|
||||
fi
|
||||
sgdisk -a 2048 -n ${rootpartitionnummer: -1}:: -c ${rootpartitionnummer: -1}:"Linux filesystem" -t ${rootpartitionnummer: -1}:8300 ${device}
|
||||
|
||||
else
|
||||
sgdisk -a 2048 -n ${bootpartitionnummer}::+1024K -c ${bootpartitionnummer}:"BIOS Boot Partition" -t ${bootpartitionnummer}:ef02 ${device}
|
||||
sgdisk -a 2048 -n ${efipartitionnummer}::+1G -c ${efipartitionnummer}:"EFI Boot Partition" -t ${efipartitionnummer}:ef00 ${device}
|
||||
if [ "${swap}" != "n" ]; then
|
||||
sgdisk -a 2048 -n ${swappartitionnummer}::+8G -c ${swappartitionnummer}:"Linux swap" -t ${swappartitionnummer}:8200 ${device}
|
||||
fi
|
||||
sgdisk -a 2048 -n ${rootpartitionnummer}:: -c ${rootpartitionnummer}:"Linux filesystem" -t ${rootpartitionnummer}:8300 ${device}
|
||||
|
||||
fi
|
||||
formatencrypt
|
||||
|
||||
}
|
||||
|
||||
function partitionieredual() {
|
||||
if [ "${m2ssddevice}" == "y" ]; then
|
||||
if blkid -s PARTUUID -o value ${device}${rootpartitionnummer}; then
|
||||
echo "entferne partition ${device}${rootpartitionnummer}"
|
||||
sleep 10
|
||||
sleep 5
|
||||
#parted -s ${device} rm ${rootpartitionnummer}
|
||||
sgdisk -d ${rootpartitionnummer: -1} ${device}
|
||||
sync
|
||||
fi
|
||||
sgdisk -a 2048 -n ${rootpartitionnummer: -1}:: -c ${rootpartitionnummer: -1}:"Linux filesystem" -t ${rootpartitionnummer: -1}:8300 ${device}
|
||||
else
|
||||
if blkid -s PARTUUID -o value ${device}${rootpartitionnummer}; then
|
||||
echo "entferne partition ${device}${rootpartitionnummer}"
|
||||
sleep 5
|
||||
#parted -s ${device} rm ${rootpartitionnummer}
|
||||
sgdisk -d ${rootpartitionnummer} ${device}
|
||||
sleep 2
|
||||
sync
|
||||
fi
|
||||
sgdisk -a 2048 -n ${rootpartitionnummer}:: -c ${rootpartitionnummer}:"Linux filesystem" -t ${rootpartitionnummer}:8300 ${device}
|
||||
fi
|
||||
formatencrypt
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue