Guest User

Untitled

a guest
Jul 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # Enter chroot
  4. cryptsetup luksOpen /dev/nvme0n1p5 system
  5. mkdir -p /mnt/root
  6. mount /dev/mapper/system-root /mnt/root
  7. mount /dev/mapper/system-boot /mnt/root/boot
  8. mount /dev/mapper/system-home /mnt/root/home
  9. mount /dev/nvme0n1p2 /mnt/root/boot/efi
  10. mount --bind /dev /mnt/root/dev
  11. mount --bind /run /mnt/root/run
  12. chroot /mnt/root
  13.  
  14. # Setup once in chroot
  15. mount --types=proc proc /proc
  16. mount --types=sysfs sys /sys
  17.  
  18. # Do what you need
  19. refreshgrub
  20.  
  21. # Exit and cleanup
  22. exit
  23. umount -R /mnt/root
  24. vgchange -an system
  25. cryptsetup luksClose system
Add Comment
Please, Sign In to add comment