[HN Gopher] Installing Arch Linux on a Laptop
       ___________________________________________________________________
        
       Installing Arch Linux on a Laptop
        
       Author : AlphaJack
       Score  : 50 points
       Date   : 2024-09-14 19:11 UTC (3 hours ago)
        
 (HTM) web link (giacomo.coletto.io)
 (TXT) w3m dump (giacomo.coletto.io)
        
       | AlphaJack wrote:
       | This is the step-by-step process I followed to install Arch Linux
       | on my laptop with the following features:
       | 
       | - Wayland - Plasma 6 - Plymouth - PipeWire - LVM on LUKS -
       | Unified Kernel Image - TPM PIN unlock - Secure Boot
       | 
       | Let me know what you think!
        
         | saghm wrote:
         | Nice write-up! My install process is slightly different (I
         | suspect everyone who uses Arch ends up having their own little
         | procedure built up over the years that varies slightly, since
         | the flexibility is part of the appeal), so I'll try to focus on
         | substantive feedback rather than feedback on hyper-specific
         | choices that don't matter:
         | 
         | * For something as nebulous as specific cryptographic settings,
         | I think it's worth elaborating on _why_ you pick the settings
         | you did for `cryptosetup`. I'd imagine it's probably very
         | possible for someone to pick a bad set of arguments that either
         | degrade security or don't improve it but make it much slower. I
         | suspect you didn't do this though, so as someone who just uses
         | the defaults that `cryptsetup luksFormat` uses, I'd be super
         | interested to hear how you decided on the options you used!
         | 
         | * It looks like you linked to another post explaining your use
         | of `yay` as a pacman wrapper/AUR helper, but I'd worry that a
         | lot of people this guide would be useful too (i.e. newer people
         | to Arch) would be confused when they try to follow it and
         | suddenly run into the issue where they don't have anything
         | called `yay` installed or know how to install it (since it's
         | not something you can get from the default repos). From what I
         | can tell, the only two AUR packages you reference in this post
         | are `plymouth-git` and `plymouth-theme-arch-breeze-git`. Maybe
         | for the purposes of this post, you could stick with `plymouth`
         | and `breeze-plymouth` in the main repos (and possibly link to
         | the section of your other article where you detail AUR stuff)?
         | 
         | * The stuff about how to configure secure boot is super
         | interesting; I've never found it worth the hassle and just turn
         | it off on all of my machines, so I wasn't aware of all of the
         | tooling available like `sbctl` and `sbsigntools`. A standalone
         | post on how to configure secure boot on Linux would definitely
         | be worthwhile!
         | 
         | * I love the section on the specific packages for each GPU
         | combination. This is definitely something where a lot of people
         | will benefit from a concise list rather than having to comb
         | through the details in the wiki (which are useful when you need
         | them! but often you just want the packages to install)
         | 
         | * For unmounting all of the stuff post-install, you can use
         | `umount -a /mnt` to recursively unmount all of the nested
         | mounts. Super small change, but it's nice not to have to type
         | all of it!
        
           | Iku_Tri wrote:
           | Not OP, but thank you for real feedback. Most of these posts
           | are just noise to the less-informed.
        
       | Keppl8R wrote:
       | ArchWiki: your source for Arch Linux documentation on the web.
       | https://wiki.archlinux.org/title/Main_page
        
       | elromulous wrote:
       | This was the process I followed:
       | 
       | 1. Downloaded EndeavourOS
       | 
       | 2. Installed it as easily as Ubuntu
       | 
       | Edit: the arch documentation is second to none
        
         | seba_dos1 wrote:
         | Installing Arch is just boring and uneventful. You follow the
         | guide from the wiki and that's it. I had more fun installing
         | Debian manually with debootstrap some 15 years ago or so, as it
         | wasn't as well-documented back then and the process left some
         | space for me to screw things up. The most interesting thing to
         | figure out was when I forgot to set the loopback network
         | interface up. All sorts of random things were broken in
         | peculiar ways, but the whole system worked well enough to make
         | it seem you already succeeded :)
        
           | exe34 wrote:
           | nixos is even worse, I have a configuration.nix that I only
           | look at when I'm upgrading, to fix one or two warnings about
           | deprecation.
           | 
           | I don't even look at it more than once per major version
           | upgrade, as I've never had to wipe and re-install.
           | 
           | stay away if you want a bit of excitement in your installs.
        
             | calepayson wrote:
             | I had plenty of... fun, trying to write a mix config file
             | from scratch. But I also didn't know a thing about the
             | language when I got started. :)
        
         | Levitating wrote:
         | > the arch documentation is second to none
         | 
         | I am willing to argue that it's the best documentation of any
         | distribution
        
         | cubano wrote:
         | Isn't the pain of installing Arch the point?
        
       | elcapitan wrote:
       | What's everybody's favorite distribution on the Frame.Work 13?
       | Getting it next week, and toying around with
       | Arch/Debian/Ubuntu/Suse/NixOS/etc in VMs while waiting for it. I
       | think I'll have to throw a coin (or just take Debian).
        
         | andrewstuart2 wrote:
         | I don't have a Framework machine, but my favorite distribution
         | on any machines has been Arch, because especially if you follow
         | the wiki install, you end up with a lot more knowledge of how
         | modern Linux works, and you get to pick any/all of the the
         | options (desktop env (or tiling window manager), bootloader,
         | display manager, etc) available for modern Linux systems.
        
         | moritzruth wrote:
         | I've been using Void Linux for the last 1.5 years because I
         | wanted an Arch-like experience but without systemd. I haven't
         | had any unsolvable problems.
        
           | lukan wrote:
           | "I haven't had any unsolvable problems."
           | 
           | That sentence can have a lot of meanings, when one thinks
           | that everything is possible with enough effort ..
        
         | ggpsv wrote:
         | Fedora has worked flawlessly for me.
        
           | lukan wrote:
           | After years on Ubuntu, then Arch I also just recently
           | discovered Fedora as a well polished alternative.
           | 
           | I do love the Arch community. But I feel less motivation to
           | tinker nowdays and Fedora was a pretty nice works out of the
           | box experience so far.
        
             | Jnr wrote:
             | I set up Fedora for family but I still use Arch myself,
             | because there is no good alternative to AUR on Fedora and
             | there are more packages that I need for software
             | development.
             | 
             | Sometimes Arch saves so much time, that even the infrequent
             | necessary manual maintenance after updates makes it worth
             | it.
             | 
             | And even when trying to run stuff on distros other than
             | Arch, I frequently look up instruction on Arch Wiki and in
             | AUR PKGBUILDs.
        
               | adhamsalama wrote:
               | I'm using Nix package manager on Fedora and it's OK.
        
           | mixmastamyk wrote:
           | Fedora was almost required on AMD framework for a while,
           | because hardware was brand new and Debians were too old. Now
           | with Mint updated, I'd recommend take Fedora or Mint and
           | Cinnamon.
           | 
           | Beware, I just realized my AMD does not support S3 sleep. Too
           | late to return.
        
         | ppseafield wrote:
         | I'm running SUSE Tumbleweed. Fast package manager, up-to-date
         | versions of just about every package you could want. Never had
         | any driver issues or issues installing.
        
           | ww520 wrote:
           | After going through Centos, Ubuntu, Arch, and Mint, I'm
           | settling down on OpenSUSE. The rolling updates just work.
        
         | xelamonster wrote:
         | Not a Framework but a System76 laptop, I got to a point where I
         | couldn't stand any desktops based on Gnome and wanted something
         | more predictable and better documented than PopOS or even
         | Ubuntu.
         | 
         | I'm enjoying AlmaLinux with KDE and not seeing any reason to
         | switch so far, it's rock solid stable and RHEL docs are better
         | than anything aside from maybe Arch. All the dev tools they
         | tend to not have without fail have an `asdf` plugin, or they're
         | written in Rust and `cargo` can install them from source just
         | as easily. KDE might be bloated but not in a way you'd notice
         | with a modern processor and I love the customization options.
         | 
         | Arch is a great option too if you want all the latest and plan
         | to stay on top of upgrading. I like `paru` as a package manager
         | there. Most important thing you can do on Arch is add a quick
         | search shortcut for the Arch Wiki, it's so good I'll reference
         | it for help on any distro.
        
         | i_use_arch_btw wrote:
         | I use Arch, but I might be biased
        
       | yndoendo wrote:
       | I've had the same Arch installation between four laptops over 12
       | years. Boot from a USB Linux distro and enter command line.
       | Partition the new laptop, setup disk encryption, rsync the file
       | system via USB external enclosure, modify the ftab, crypttab, and
       | refind.conf, reboot. Don't have to re-install any software or re-
       | setup and sync any accounts.
        
         | geoka9 wrote:
         | Same, but with Debian for almost 20 years. Don't remember how I
         | did it before, but the last few migrations were just `dd
         | if=/dev/sda.old of=/dev/sda.new` and then gparted to enlarge
         | the root partition to fill out the new disk.
        
           | jaredhallen wrote:
           | This is how I do it also. Sometimes if I feel like changing
           | the partition layout for some reason, I partition the new
           | drive first and use dd offsets to copy the partitions one at
           | a time. And of course you may need to resize the
           | filesystem(s) as well. Works with Windows, too, although I
           | usually change the storage driver to some generic ATA or
           | something first to prevent it from blue screening on the
           | first boot. And sometimes with newer versions of Windows you
           | have to fiddle around with bootrec and whatnot.
        
         | mixmastamyk wrote:
         | Similar here, but I used a TB4 cable so didn't have to take out
         | the storage.
        
       | mrfinn wrote:
       | I followed a very similar process a couple of years ago (time
       | flies!) and I'm very happy with the results. I'm not even using
       | Arch but Artix Linux but the system runs very smoothly, almost
       | not a single problem updating in years, using all kinds of
       | cutting edge software which is amazing.
       | 
       | On top of what the article mentioned a few tips:
       | 
       | - To achieve really good battery duration I installed powertop
       | (which I run on every boot for auto-adjustment) and thermald
       | which does a great job with Intel CPUs.
       | 
       | - Suspension issues are common, in many cases often was about
       | different part of the system overlapping. I ended up disabling
       | hibernation which I never use anyway, but suspending after
       | closing the lid for me is a must in a laptop.
       | 
       | - Fusuma or something similar is also a must to take advantage of
       | the touchpad.
       | 
       | - Yet another gem, fprintd was a GREAT discovery. First time I
       | autorized a sudo with my finger I couldn't help it but have a big
       | laugh.
       | 
       | PS. Bonus point: This is the second NVidia Optimus laptop that I
       | own and even if Optimus support has gone a long way and now it
       | almost works perfectly out of the box to achieve a really good
       | performance eg in videogames, I use a script to switch between an
       | Nvidia only mode or an Optimus mixed mode.
        
       | freeqaz wrote:
       | Nit picking a bit but I prefer btrfs even if it's slower. Easier
       | to work with.
       | 
       | What bootloader is this using? Or is it just straight EFI
       | booting?
       | 
       | I helped write a guide a few years back that still is what I do
       | using systemd-boot. https://github.com/lunasec-
       | io/lunasec/blob/master/docs/blog/...
       | 
       | How is Wayland support these days? I love i3 but I know Sway
       | promises to be close enough.
        
         | arendtio wrote:
         | Well, Plasma 6 made it the default. Some things are better with
         | Wayland (e.g., performance), but others are worse (e.g., no
         | session restore so far...).
         | 
         | What bothers me is that I have the impression that when I
         | switched from X11 to Wayland a few months ago, Wayland was a
         | bit more stable when it came to suspending and restoring the
         | pc. But after a few months, I had the same problems (crashes)
         | as with X11. It feels like someone fixed something in the wrong
         | direction.
         | 
         | Maybe it is just bad luck.
        
       | Levitating wrote:
       | These types of posts are often more harfmul than helpful.
       | ArchLinux already has proper installation instructions and those
       | who cannot follow them aren't recommend to run it. The main
       | installation issues the ArchLinux forum sees is from people
       | following outdated third party installation guides.
        
         | semiinfinitely wrote:
         | these days I ask chatgpt for help to install arch instead of
         | using the docs which are designed as a gate keeping mechanism
         | to discourage the uninitiated by making them feel stupid.
         | 
         | chatgpt just tells you how to do and turns out its really not
         | that hard.
        
           | scandox wrote:
           | I really think that's unfair. The install docs are quite long
           | but they try to give people options. It's not gate keeping to
           | provide a lot of detail.
        
             | semiinfinitely wrote:
             | I actually agree that the Arch docs are absolutely
             | excellent in their level of detail, precision and
             | helpfulness. I also think its possible for them to
             | simultaneously be a gate keeping mechanism and stand by
             | what I said
        
               | dingnuts wrote:
               | well if you stand by them, do you plan to present actual
               | evidence of the alleged conspiracy or are you just making
               | these statements to troll?
        
               | swasheck wrote:
               | isn't gatekeeping inherently subjective? it's going to be
               | hard to present objective evidence to a subjective
               | expression of opinion.
        
               | Jtsummers wrote:
               | Gatekeeping is an active effort to keep others out of
               | something (out of a field, away from information, etc.).
               | Where is the _active_ effort to keep people out of Arch
               | when the documentation is made available for free?
        
             | mlindner wrote:
             | The install wiki is full of outdated information that
             | causes people to install outdated and old methods of doing
             | things. So I wouldn't advise people to use it, other than
             | the fact there's no other option.
        
           | calepayson wrote:
           | [This video](https://www.youtube.com/watch?v=68z11VAYMS8) was
           | a godsend when I first got started and I recommend it for
           | anyone installing arch.
        
         | Levitating wrote:
         | Just as an example, this guide suddenly assumes that "yay" is
         | installed. Even though AUR helpers like yay aren't officially
         | recommended by ArchLinux and also aren't trivial to install.
        
           | mlindner wrote:
           | The design decisions around AUR befuddle me to this day. It's
           | utterly arcane in how to use it. Or rather it feels like it
           | wasn't designed at all and simply evolved.
           | 
           | I highly recommend people to use "yay" and similar helpers
           | that make a lot of the problems simply go away.
        
             | m463 wrote:
             | I've always thought it was more for developers. You can get
             | something into AUR easily, and it is basically the basis
             | for a real package.
             | 
             | So low effort for developers.
             | 
             | Meanwhile I think the high effort for users of AUR is an
             | appropriate barrier to entry.
             | 
             | Every dangerous thing I've seen in life benefits from good
             | situational awareness, and all the "learn makepkg" stuff
             | plus "can't be root" seems to match the learning effort to
             | the risk.
        
           | m463 wrote:
           | Only "suddenly" after he links to his other post describing
           | AUR and installing yay:
           | 
           | https://giacomo.coletto.io/blog/arch-conf/
        
         | neilv wrote:
         | I think the post title is understated, since I had a related
         | thought: it's not hard to install most Linux distros on a
         | laptop, and this post will intimidate people.
         | 
         | This post is about how one person did it on hard mode, to get
         | it just how they want it. That's fine.
         | 
         | I suspect that most of the people on HN could pretty easily
         | install Debian, without documentation (just write this file raw
         | to a USB flash drive, boot the laptop from it, and mostly
         | accept the defaults from the menus):
         | 
         | https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/d...
        
           | rahimnathwani wrote:
           | The article isn't about how to install a Linux distribution
           | on your laptop. It's about installing _Arch_ on your laptop.
           | 
           | The fact that installing Debian is easier is true, but also
           | irrelevant.
        
         | m463 wrote:
         | nonsense.
         | 
         | I learned the arch linux installation from the arch web page.
         | I've stepped through it probably 50 times over the years to
         | install various systems.
         | 
         | It becomes this "choose your own adventure" style installation,
         | and you quite quickly get worn down by the branches and start
         | making expedient choices over more involved choices.
         | 
         | So many of my laptop installs have had simple partitions,
         | systemd boot, and on and on and ending with a text login.
         | 
         | Each choice for a more capable system would require extensive
         | learning and the risk of having to start over.
         | 
         | These instructions take you through complex choices like secure
         | boot, LVM, choosing a desktop, a graphical boot and more.
         | 
         | This installation guide gives you a fully functioning system
         | (like you would get with a full distribtion).
         | 
         | The author had to learn from a fully-functional manjaro
         | install, and then walked us through the same thing with arch.
         | 
         | Having a full desktop os with arch in the end is a really
         | wonderful goal, and might be worth the risk of having problems
         | with the install (which I seem to get with arch anyway)
        
       | SadTrombone wrote:
       | If people want Arch with a GUI installer I would recommend
       | EndeavourOS instead of Manjaro. EOS offers a much more
       | native/close-to-Arch experience while Manjaro has many more of
       | its own repos/packages/OS modifications (and issues) and is more
       | of a Linux Mint to Ubuntu situation.
        
       | mlindner wrote:
       | That sector size change is interesting. I got warned off of doing
       | that for my SSDs with some vague statement that lots of software
       | expects 512 byte sectors. Can anyone further comment?
        
       | badgersnake wrote:
       | "Modern" is an utterly meaningless word and this blog uses it a
       | lot.
        
         | mlindner wrote:
         | Modern means "better designed with the current software usage
         | environment in mind".
        
       | okasaki wrote:
       | I just use archinstall, which is similar in difficulty to GUI
       | installers, i.e. not at all difficult.
        
       ___________________________________________________________________
       (page generated 2024-09-14 23:00 UTC)