fix some bugs
This commit is contained in:
parent
f4d60437b3
commit
07d41cf835
@ -29,7 +29,7 @@ echo
|
|||||||
echo === setup partitions
|
echo === setup partitions
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run "applly partion table" "sfdisk $DISK <<./sfdisk"
|
run "applly partion table" "sfdisk $DISK <./elfLaptop.sfdisk"
|
||||||
|
|
||||||
echo -n "disk encryption password: "
|
echo -n "disk encryption password: "
|
||||||
read -s PASS
|
read -s PASS
|
||||||
@ -44,7 +44,7 @@ if [ "$PASS" != "$PASSRE" ]; then
|
|||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run "format boot partition" "mkfs.fat ${DISK}1"
|
run "format boot partition" "mkfs.fat -F 32 ${DISK}1"
|
||||||
run "format swap partition" "mkswap ${DISK}2"
|
run "format swap partition" "mkswap ${DISK}2"
|
||||||
echo -n "$PASS" >keyfile.luks
|
echo -n "$PASS" >keyfile.luks
|
||||||
run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${DISK}3" "rm keyfile.luks"
|
run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${DISK}3" "rm keyfile.luks"
|
||||||
@ -68,9 +68,7 @@ echo
|
|||||||
|
|
||||||
run "install base of arch" "pacstrap /mnt base linux linux-firmware grub efibootmgr"
|
run "install base of arch" "pacstrap /mnt base linux linux-firmware grub efibootmgr"
|
||||||
run "intall utitlities" "pacstrap /mnt btrfs-progs man vim"
|
run "intall utitlities" "pacstrap /mnt btrfs-progs man vim"
|
||||||
|
run "generate fstab" "genfstab -U /mnt >>/mnt/etc/fstab"
|
||||||
echo "generate fstab"
|
|
||||||
genfstab -U /mnt >>/mnt/etc/fstab
|
|
||||||
run "copy in-root script" "cp in-root.sh /mnt/root"
|
run "copy in-root script" "cp in-root.sh /mnt/root"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
@ -31,10 +31,10 @@ echo "127.0.0.1 localhost" >/etc/hosts
|
|||||||
echo "::1 localhost" >>/etc/hosts
|
echo "::1 localhost" >>/etc/hosts
|
||||||
echo "127.0.1.1 $HOSTNAME" >>/etc/hosts
|
echo "127.0.1.1 $HOSTNAME" >>/etc/hosts
|
||||||
|
|
||||||
run "config initramfs" "sed --in-place -e 's/HOOKS=(.*)/HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)/' /etc/mkinitcpio.conf"
|
run "config initramfs" "sed --in-place -e 's/HOOKS=(.*)/HOOKS=(base udev autodetect microcode modconf kms keyboard block encrypt filesystems fsck)/' /etc/mkinitcpio.conf"
|
||||||
run "generate initramfs" "mkinitcpio -P"
|
run "generate initramfs" "mkinitcpio -P"
|
||||||
|
|
||||||
DISKUUID=$(blkid --output export ${DISK}10 | grep '^UUID' | sed 's/UUID=//')
|
DISKUUID=$(blkid --output export ${DISK}3 | grep '^UUID' | sed 's/UUID=//')
|
||||||
run "run grub-install" "grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot"
|
run "run grub-install" "grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot"
|
||||||
run "grub: enable crypt disk" "sed --in-place -E -e 's/#?GRUB_ENABLE_CRYPTODISK=(.*)/GRUB_ENABLE_CRYPTODISK=y/' /etc/default/grub"
|
run "grub: enable crypt disk" "sed --in-place -E -e 's/#?GRUB_ENABLE_CRYPTODISK=(.*)/GRUB_ENABLE_CRYPTODISK=y/' /etc/default/grub"
|
||||||
run "grub: crypt disk map" "sed --in-place -E -e 's/#?GRUB_CMDLINE_LINUX=\"(.*)\"/GRUB_CMDLINE_LINUX=\"\/dev\/disk\/by-uuid\/${DISKUUID}:cryptroot \1\"/' /etc/default/grub"
|
run "grub: crypt disk map" "sed --in-place -E -e 's/#?GRUB_CMDLINE_LINUX=\"(.*)\"/GRUB_CMDLINE_LINUX=\"\/dev\/disk\/by-uuid\/${DISKUUID}:cryptroot \1\"/' /etc/default/grub"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user