17 ms·
Installing Arch Linux on a Laptop
- AlphaJack 2y agoThis 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 2y agoNice 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!
- 3np 2y agoThanks for sharing! Leaning on and only waving to yay might do the reader a disservice and cause more confusion by making the context very easy to skip over, and without that it will probably just be frustrating to keep using Arch and keep treating yay like a traditional pacman-style package manager... Doing it via makepkg first gets you some understanding of "what's going on under the hood" and what's basically the same regardless of which wrapper you use. Might be a game-changer in X years whenever the community moves on to the next wrapper. You have some cases where yay is being used to actually install repository packages (not AUR). Would recommend changing these from yay to pacman. Like from: yay -S mesa mesa-demos mesa-utils vulkan-intel intel-media-driver intel-gpu-tools to pacman -S mesa mesa-demos mesa-utils vulkan-intel intel-media-driver intel-gpu-tools It looks like aside from the nvidia drivers, the post is not actually installing anything from the AUR? Could consider instead an approach like "There's this thing called AUR ([Link]). [Brief explainer]. Some people use a helper like yay([current link]) aurutils or aurch. [Proceed to show manual build-and-installation via git-clone and makepkg, as well as how to rebuild/update later]"
- AlphaJack 2y agoThank you for the feedback! As you and other have suggested, I removed the "yay" requirement and added a brief explanation that its install instruction can be found in the other guide
- everybodyknows 2y agoGreat attention to security -- but what is your strategy for backup, as preparation for recovery from loss of the hardware?
- AlphaJack 2y agoI wrote my own python wrapper around Rustic and RClone to achieve 3-2-1 file-level backups: https://github.com/AlphaJack/rusticlone/ https://github.com/AlphaJack/rusticlone/. I first tried Rustic's native RClone support, but performance were awful. Backups are automated and run on a daily basis. To restore all my repo (or just one) I run a single command, if I have the repo configs in place. To backup the repo configs I manually make a second backup by putting them, among all other configurations for my devices, in an encrypted .7z archive, which I upload in a remote cloud storage. To reinstall Arch, I turned my notes into an automated script that does that in few minutes. The guide in the post derives from it, so it's quite up-to-date.
- Keppl8R 2y agoArchWiki: your source for Arch Linux documentation on the web. https://wiki.archlinux.org/title/Main_page https://wiki.archlinux.org/title/Main_page
- Foomf 2y agoI'm getting some mixed messages in this thread alone. Who do I believe? https://imgur.com/a/ylkWLfQ https://imgur.com/a/ylkWLfQ
- matheusmoreira 2y agoI recommend reading the wiki and judging for yourself. When I contributed a binary QR code decoding feature to zbar and the new version landed in the arch repositories, the first thing I did was edit the arch wiki with usage information. I also documented a process for encoding and decoding PGP keys to and from QR codes using that feature by editing the paperkey article on the arch wiki. When I installed arch on my laptop, I wasn't able to configure my screen's brightness. Searching the arch wiki revealed that by default the kernel's Intel iGPU drivers would set brightness by PWMing the screen which doesn't work over eDP connections which is what my laptop used, and also documented the exact kernel command line option I needed to make it work.
- zamadatix 2y agoThe Arch wiki is the 1st party official place for developers, maintainers, and users to maintain updated reference material. Whether one considers it up to date "enough" will be a personal judgement call but there is no better place to go in the long run.
- maleldil 2y agoNot just Arch documentation. It often has general use information, too, applicable to other distros and Unixes.
- kelnos 2y agoAgreed! I've never used Arch, but the Arch wiki often comes up in search results when I'm looking to solve a problem, and it's usually very helpful.
- elromulous 2y agoThis 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 2y agoInstalling 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 2y agonixos 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 2y agoI 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 2y ago> the arch documentation is second to none I am willing to argue that it's the best documentation of any distribution
- cubano 2y agoIsn't the pain of installing Arch the point?
- elcapitan 2y agoWhat'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 2y agoI 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 2y agoI'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.
- ggpsv 2y agoFedora has worked flawlessly for me.
- lukan 2y agoAfter 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.
- yndoendo 2y agoI'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 2y agoSame, 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.
- gessha 2y agoWould this work when upgrading from one Ubuntu LTS to another one? I’ve been thinking of going from 22.04 to 24.04 but I just get lazy.
- vetinari 2y agoNo, it is cloning existing installation from one drive to another. Basically what clonezilla would do. For upgrading ubuntu lts among releases, you go through their do-release-upgrade tool.
- jaredhallen 2y agoThis 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.
- 3np 2y agoHow do you know you're not propagating bitrot over time? Feels like a binary here and there may accumulate mismatching checksums over the years from bad hardware or some filesystem error... Not to speak of malware. All it takes is once... Feels a lot safer to do the system- and package installation from scratch and then rsync/dd only /home and /etc.
- mrfinn 2y agoI 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.
- UJH8NU7OXNfY7fz 2y ago[flagged]
- freeqaz 2y agoNit 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/2022-05-02-arch-linux-installation-guide.mdx 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 2y agoWell, 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.
- rahimnathwani 2y agoWhat bootloader is this using? Or is it just straight EFI booting? No bootloader. It says he's using a unified kernel image: https://wiki.archlinux.org/title/Unified_kernel_image https://wiki.archlinux.org/title/Unified_kernel_image
- marcus0x62 2y ago> How is Wayland support these days? I love i3 but I know Sway promises to be close enough. I think it depends on what you mean by “Wayland”, but I’m an Arch/Sway user with AMD hardware on my desktop and Apple silicon on my laptop, and Sway performance/stability is great on both, with the caveat that my laptop is now running the Asahi Fedora remix instead of Arch, since the Asahi team killed the Arch port off a while back.
- freeqaz 2y agoHow's Asahi these days? Stable enough to run as a daily?
- Levitating 2y agoThese 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 2y agothese 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 2y agoI 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 2y agoI 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
- SadTrombone 2y agoIf 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.
- Snacklive 2y agoi use Manjaro but i switch to the unstable branch as soon as possible so i can get the closest to Arch
- AlphaJack 2y agoI have a friend which is really happy with EndeavourOS, I am hearing only good stuff about it. Back when I switched to Linux, the choice was either Manjaro or Antergos, and Manjaro had a far wider community. Antergos was eventually archived, and from my understanding EndeavourOS become its spiritual successor.
- mlindner 2y agoThat 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 2y ago“Modern” is an utterly meaningless word and this blog uses it a lot.
- mlindner 2y agoModern means "better designed with the current software usage environment in mind".
- badgersnake 2y agoIt definitely doesn’t mean that.
- oldpersonintx 2y ago[dead]
- okasaki 2y agoI just use archinstall, which is similar in difficulty to GUI installers, i.e. not at all difficult.
- nmstoker 2y agoI know SteamOS uses an immutable file system over a custom Arch install. Have any people here tried this kind of thing with immutable file systems on Arch and is there a realistic benefit?
- m463 2y agoArch is pretty much the opposite of immutable. An immutable filesystem sort of implies a specific collection of packages chosen by someone else and combined in a monolithic release. Everyone gets the same OS, and overlays their data on top of it. Arch contains the specific packages you have chosen, and they are all updated asynchronously using a rolling release system. Not that you couldn't have a read-only os partition and a user overlay partition. With pacman it wouldn't really match the philosophy of immmutable.
- throwaway314155 2y agoHave you used SteamOS? I don't know the particulars but I'm pretty sure they do indeed make all the important bits read-only. You can temporarily use pacman as root, but it isn't supported so any changes made are overwritten when an upgrade happens or a system crash causes a the partition to be verified. Again, very much out of my depth here so sorry if i'm misusing terms etc.
- m463 2y agoI tried playing with it long ago (like 1.0 era) but it was too specific. From what I can tell, it seems that 3.x os updates are distributed as an entire os image? It is based on arch, but you don't update individual packages with pacman. Basically everyone gets the same unchanging os, with individual games and data separately.
- hughesjj 2y agoUsually better to just install on btrfs and use rollbacks/snapshots
- gerdesj 2y ago"From now on, I will assume you have created an unprivileged user to run yay." Was this written by a human? Jumping from a cut down step by step para-phrasing from the official manual to yay is a big step. If it was written by a human, then leave a ### TODO in the text to show its a work in progress or incomplete. "CUTEBOLLOCKS (this will not translate well!), CUTEBOLLOCKS (this will not translate well!)" --- I'd better explain the above: There's a UK TV programme called "8 out of 10 cats does Countdown". Prior to advert. breaks an anagram with a clue is presented to viewers (and they are specified twice), the anagram itself is generally rude. --- "Cute bollocks" is one way that I think of the original post - they have taken the Arch install manual and ripped most of the useful bits out and created a narrowly focused synopsis. They have been "cute" - link on HN, with engagement. Bollocks - that's my considered review of the quality of their article. We've all got better things to do than engaging with wankery. Please stop.
- m463 2y agoFollow the link just before using yay, where he explains makepkg, yay and an unprivileged user.
- pm2222 2y agoMy vote goes to EndeavourOS as others have already mentioned here. Manual install was the way to go and is still the preferred way to setup a server/cli. With that experience in mind for a daily driver with GUI I use EndeavourOS. The default KDE works.
- prmoustache 2y agoI am not sure I understand the point of using TPM + PIN to decrypt the drive for a single user system. I am fine just using the passphrase and I just configure my graphical login manager to log straight to my preferred user on start in order to not have to type crefentials twice at boot time.
- AlphaJack 2y agoI found TPM + PIN to be more secure than TPM automatic unsealing, and faster than typing my long passphrase. I haven't tried pam_autologin yet, but I see the convenience of it.
- krick 2y agoIf the disc is encrypted (and otherwise nothing would save you anyway), why do I need the Secure Boot, really? What harm it can do for somebody to boot my device from an unauthorized drive?
- AlphaJack 2y agoThe threat model is the Evil Maid Attack. I found Secure Boot + UKI + TPM PIN (God forbids automatic unsealing) + FDE to be great for both security and usability. [0]: https://en.wikipedia.org/wiki/Evil_maid_attack https://en.wikipedia.org/wiki/Evil_maid_attack
- znpy 2y ago> In our case, LVM makes it easy to allocate virtual partitions inside an encrypted SSD partition. Is it really, though? The author is using LVM to manage "virtual partitions", but then it's using 100%FREE for the larger partition, and using ext4 for all partitions. In my experience this setup makes it actually harder to manage partition sizes, as before shrinking a partition a resize of the underlying ext4 partition would be necessary. Nowadays it would have been better to use one of the modern volume-managing filesystems. AFAIK the option available out-of-the-box in Arch Linux would be btrfs, but ZFS is another excellent (better, in my opinion) option.