LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Arch Manual Install Confusion (https://www.linuxquestions.org/questions/linux-software-2/arch-manual-install-confusion-4175736027/)

GardenKeeper 04-14-2024 06:25 PM

Arch Manual Install Confusion
 
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!

wpeckham 04-14-2024 06:30 PM

I would consider BTRFS for most people, it is a lot less complicated.
If they are heavy tech educated I might try ZFS, but BTRFS will be easier and better for most people.

teckk 04-15-2024 05:26 PM

Quote:

So i'm try to create a video/guide to help my friend and others to install the manual way
Don't. It'll be out of date in a month or so.

This is kept up to date and what to use. Tell then to read this. If they can't get it installed, then they won't be able to maintain it. And you'll have to be their 24 hour tech support.
https://wiki.archlinux.org/title/Installation_guide

Arch also has a graphical installer. I've never tried it.

GardenKeeper 04-16-2024 04:21 PM

Quote:

Originally Posted by teckk (Post 6496207)
Don't. It'll be out of date in a month or so.

This is kept up to date and what to use. Tell then to read this. If they can't get it installed, then they won't be able to maintain it. And you'll have to be their 24 hour tech support.
https://wiki.archlinux.org/title/Installation_guide

Arch also has a graphical installer. I've never tried it.


Ok for now ill skip encryption for now and these issues and i'm seeing now.... let me know what you think it can be as im now im getting a black screen after install as im using nvidia GPU

bootctl install - as it seems to have a security hole error stating and what its stating is this. "! Mount point `/boot` witch backs the random seed file is world accessible, which is a security hole!!" and "! Random sed file`/boot/loader/.#bootctlrandom-seed246324623423` is world accessible, which is a security hole!!"

/boot partition format - seems to be confusion on how to command format it and what im seeing and not understanding is witch is the best way to format. "mkfs.fat -F32 /dev/sda1" is the standard way but on the wiki its "mkfs.fat -F 32 /dev/sda1" then some people use "mkfs.vfat" but im not sure if .vfat is any different. I wonder if having both "mkfs.vfat -F 32 /dev/sda1" is the best way to approach it.


Links
mounting - https://wiki.archlinux.org/title/Ins...e_file_systems
bootctl - https://wiki.archlinux.org/title/systemd-boot


All times are GMT -5. The time now is 07:55 AM.