r815 setup updated.
This commit is contained in:
parent
c6f3aae4d3
commit
3bb1f40623
15
r815/SETUP
15
r815/SETUP
|
@ -2,8 +2,10 @@ UEFI boot does not work, so use legacy boot.
|
|||
Installed with ubuntu-20.04-live-server-amd64.iso
|
||||
|
||||
ssh-copy-id
|
||||
mkdir privat
|
||||
cd privat
|
||||
git clone 192.168.1.129:privat/config
|
||||
cp config/ubuntu-20.04/home/.* .
|
||||
cp config/ubuntu-20.04/home/.* ~/
|
||||
sudo cp config/ubuntu-20.04/home/.* /root
|
||||
bash config/ubuntu-20.04/packages
|
||||
|
||||
|
@ -57,7 +59,7 @@ Change_LUKS_password_to_USB_cryptkey() {
|
|||
# Check that slot 0 and 1 are in use
|
||||
cryptsetup luksDump ${DISK}-part3
|
||||
|
||||
cryptsetup config --priority prefer --key-slot 0
|
||||
cryptsetup config --priority prefer --key-slot 0 ${DISK}-part3
|
||||
# This should be fast
|
||||
(echo "$newpassword"; echo "dummy") |
|
||||
cryptsetup -y -v luksAddKey \
|
||||
|
@ -70,7 +72,14 @@ Change_LUKS_password_to_USB_cryptkey() {
|
|||
}
|
||||
|
||||
autodecrypt() {
|
||||
cd ~tange/configfiles/ubuntu-20.04/
|
||||
cd ~tange/privat/config/ubuntu-20.04/
|
||||
cp usr/share/initramfs-tools/scripts/local-top/cryptroot /usr/share/initramfs-tools/scripts/local-top/cryptroot
|
||||
update-initramfs -u -k all
|
||||
}
|
||||
|
||||
autofs() {
|
||||
perl -i.bak -pe 's:#/net:/nfs:' /etc/auto.master
|
||||
ln -s /nfs/hpdisk/data /data
|
||||
service autofs restart
|
||||
ls /data
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ install_initrd_tools() {
|
|||
apt install --yes --no-install-recommends linux-image-generic
|
||||
apt install --yes zfs-initramfs
|
||||
apt install --yes grub-efi-amd64
|
||||
# apt install --yes grub-pc
|
||||
}
|
||||
|
||||
install_luks() {
|
||||
|
@ -201,6 +202,8 @@ install_grub() {
|
|||
update-grub
|
||||
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
|
||||
--bootloader-id=ubuntu --recheck --no-floppy ||
|
||||
grub-install --target=i386-pc \
|
||||
--bootloader-id=ubuntu --recheck --no-floppy
|
||||
}
|
||||
|
||||
|
@ -247,7 +250,16 @@ doall() {
|
|||
mount --rbind /sys /mnt/sys
|
||||
chroot /mnt /usr/bin/env DISK=$DISK bash -x /stage2.sh
|
||||
|
||||
umount /mnt/boot || umount -l /mnt/boot
|
||||
lazy_umount() {
|
||||
umount "$@" || umount -l "$@"
|
||||
}
|
||||
lazy_umount /mnt/boot/efi
|
||||
lazy_umount umount /mnt/boot
|
||||
lazy_umount /mnt/sys/fs/cgroup/unified
|
||||
lazy_umount /mnt/sys/fs/cgroup
|
||||
lazy_umount /mnt/sys
|
||||
lazy_umount /mnt/dev/pts
|
||||
umount /mnt/proc /mnt/sys /mnt/dev
|
||||
zpool export bpool || zpool export -f bpool
|
||||
umount /mnt || umount -l /mnt
|
||||
zpool export rpool || zpool export -f rpool
|
||||
|
|
Loading…
Reference in a new issue