Last active
October 12, 2020 11:21
-
-
Save yuvadm/52b3f350293a96501478 to your computer and use it in GitHub Desktop.
Revisions
-
yuvadm revised this gist
May 5, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ mkfs.ext4 /dev/mapper/vgroup-lvroot mkfs.ext4 /dev/mapper/vgroup-lvhome # Mount filesystems mount /dev/mapper/vgroup-lvroot /mnt mkdir -p /mnt/{boot,home} mount /dev/sda1 /mnt/boot mount /dev/mapper/vgroup-lvhome /mnt/home -
yuvadm revised this gist
Dec 10, 2014 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,11 +35,18 @@ mount /dev/mapper/vgroup-lvhome /mnt/home # Install base system pacstrap -i /mnt base base-devel genfstab -U -p /mnt >> /mnt/etc/fstab # edit the fstab and add the `discard` option to all partitions # Chroot arch-chroot /mnt # Some general stuff echo computer_name > /etc/hostname ln -sf /usr/share/zoneinfo/zone/subzone /etc/localtime # uncomment locales in /etc/locale.gen locale-gen echo LANG=your_locale > /etc/locale.conf vi /etc/mkinitcpio.conf # add `ext4 dm_mod dm_crypt aes_x86_64 i915` modules # add the `encrypt` `lvm2` (before `filesystems`) and `shutdown` hooks -
yuvadm revised this gist
Dec 10, 2014 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,6 +43,13 @@ arch-chroot /mnt vi /etc/mkinitcpio.conf # add `ext4 dm_mod dm_crypt aes_x86_64 i915` modules # add the `encrypt` `lvm2` (before `filesystems`) and `shutdown` hooks mkinitcpio -p linux vi /etc/lvm/lvm.conf # set `issue_discards = 1` # Syslinux pacman -S syslinux gptfdisk syslinux-install_update -i -a -m vi /boot/syslinux/syslinux.cfg # use APPEND root=/dev/mapper/vgroup-lvroot cryptdevice=/dev/sda2:vgroup:allow-discards -
yuvadm created this gist
Dec 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ # Arch Linux installation procedure on a Lenovo ThinkPad X200s # BIOS boot (no UEFI), SSD + LVM + LUKS + TRIM + discards # Randomize (or zero) drive contents dd if=/dev/urandom of=/dev/sda # Create GPT and partitions # Use gdisk to ensure proper partition alignment gdisk /dev/sda # 100MB boot partition on /dev/sda1 type 8300 # Remaining root partition on /dev/sda2 type 8300 # Setup encryption cryptsetup --cipher aes-xts-plain64 --key-size 512 --hash sha512 \ --iter-time 5000 --use-random --verify-passphrase luksFormat /dev/sda2 cryptsetup luksOpen /dev/sda2 cryptdisk # Create LVM partitions pvcreate /dev/mapper/cryptdisk vgcreate vgroup /dev/mapper/cryptdisk lvcreate --size 30G --name lvroot vgroup lvcreate --extents +100%FREE --name lvhome vgroup # Create filesystems mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/mapper/vgroup-lvroot mkfs.ext4 /dev/mapper/vgroup-lvhome # Mount filesystems mnt /dev/mapper/vgroup-lvroot /mnt mkdir -p /mnt/{boot,home} mount /dev/sda1 /mnt/boot mount /dev/mapper/vgroup-lvhome /mnt/home # Install base system pacstrap -i /mnt base base-devel genfstab -U -p /mnt >> /mnt/etc/fstab # edit the fstab and add the `discards` option to all partitions # Chroot arch-chroot /mnt vi /etc/mkinitcpio.conf # add `ext4 dm_mod dm_crypt aes_x86_64 i915` modules # add the `encrypt` `lvm2` (before `filesystems`) and `shutdown` hooks vi /etc/lvm/lvm.conf # set `issue_discards = 1`