albibacsi

slack-encrypted

Sep 27th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. gdisk /dev/sda
  2.  
  3. sda1: bios boot 32M, type: ef02
  4. sda2: /boot 128M, type: 8300 (the default)
  5. sda3: lvm, type: 8e00
  6.  
  7. cryptsetup luksFormat -c aes-xts-plain64:sha512 -h sha512 -s 256 /dev/sda3
  8. cryptsetup luksOpen /dev/sda3 vault0
  9.  
  10. pvcreate /dev/mapper/vault0
  11. vgcreate slack /dev/mapper/vault0
  12.  
  13. lvcreate -n swap -L 512M slack
  14. lvcreate -n root -L 14G slack
  15. lvscan
  16.  
  17. mkswap /dev/slack/swap
  18.  
  19. setup
  20. - add swap
  21. - format / partition (ext4)
  22. - format /boot (ext2)
  23.  
  24. Select frame buffer: 1024x768x256
  25. NO utf8
  26. use MBR
  27.  
  28. Don't reboot yet!
  29.  
  30. cd /mnt
  31. chroot . /bin/bash -l
  32. ls /boot
  33. mkinitrd -c -k 4.4.14 -m ext4 -f ext4 -r /dev/slack/root -C /dev/sda3 -L
  34.  
  35. /etc/lilo.conf:
  36.  
  37. image = /boot/vmlinuz-generic
  38. initrd = /boot/initrd.gz
  39. root = /dev/slack/root
  40.  
  41. Run lilo
  42.  
  43.  
  44. Kernel upgrade:
  45.  
  46. depmod 4.4.157
  47. mkinitrd -c -k 4.4.157 -f xfs -m xfs -r /dev/slack/root -C /dev/sda3 -L -u -o /boot/initrd.gz
  48. lilo
  49. reboot
  50.  
  51.  
  52.  
  53. Toubleshooting:
  54.  
  55. cryptsetup luksOpen /dev/sdx2 slackcrypt
  56. vgscan --mknodes
  57. vgchange -ay
  58. lvscan
  59. mount /dev/cryptvg/root /mnt
  60. mount /dev/cryptvg/home /mnt/home
  61. mount /dev/sdx1 /mnt/boot
  62. mount -o bind /proc /mnt/proc
  63. mount -o bind /sys /mnt/sys
  64. mount -o bind /dev /mnt/dev
  65. chroot /mnt
  66.  
  67. /usr/share/mkinitrd/mkinitrd_command_generator.sh
Add Comment
Please, Sign In to add comment