From eac6e4fe4e4c46acb3174c200e3e302a2d155bf1 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Thu, 16 Apr 2020 17:51:21 -0400 Subject: lvm on luks setup (untested) --- install.sh | 55 ++++++++++++++++++++++++----------------------- src/etc/default/grub.orig | 54 ++++++++++++++++++++++++++++++++++++++++++++++ src/etc/mkinitcpio.conf | 7 ++++++ 3 files changed, 89 insertions(+), 27 deletions(-) create mode 100644 src/etc/default/grub.orig create mode 100644 src/etc/mkinitcpio.conf diff --git a/install.sh b/install.sh index 64ed805..bcbc318 100755 --- a/install.sh +++ b/install.sh @@ -14,38 +14,39 @@ export BASE=$(basename $DRIVE) export PART="/dev/$(basename $(echo /sys/class/block/$BASE/$BASE* | \ xargs -n1 echo | sed 1q | rev | cut -c 2- | rev ))" # List all partitions of device, get first one, remove last char. -sudo umount $DRIVE* +umount $DRIVE* if [ ! -e installed ]; then -fdisk $DRIVE <> /mnt/etc/fstab -cp -r . /mnt -touch installed + pacstrap /mnt base || exit 1 + genfstab -U /mnt >> /mnt/etc/fstab + cp -r . /mnt + sed "s|%%UUID%%|$(blkid ${PART}2)|" src/etc/default/grub.orig > src/etc/default/grub + touch installed else -mount ${PART}2 /mnt -mount ${PART}1 /mnt/efi + cryptsetup open ${PART}2 cryptlvm + mount /dev/Crypt/root /mnt + mount ${PART}1 /mnt/efi fi arch-chroot /mnt << EOF cd dotfiles diff --git a/src/etc/default/grub.orig b/src/etc/default/grub.orig new file mode 100644 index 0000000..83e4a5c --- /dev/null +++ b/src/etc/default/grub.orig @@ -0,0 +1,54 @@ +# GRUB boot loader configuration + +GRUB_DEFAULT=0 +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="Arch" +GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet" +GRUB_CMDLINE_LINUX="cryptdevice=UUID=%%UUID%%:cryptlvm root=/dev/Crypt/root" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable booting from LUKS encrypted devices +GRUB_ENABLE_CRYPTODISK=y + +# Set to 'countdown' or 'hidden' to change timeout behavior, +# press ESC key to display menu. +GRUB_TIMEOUT_STYLE=menu + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `vbeinfo' +GRUB_GFXMODE=auto + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +#GRUB_COLOR_NORMAL="light-blue/black" +#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/path/to/wallpaper" +#GRUB_THEME="/path/to/gfxtheme" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +# Uncomment to make GRUB remember the last selection. This requires +# setting 'GRUB_DEFAULT=saved' above. +#GRUB_SAVEDEFAULT="true" diff --git a/src/etc/mkinitcpio.conf b/src/etc/mkinitcpio.conf new file mode 100644 index 0000000..ed06478 --- /dev/null +++ b/src/etc/mkinitcpio.conf @@ -0,0 +1,7 @@ +MODULES=() + +BINARIES=() + +FILES=() + +HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck) -- cgit