Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #This script run in a chrooted shell
- ln -sf /usr/share/zoneinfo/<redacted> /etc/localtime
- hwclock --systohc
- sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- locale-gen
- echo "LANG=en_US.UTF-8" > /etc/locale.conf
- read -p "what would ye hostname be? " hstname
- echo $hstname > /etc/hostname
- # create/modify users
- echo "create root passwd"
- passwd root
- # initramfs
- sed -i 's/^HOOKS.*$/HOOKS=(base systemd autodetect microcode modconf kms keyboard block sd-encrypt lvm2 filesystems fsck btrfs)/' /etc/mkinitcpio.conf
- mkinitcpio -p linux
- # boot loader (systemd)
- bootctl --path=/boot install
- echo -e "default arch\ntimeout 3\nconsole-mode max\neditor no" > /boot/loader/loader.conf
- echo -e "title\tArch Linux\nlinux\t/vmlinuz-linux\ninitrd\t/initramfs-linux.img" > /boot/loader/entries/arch.conf
- diskid=$(blkid | grep crypto_LUKS | awk '{print $4}' |sed 's/PARTUUID=//')
- echo "options rd.luks.name=$diskid=cryptlvm root=/dev/arch/root rw rootflags=subvol=@" >> /boot/loader/entries/arch.conf
- bootctl --path=/boot update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement