Add autopart support of nvme disk
This commit is contained in:
parent
dd42259081
commit
3cb3bfc2fe
1 changed files with 36 additions and 12 deletions
48
archfi
48
archfi
|
@ -243,9 +243,15 @@ diskpartautodos(){
|
||||||
sleep 1
|
sleep 1
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"1"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=$device"2"
|
bootdev=$device"p1"
|
||||||
rootdev=$device"3"
|
swapdev=$device"p2"
|
||||||
|
rootdev=$device"p3"
|
||||||
|
else
|
||||||
|
bootdev=$device"1"
|
||||||
|
swapdev=$device"2"
|
||||||
|
rootdev=$device"3"
|
||||||
|
fi
|
||||||
efimode="0"
|
efimode="0"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -277,9 +283,15 @@ diskpartautogpt(){
|
||||||
sgdisk $device -n=4:0:0
|
sgdisk $device -n=4:0:0
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"2"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=$device"3"
|
bootdev=$device"p2"
|
||||||
rootdev=$device"4"
|
swapdev=$device"p3"
|
||||||
|
rootdev=$device"p4"
|
||||||
|
else
|
||||||
|
bootdev=$device"2"
|
||||||
|
swapdev=$device"3"
|
||||||
|
rootdev=$device"4"
|
||||||
|
fi
|
||||||
efimode="0"
|
efimode="0"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -309,9 +321,15 @@ diskpartautoefi(){
|
||||||
sgdisk $device -n=4:0:0
|
sgdisk $device -n=4:0:0
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"1"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=$device"3"
|
bootdev=$device"p1"
|
||||||
rootdev=$device"4"
|
swapdev=$device"p3"
|
||||||
|
rootdev=$device"p4"
|
||||||
|
else
|
||||||
|
bootdev=$device"1"
|
||||||
|
swapdev=$device"3"
|
||||||
|
rootdev=$device"4"
|
||||||
|
fi
|
||||||
efimode="1"
|
efimode="1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -341,9 +359,15 @@ diskpartautoefiusb(){
|
||||||
echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk $device
|
echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk $device
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"1"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=
|
bootdev=$device"p1"
|
||||||
rootdev=$device"4"
|
swapdev=
|
||||||
|
rootdev=$device"p4"
|
||||||
|
else
|
||||||
|
bootdev=$device"1"
|
||||||
|
swapdev=
|
||||||
|
rootdev=$device"4"
|
||||||
|
fi
|
||||||
efimode="2"
|
efimode="2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue