I use ARCH btw

From ZENotes
(Difference between revisions)
Jump to: navigation, search
 
(39 intermediate revisions by one user not shown)
Line 1: Line 1:
Following the [https://wiki.archlinux.org/title/Installation_guide guide] is mostly ok ; A word on something that escaped me :
+
Following the [https://wiki.archlinux.org/title/Installation_guide guide] is mostly ok ; A word on something I completely forgot about :
  
When you use a graphical installer, it will both assist in creating / deleting / reorganizing partitions, then at formatting them or not,
+
==Read The FINE Manual==
then in assigning their roles as "root", "home", or "swap" and so on ; I never realized those where completely independent actions, and that you
+
can partition or not, format or not, and, ''assign partitions'' with [https://wiki.archlinux.org/title/Installation_guide#Fstab fstab] later on independently.
+
  
  '''Frightening, or hilarious, side note : I know I installed my last system without running the fstab generation,
+
(Assuming you have a thumbdrive ready and working)
  and the system build itself out of the /mnt/ ; /mnt/home and /mnt/swap partitions from the live system o_Ô'''
+
 
 +
* Use F12 on Fatitude to get to the Choose Your Boot Media at startup
 +
* Load correct keymap :
 +
 
 +
  # loadkeys fr-latin1
 +
 
 +
* Network interface probably gonna be wlan0 ; in doubt, do '''ip link'''
 +
 
 +
* Use [https://wiki.archlinux.org/title/Iwd#iwctl iwctl] to connect to the wireless network
 +
[iwd]# station wlan0 scan
 +
[iwd]# station device get-networks
 +
[iwd]# station device connect SSID
 +
[iwd]# exit
 +
# ping archlinux.org
 +
 
 +
# timedatectl
 +
 
 +
* Check [https://wiki.archlinux.org/title/Installation_guide#Partition_the_disks partitions] architecture :
 +
 
 +
# fdisk -l
 +
 
 +
* Only format your root partition to install a fresh system on it. Add swap if you have swap:
 +
 
 +
# mkfs.btrfs -f /dev/sda6 (the -f option is to override former btrfs subvolumes)
 +
  # mkswap /dev/sda8
 +
 
 +
* Mount the filesystems you're going to use on the /mnt folder of your live system:
 +
 
 +
# mount --mkdir /dev/sda2 /mnt/boot/efi
 +
# mount --mkdir /dev/sda7 /mnt/home
 +
# mount /dev/sda6 /mnt/
 +
# swapon /dev/swap_partition
 +
 
 +
* Now start reading '''Yes, but'''
  
 
==Yes, but==
 
==Yes, but==
- '''No need to partition''' if ''there's no need to!'' (esp EFI) You'll run into a permissions nightmare on your /home, but that's better than loosing data :
+
- '''Yes, there's probably no need to partition''' if ''there's no need to!'' (esp EFI) You'll run into a permissions nightmare on your /home, but that's better than loosing data :
  
 
   When the /home partition is mounted to /mnt/home at 'pacstrap' time, just '''chmod -r 777''' the entire contents of the previous /home folder ;  
 
   When the /home partition is mounted to /mnt/home at 'pacstrap' time, just '''chmod -r 777''' the entire contents of the previous /home folder ;  
 
   when you make your new user, be sure to give it another name.
 
   when you make your new user, be sure to give it another name.
  
- '''Only format your system / partition''' (or root partition) with makefs.<type of filesystem>.
+
- '''Only format your system / partition''' (or root partition) with ''makefs.<type of filesystem> -f'' is enough for a fresh re-install.
  
 
- It's ok to mount the EFI partition to /boot/efi and not simply /boot so as to not fill that small partition with everything in /boot, especially numerous kernels
 
- It's ok to mount the EFI partition to /boot/efi and not simply /boot so as to not fill that small partition with everything in /boot, especially numerous kernels
Line 23: Line 54:
 
==Default install through pacstrap needs a lot more stuff, you'll probably want==
 
==Default install through pacstrap needs a lot more stuff, you'll probably want==
  
- base-devel linux-lts os-prober pacman-contrib
+
- base-devel linux-lts os-prober pacman-contrib git grub efibootmgr
  
- grep rsync nano tar git iwd - snapper ?
+
- grep rsync nano tar git iwd less sudo
  
 
- gdm gnome networkmamager gedit - or any of your login manager and desktop environment of choice
 
- gdm gnome networkmamager gedit - or any of your login manager and desktop environment of choice
  
- bluez bluez-utils usbutils
+
- bluez bluez-utils usbutils git go zip wget
  
- firefox vlc smplayer gimp
+
- firefox vlc smplayer gimp calibre
  
 +
- [https://wiki.archlinux.org/title/Snapper snapper] ? if you go this route then snap-pac and grub-btrfs too. The current state of the wiki page there is
 +
such that I should try snapper-gui-git (AUR) and/or btrfs-assistant (AUR). Creating, generating, booting into snapshots mostly work.
 +
Restoring your system to a snapshot does not.
  
When you chroot in, it's normal for os-prober to ''not'' see the M$ partition, even if it is mounted ; you should re-run it, and re-run grub-mkconfig, when you did reboot into the actual, fresh system.
+
 
 +
When you chroot in, it's normal for os-prober to ''not'' see the M$ partition, even if it is mounted ; you should re-run os-prober, and re-run grub-mkconfig, when you did reboot into the actual, fresh system. os_prober only need to see your EFI partition, where other boot stubs are stored, not the actual system disks
  
 
==don't forget to enable some systemd services, duh==
 
==don't forget to enable some systemd services, duh==
Line 55: Line 90:
 
Then create a basic user with  
 
Then create a basic user with  
  
     useradd -m <name of user>
+
     useradd -m -G %wheel <name of user>
  
 
Add it to sudoers with
 
Add it to sudoers with
Line 65: Line 100:
 
Set up [https://wiki.archlinux.org/title/Arch_User_Repository aur] or install [https://wiki.archlinux.org/title/Flatpak flatpak] for dropbox and ungoogled-chromium ; add python-gpgme for dropbox.
 
Set up [https://wiki.archlinux.org/title/Arch_User_Repository aur] or install [https://wiki.archlinux.org/title/Flatpak flatpak] for dropbox and ungoogled-chromium ; add python-gpgme for dropbox.
  
Good luck with btrfs, and snapper, and snap-pac, and grub-btrfs, and don't forget to [https://wiki.archlinux.org/title/Snapper#Booting_into_read-only_snapshots hack mkinitcpio] as described.
+
 
 +
==Other Housechores==
 +
 
 +
Uncheck the os-prober-false at the bottom of /etc/default/grub ; generally speaking, tweak the grub file to your liking and re-run grub-mkconfig
 +
Add the user to sudo with ''EDITOR=nano visudo''
 +
setup keyboard in gnome
 +
setup keyboard in GDM with ''localectl set-x11-keymap fr''
 +
 +
Enable tap to click in gnome
 +
Enable pinch in firefox by adding MOZ_ENABLE_WAYLAND=1 in .bash_profile
 +
Setup wiregard
 +
 
 +
Enable the paccache.timer service to get rid weekly of the cruft in /var/cache/pacman/pkg/ ''which will totally eat up your disk if you don't do that!''
 +
 
 +
# systemctl enable --now paccache.timer
 +
 
 +
Good luck with btrfs, and snapper, and snap-pac, and grub-btrfs, and don't forget to [https://wiki.archlinux.org/title/Snapper#Booting_into_read-only_snapshots hack mkinitcpio] as described. Then try your luck with (no, it didn't work here):
 +
 
 +
# snapper rollback --ambit classic <snapshot number to rollback to>
 +
 
 +
The pyhton script snapper-rollback also doesn't work for me, asks for some cquota definition that is said to be damageable to performance on the root partition ;
 +
note that I nevertheless blindly imputed some commands to enable quota, rescan them and such. sources suse and oracle.
 +
 
 +
Trying now in a VM to [https://www.youtube.com/watch?v=maIu1d2lAiI scrupulously follow this guide], will add [[btrfs before install notes]].
  
 
==AND IF YOU FAIL...==
 
==AND IF YOU FAIL...==
  
 
   '''Just re-do the whole install thing ; it is better to loose 20 minutes re-doing it than spending 20 days fixing it'''
 
   '''Just re-do the whole install thing ; it is better to loose 20 minutes re-doing it than spending 20 days fixing it'''
 +
 +
 +
For reference, and in memoriam of failing to generate a correct one yesterday :
 +
 +
  # Static information about the filesystems.
 +
  # See fstab(5) for details.
 +
 
 +
  # <file system>                              <dir>    <type>  <options>                                                          <dump> <pass>
 +
  # /dev/sda6
 +
  UUID=38472571-3738-42e4-9561-47facca89d00    '''/'''        btrfs    rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/        0 0
 +
 
 +
  # /dev/sda7
 +
  UUID=05d5954f-f948-4d21-9813-aa687a8d4cf4    '''/home'''    btrfs    rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/        0 0
 +
 
 +
  # /dev/sda2 LABEL=SYSTEM
 +
  UUID=B651-2AC6                              /boot'''/efi''' vfat    rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro    0 2
 +
 
 +
  # /dev/sda8
 +
  UUID=3845f812-ba5d-4113-8dbe-635448119669    none    '''swap'''    defaults    0 0
 +
 +
== Annoyances, gripes and actual issues==
 +
 +
* Why is os-prober disabled in grub ; why is it not included by default?
 +
* And '''why''' aren't included small stuff like less, nano, grep, wget, rsync - or iwd and pacman-contrib ?!
 +
* Why can I not run Appimages ? They're supposed to work everywhere.
 +
* Why did my last ''genfstab'' fail with only /dev/sda6? Why where there duplicate of everything when I re-mounted the drives genfstab missed?
 +
 +
'''Why is installing Arch still a 1h30 affair when I know the whole thing practically by heart? The pre-download, pre-pacstrap part was 11 minutes!!

Latest revision as of 18:35, 6 December 2023

Following the guide is mostly ok ; A word on something I completely forgot about :

Contents

Read The FINE Manual

(Assuming you have a thumbdrive ready and working)

# loadkeys fr-latin1
[iwd]# station wlan0 scan
[iwd]# station device get-networks
[iwd]# station device connect SSID
[iwd]# exit
# ping archlinux.org
# timedatectl
# fdisk -l
# mkfs.btrfs -f /dev/sda6 (the -f option is to override former btrfs subvolumes)
# mkswap /dev/sda8
# mount --mkdir /dev/sda2 /mnt/boot/efi
# mount --mkdir /dev/sda7 /mnt/home
# mount /dev/sda6 /mnt/
# swapon /dev/swap_partition

Yes, but

- Yes, there's probably no need to partition if there's no need to! (esp EFI) You'll run into a permissions nightmare on your /home, but that's better than loosing data :

 When the /home partition is mounted to /mnt/home at 'pacstrap' time, just chmod -r 777 the entire contents of the previous /home folder ; 
 when you make your new user, be sure to give it another name.

- Only format your system / partition (or root partition) with makefs.<type of filesystem> -f is enough for a fresh re-install.

- It's ok to mount the EFI partition to /boot/efi and not simply /boot so as to not fill that small partition with everything in /boot, especially numerous kernels

 On my fresh install, the EFI partition is 260MB which is a factory default - and my /boot partition is already 268MB ; 
 ergo, it wouldn't fit, with just 4 kernels + the windows stub

Default install through pacstrap needs a lot more stuff, you'll probably want

- base-devel linux-lts os-prober pacman-contrib git grub efibootmgr

- grep rsync nano tar git iwd less sudo

- gdm gnome networkmamager gedit - or any of your login manager and desktop environment of choice

- bluez bluez-utils usbutils git go zip wget

- firefox vlc smplayer gimp calibre

- snapper ? if you go this route then snap-pac and grub-btrfs too. The current state of the wiki page there is such that I should try snapper-gui-git (AUR) and/or btrfs-assistant (AUR). Creating, generating, booting into snapshots mostly work. Restoring your system to a snapshot does not.


When you chroot in, it's normal for os-prober to not see the M$ partition, even if it is mounted ; you should re-run os-prober, and re-run grub-mkconfig, when you did reboot into the actual, fresh system. os_prober only need to see your EFI partition, where other boot stubs are stored, not the actual system disks

don't forget to enable some systemd services, duh

- gdm.service

- NetworkManager.service

- bluetooth.service

with

 systemctl enable <name of unit>.service

If you are already in your graphic environment and instead need it to be enabled and start immediately (like for network), run

 systemctl enable --now <name of unit>.service

And make a basic user

Then create a basic user with

   useradd -m -G %wheel <name of user>

Add it to sudoers with

   EDITOR=nano visudo

Now you can reboot. Have you installed some network software? Have you enabled a graphic shell ? That's the core needs for a functional, fresh install to be tuned further as needed.

Set up aur or install flatpak for dropbox and ungoogled-chromium ; add python-gpgme for dropbox.


Other Housechores

Uncheck the os-prober-false at the bottom of /etc/default/grub ; generally speaking, tweak the grub file to your liking and re-run grub-mkconfig
Add the user to sudo with EDITOR=nano visudo
setup keyboard in gnome 
setup keyboard in GDM with localectl set-x11-keymap fr

Enable tap to click in gnome
Enable pinch in firefox by adding MOZ_ENABLE_WAYLAND=1 in .bash_profile
Setup wiregard 

Enable the paccache.timer service to get rid weekly of the cruft in /var/cache/pacman/pkg/ which will totally eat up your disk if you don't do that!

# systemctl enable --now paccache.timer

Good luck with btrfs, and snapper, and snap-pac, and grub-btrfs, and don't forget to hack mkinitcpio as described. Then try your luck with (no, it didn't work here):

# snapper rollback --ambit classic <snapshot number to rollback to>

The pyhton script snapper-rollback also doesn't work for me, asks for some cquota definition that is said to be damageable to performance on the root partition ; note that I nevertheless blindly imputed some commands to enable quota, rescan them and such. sources suse and oracle.

Trying now in a VM to scrupulously follow this guide, will add btrfs before install notes.

AND IF YOU FAIL...

 Just re-do the whole install thing ; it is better to loose 20 minutes re-doing it than spending 20 days fixing it


For reference, and in memoriam of failing to generate a correct one yesterday :

 # Static information about the filesystems.
 # See fstab(5) for details.
 
 # <file system>                               <dir>    <type>   <options>                                                          <dump> <pass>
 # /dev/sda6
 UUID=38472571-3738-42e4-9561-47facca89d00    /        btrfs    rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/        0 0
 
 # /dev/sda7
 UUID=05d5954f-f948-4d21-9813-aa687a8d4cf4    /home    btrfs    rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/        0 0
 
 # /dev/sda2 LABEL=SYSTEM
 UUID=B651-2AC6                               /boot/efi vfat     rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro    0 2
 
 # /dev/sda8
 UUID=3845f812-ba5d-4113-8dbe-635448119669    none     swap     defaults    0 0

Annoyances, gripes and actual issues

* Why is os-prober disabled in grub ; why is it not included by default?
* And why aren't included small stuff like less, nano, grep, wget, rsync - or iwd and pacman-contrib ?!
* Why can I not run Appimages ? They're supposed to work everywhere.
* Why did my last genfstab fail with only /dev/sda6? Why where there duplicate of everything when I re-mounted the drives genfstab missed?

Why is installing Arch still a 1h30 affair when I know the whole thing practically by heart? The pre-download, pre-pacstrap part was 11 minutes!!

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox