change "/dev/sda" to /dev/sda

This commit is contained in:
Suikan 2021-06-29 10:10:29 +09:00
parent 8dc44c9485
commit 201535790e

View file

@ -67,7 +67,7 @@ if [ ${ERASEALL} -eq 1 ] ; then
# Assign specified space and rest of disk to the EFI and LUKS partition, respectively. # Assign specified space and rest of disk to the EFI and LUKS partition, respectively.
if [ ${ISEFI} -eq 1 ] ; then if [ ${ISEFI} -eq 1 ] ; then
# Zap existing partition table and create new GPT # Zap existing partition table and create new GPT
echo "...Initialize \"${DEV}\" with GPT." echo "...Initialize ${DEV} with GPT."
sgdisk --zap-all "${DEV}" sgdisk --zap-all "${DEV}"
# Create EFI partition and format it # Create EFI partition and format it
echo "...Create an EFI partition on ${DEV}." echo "...Create an EFI partition on ${DEV}."
@ -75,16 +75,16 @@ if [ ${ERASEALL} -eq 1 ] ; then
echo "...Format the EFI parttion." echo "...Format the EFI parttion."
mkfs.vfat -F 32 -n EFI-SP "${DEV}${EFIPARTITION}" mkfs.vfat -F 32 -n EFI-SP "${DEV}${EFIPARTITION}"
# Create Linux partition # Create Linux partition
echo "...Create a Linux partition on \"${DEV}\"." echo "...Create a Linux partition on ${DEV}."
sgdisk --new=${CRYPTPARTITION}:0:0 --change-name=${CRYPTPARTITION}:"Linux LUKS" --typecode=${CRYPTPARTITION}:8309 "${DEV}" sgdisk --new=${CRYPTPARTITION}:0:0 --change-name=${CRYPTPARTITION}:"Linux LUKS" --typecode=${CRYPTPARTITION}:8309 "${DEV}"
# Then print them # Then print them
sgdisk --print "${DEV}" sgdisk --print "${DEV}"
else else
# Zap existing partition table # Zap existing partition table
echo "...Erase partition table of \"${DEV}\"." echo "...Erase partition table of ${DEV}."
dd if=/dev/zero of=${DEV} bs=512 count=1 dd if=/dev/zero of=${DEV} bs=512 count=1
# Create MBR and allocate max storage for Linux partition # Create MBR and allocate max storage for Linux partition
echo "...Create a Linux partition on \"${DEV}\" with MBR." echo "...Create a Linux partition on ${DEV} with MBR."
sfdisk ${DEV} <<HEREDOC sfdisk ${DEV} <<HEREDOC
2M,,L 2M,,L
HEREDOC HEREDOC