Article 6M2RZ Arch Manual Install Confusion

Arch Manual Install Confusion

by
GardenKeeper
from LinuxQuestions.org on (#6M2RZ)
So i'm try to create a video/guide to help my friend and others to install the manual way with some perks but this method is having some issues and so i would like to hear other's option to this method i created for the guide. The issue i'm having is my pathing with partitioning, encryption and mounting due to LVM when having the /root and /home in the same LVM group and under the LC and VG.


Partition:

GDISK Method:


Boot Partition:

- First Sector: press enter (default = 2048)

- Boot Drive (KMGTP): 1024MiB (1GiB)

- Filetype (Hex Code/GUID): EF00

- Name The Partition: boot

Swap Memory (zram):

- First Sector: press enter (default = 2048)

- Boot Drive (KMGTP): 5GiB

- Filetype (Hex Code/GUID): 8200

- Name The Partition: swap

Root Partition: Leave out if doing LVM?

- FirstSector: press enter (default = 2048)

- Boot Drive (KMGTP): 10GiB

- Filetype (Hex Code/GUID): 8200

- Name The Partition: root

Home Partition:

- First Sector: press enter (default)

- Boot Drive (KMGTP): press enter (default) (Use the rest of the drive)

- Filetype (Hex Code/GUID): 8300 - Linux Filesystem (8e00 - Linux LVM)

- Name The Partition: home

Use the arrow keys until you reach "Write" then type "yes"
Once thats done navigate to "Quit" press enter then type "clear"
Type "lsblk" and check to see your partitions are set

Formatting Partitions/Drives:

Type "mkfs.fat -F32 /dev/drive-name1" (boot)
Type "mkswap /dev/drive-name2" (swap)
Type "swapon /dev/drive-name2" (swap)
Type "mkfs.ext4 /dev/drive-name3" (root)
Type "mkfs.ext4 /dev/drive-name4" (home)

(If encrypted skip the set above and proceed to the cryptsetup and LVM)

- Accept "y" and proceed

Encryption:

Encrypting Partitions: Change the names due to adding encryption to this


(OPTIONAL) Load up the encryption modules with "modprobe dm-crypt" and "modprobe dm-mod"
Then setup the drive to be encrypted with "cryptsetup luksFormat /dev/(drive-name)4" or "cryptsetup luksFormat -v -s 512 -h sha512 /dev/(drive-name)4"
Type in your password (Store it in a password manager)

Repeat and Make sure to encrypt home partition or any other as you need for each partition needed.

LVM:

Then setup the drive to be encrypted with "cryptsetup luksFormat /dev/(drive-name)4" or "cryptsetup luksFormat -v -s 512 -h sha512 /dev/(drive-name)4"
Type in your password (Store it in a password manager)
Start with opening a encrypted volume instead of creating by typing "cryptsetup open --type luks /dev/(drive-name) (volume-name)"
Enter the password for that partition/volume

Create a physical volume that will be refer to a volume when using LVM

Type "pvcreate /dev/mapper/(volume-name)" to create that volume
After that we need to create a volume group for LVM with "vgcreate volgroup0 /dev/mapper/(volume-name)"
Logical Volume is used for general use in arch on the surface level to do that type in "lvcreate -L (data-size)GB volgroup0 -n lv_root" (the size of the root filesystem)
Repeat it agin with a larger size for home "lvcreate -L (data-size)GB volgroup0 -n lv_home"
Verify your progress by typing in "vgdisplay" for your volume groups and "lvdisplay" for your logical volumes.
Load in the kernel module "modprobe dm_mod" and scan with "vgscan"
Once it find the volumes you just created * if you see it good sign *
Type in "vgchange -ay" to change all volume groups to be active

Format volume LVM system:

- To do that type "mkfs.ext4 /dev/volgroup0/lv_root" and now for your home "mkfs.ext4 /dev/volgroup0/lv_home"


Mounting/Assigning Drives:


Main Drive: LVM

Mount root "mount /dev/volgroup0/lv_root /mnt"
New directory to mount home "mkdir /mnt/boot"
Mount the partition "mount /dev/(drive-name)1 /mnt/boot"
New directory to mount home "mkdir /mnt/home"
Mount the partition "mount /dev/volgroup0/lv_home /mnt/home"
Type "lsblk" Check to see it was done correctly



It should look like this..



```

sdb

sdb1 | 8:1 | 0 | 1G | 0 | part | /mnt/boot

sdb2 | 8:2 | 0 | 5G | 0 | part | SWAP

sdb3 | 8:3 | 0 | (rest of drive)G | 0 | part

lvm | 254:0 | 0 | 230GB | 0 | crypt

volgroup0-lvroot | 254:1 | 0 | 10GB | 0 | lvm | /mnt

volgroup0-lvhome | 254:2 | 0 | 230GB | 0 | lvm | /mnt/home

```

Any input is much appreciated!
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments