Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
1,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. # parted /dev/sda
  2. (parted) mklabel msdos
  3. (parted) mkpart primary ext2 2MiB 2GiB
  4. (parted) mkpart primary ext4 2GiB 100%
  5. (parted) set 1 boot on
  6. (parted) q
  7.  
  8. # mkfs.ext2 /dev/sda1
  9. # cryptsetup --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda2
  10.  
  11. # cryptsetup open --type luks /dev/sda2 r00t
  12.  
  13. # pvcreate /dev/mapper/r00t
  14. # vgcreate MyStorage /dev/mapper/r00t
  15.  
  16. # lvcreate -L 2GiB MyStorage -n swapvol
  17. # lvcreate -L 3GiB MyStorage -n tmpvol
  18. # lvcreate -L 30GiB MyStorage -n rootvol
  19. # lvcreate -l +100%FREE MyStorage -n homevol
  20.  
  21. # mkswap /dev/mapper/MyStorage-swapvol
  22. # mkfs.ext4 /dev/mapper/MyStorage-homevol
  23. # mkfs.ext4 /dev/mapper/MyStorage-rootvol
  24. # mkfs.ext4 /dev/mapper/MyStorage-tmpvol
  25.  
  26. # mount /dev/MyStorage/rootvol /mnt
  27. # mkdir /mnt/home
  28. # mount /dev/MyStorage/homevol /mnt/home
  29. # mkdir /mnt/tmp
  30. # mount /dev/MyStorage/tmpvol /mnt/tmp
  31. # swapon /dev/MyStorage/swapvol
  32.  
  33. # mkdir /mnt/boot
  34. # mount /dev/sda1 /mnt/boot
  35.  
  36. # nano /etc/mkinitcpio.conf
  37. added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"
  38.  
  39. # nano /etc/resolv.conf
  40. replaced DNS with 8.8.8.8
  41.  
  42. # pacstrap /mnt base base-devel
  43.  
  44. # genfstab -U -p /mnt >> /mnt/etc/fstab
  45.  
  46. # arch-chroot /mnt /bin/bash
  47.  
  48. uncommened e_us.UTF-8 UTF-8 in /etc/locale.gen
  49. # locale-gen
  50. # echo LANG=en_US.UTF-8 > /etc/locale.conf
  51. # export LANG=en_US.UTF-8
  52.  
  53. # ln -sf /usr/share/zoneinfo/Europe/Sofia /etc/localtime
  54.  
  55. # hwclock --systohc --utc
  56.  
  57. # echo myhstnm > /etc/hostname
  58. added "myhstnm" to /etc/hosts
  59.  
  60. # systemctl enable dhcpcd@enp4s4.service
  61.  
  62. # nano /etc/mkinitcpio.conf
  63. added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"
  64. # mkinitcpio -p linux
  65.  
  66. # nano /etc/default/grub
  67. changed: GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:MyStorage root=/dev/mapper/MyStorage"
  68.  
  69. # grub-install --recheck /dev/sda
  70. # grub-mkconfig -o /boot/grub/grub.cfg
  71. # nano /etc/lvm/lvm.conf
  72. changed "use_lvmetad = 1" to "use_lvmetad= 0"
  73. # grub-mkconfig -o /boot/grub/grub.cfg
  74.  
  75. # exit
  76.  
  77. # reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement