Moving to Arch, help making the right choices, encryption and security + need to keep some windows apps.
Hi, sorry for longer and probably quite newb post. I have already successfully installed arch in VM and bare metal in past. I have also used various linux distros at college, yet I have serious gaps in understanding some basic stuff. Usually all mine linux machines were "disposable" systems that I wiped at the end of the year. Now that I am moving to linux as my main environment, I would like to keep it tidy, that's why this post.
I am at a new job as a junior sysadmin. That's why I am asking you for help, to speed up some of the research so I could have working system. I would also like to secure my system to the reasonable amount.
Windows apps and how to use them?
So I have basically three apps that I am used to and I would like to keep. Adobe Light-Room, Photoshop and MS Visio. As they do not really work in Wine, I have only two options to my knowledge (feel free to recommend different solution):
- Dual-boot - I am not sure how this would affect the encryption process, as there is so much information. I believe the only "obstacle" would be, that I would have to chose encryption program that supports encryption of separate partitions. Also I would be limited by the boot-loader, which would have to allow encryption of a filesystem I choose.
- Another possible problem I see is sharing files between systems. As for work in Visio, I would need resources from my "work" system. This could be
- Virtualization - Mine desktop has i5-4590, R9 380 and 8GB of ram. On this setup, I had really poor performance in mine linux VMs (usable for C programming, but gui lagged), that's why I am a little bit skeptic. Al-tho it could have been due to under performing software (VirtualBox) or wrong configuration (most likely?).
- My current laptop has i5-6500U and handles these applications on a windows host quite well.
The laptop I will be installing Arch on is ThinkPad X1 Carbon 6th with i7-8650U and 16GB RAM. As this processor has VT-x support, the virtualization might not be as bad as I am expecting. I have also find an article how to enable GPU Passthrough on intel integrated graphics, so I might give it a shot. What do you think, should I be fine with just the VM?
Encryption, snapshots/backups, other security measurements.
As I see it on the forum, VeraCrypt and LUKS are the most popular - what is the selling point of each?
I would like the option to make a snapshot before updating, or doing some questionable stuff. To my knowledge there are three options:
- ZFS - We have spent a few classes at college playing with that. I do not believe it is suitable for workstation. At least I wouldn't feel comfortable in it myself.
- BTRFS - I have never tried it myself, but what I heard is, it is slow-er and not really that stable or lacking some core functionality?
- LVM + Ext4 - this seems like the easiest and proven solution. Not sure yet, if it brings some challenges with encryption and possible dual-boot.
Now should I bother with signing the kernel and using Secure boot? To my knowledge having encrypted disk already means that after rebooting the data are sealed.
About the backups. There is not really much on the wiki. First I need to decide the partition/encryption scheme and then look for backup solutions as I see it. Found a tool called duplicity that is backing up the filesystem using rsync. Seems simple enough. I will not care about movies, music and stuff - I will have the important stuff on my desktop anyway and duplicity should let me chose what to backup.
The full backup will be just for disk failure really. The snapshots should work all of the other times.
And if you ever need to reinstall. Do you like have some base install script and then ansible playbook to install all your stuff and fetch the dot files from your git? If that's the case, when you need to install something, are you doing it with ansible? What is your approach to keep it up to date? Or is there a better way? <-THIS is probably the top question as if I f**k up, I want to have a way to restart fast.
Bonus question: Is it a bad practice to save password in your VPN client? And how about your SSH key? I am making hundreds ssh connections a day - should I left it unencrypted, should I write the password in console every time, or is there a better way?
Package managers - updates and "bloat":
What I mean by bloat is, that when installing/uninstalling stuff. Before I find software which suits me, I do not want to get tons of residual files. I know there are no registry in Linux but are there other ways of stuff staying in system after uninstalling? Or actually better question would be - how to use pacman + yay in order to get rid of any files (config files, logs, everything) and packages associated with the program you no longer wish to use? Is there a specific way to install stuff for the package manager to remember all the file locations the package uses?
Or is it just good behavior to preferably test new programs in VM and only install them on your main OS when you believe they will stay with you? For example I can not decide between Awesome WM and bspwm. Can I cleanly get rid of the other when I decide?
I understand, there are options for pacman to find ghost files. Is that everything I can do? I have also read that until I understand package managers properly, I should use makepkg instead - since makepkg is provided by pacman, will the pacman database still know about the stuff I installed "manually"?
Now about upgrading - I understand, that to safely upgrade packages and not "break" your environment, you should read the upgrade notes. Are y'all just reading www.archlinux.org or is there a tool to fetch the update info in terminal, when upgrading? Also, the website mentioned is just for mainstream packages to my knowledge. What about AUR news?
I am really sorry, if most of this stuff is easily found in the wiki. I was unable to find clear answers and felt kind of overwhelmed with information, where you search for one thing and suddenly you are 10 tabs deep. Thanks in advance for answering any part of this essay.
About this post
- Posted
- Archived
- Score
- 3 · 100% up
- Kind
- Text
- ID
- exev38
20 comments
Can’t really help you regarding the windows apps but I’ll give you my 2 cents about encryption, dual-booting and everything in between.
So first drop the VeraCrypt idea for now, don’t get me wrong I love it and it’s great but IMO it’s something you do after your system is installed, it’s biggest strength is the ability to create encrypted volumes inside a file and also hidden volumes (really great feature) but let’s focus now on what I believe is the best setup for you if you wanna dual boot.
This is just my 2 cents as I just been through the same process of research, perhaps there are better solutions out there but I found the below to be the easiest and most practical while not compromising on security.
First let’s talk dual boot, I’m not sure what’s you’re knowledge level so I’ll summarize what I think you have: most modern laptops boot in UEFI mode (as compared to the older BIOS/MBR), if that’s the case then you probably already have what is referred to as an ESP partition, it’s a simple MSDOS formatted partition usually at the first slice of the first disk which is usually sized between 100-500MB and contains all your different boot loaders.
In order to decide which bootloader to boot from the firmware looks at your NVRAM variables and thus knows which file to boot. Most systems check certain paths such as
EFI/ BOOT/bootx64.efior similar.So now in order to dual boot you need to install a boot loader capable of dual booting, do your research what works best for your other OS and your hardware and prepare accordingly, most common boot loader are grub and gummiboot (systemd-boot), but there are also other good ones you can install like rEFInd.
Once you figured that out let’s talk about the easiest security setup, IMO messing with partitions is very risky and I try to minimize that to the absolute minimum which is creating a single partition for Arch Linux, that means that the final layout is at least 3 partitions:
ESP (/boot) partition: already exists and we reuse it for /boot
Slice 1: your current OS (Mac, windows, etc)
Slice 2: Arch
You may ask yourself so what about the internal partitioning and encryption which is a great question I’m going to answer now:
On partition #2 you create a LVM and encrypt it with LUKS, so you get “full disk encryption”, the only part that won’t be encrypted is
/bootwhich IMO isn’t critical at all since it only holds the kerne and boot loaders, this also makes it simpler, encrypted boot is a bit more complex setup as you’ll need to load code to memory to be able to decrypt the disk, this way your kernel loads from the unencrypted boot and asks for your input to unlock the LVM.Now as for the partitioning, it’s all up to you, personally I created 3 parts inside the LVM, root, home and swap (note that your swap is encrypted this way).
As for ZFS/ext4/btrfs, I wouldn’t recommend ZFS not because it isn’t good but just because it isn’t part of the kernel which creates a “lag” between updates as happened in the last 5.5 kernel update that broke ZFS, so we’re left with ext4 and btrfs, both solid and great options with pros and cons, personally I chose btrfs and can’t be happier as it already saved me once as I created my setup without a swap partition and shrinking, resizing and making room for my swap couldn’t have been easier as well as the best feature of btrfs which is the snapshots, but again all up to you, if you wanna to more “mainstream” to ensue support out of the box for most things choose ext4.
I wrote this from mobile while being on the road so it’s quite disorganized lol, hope it helps.
Hi, first of all, THANK YOU for the detailed answer!
I am still unsure I need DualBoot, as the laptop I am using the windows apps does not have dedicated graphics card either and the new laptop has basically double the specs (more cores, more ram, VT-x).
Anyway - if going the dual-boot route, I was looking into rEFInd for the eye-candy, but it seems it doesn't support full disc encryption. So Grub seems like the safe choice.
Since you are using BTRFS, how do you find the performance for day to day tasks? I have seen some tests where it seemed to be way slower, due to the COW feature. But maybe it is just a matter of setting? AFAIK LVM Offers snapshots too and should be significantly faster.
Not sure where you got the “rEFInd doesn’t support full disk encryption” I’m actually using it to triple boot OpenBSD with full disk encryption softraid and Arch LVM on LUKS, if you go that route I can send you my
refind_linux.confwill save you some time, as I mentioned it’s better to not encrypt /boot and simply use the existing ESP, if you do so then rEFInd works no problem, as for the eye candy, I got ya lol.Btrfs works really great for me so far no the entire install is far superior in speed to OSX, I won’t lie though I haven’t done any benchmarks and just went with a hunch, I didn’t know LVM had snapshots, still btrfs is really flexible on paper and I liked that.
Lost me at Adobe. Stay on windows.
Well, I know there are already some good alternatives, but it comes to working in the program for many years. Needing one piece of software shouldn't mean banishment to inferior OS.
Take it up with Adobe...or take the time to learn something new.
one thing first, since you want to be a sysadmin it may be favorable to use either a Red Hat or SUSE distro as they are more commonly used in corporate environments
not trying to make sound Arch Linux bad, but it tackles some things differently
anyway, I will give a run down of my own system which probably comes close to what you want
-----------------------------|----------------------------------------|---------------------|-------------------------------- fat32 /boot partition | LUKS encrypted | Windows boot loader | all other Microsoft partitions includes rEFInd Boot loader | includes a btrfs volume | |
| with subvolumes for /home and /var/log | |
I cleanly seperate Linux and Windows on different disks (one NVMe SSD and one SATA SSD), including their EFI partitions/boot loader
all my btrfs volumes are on a single LUKS/dm-crypt volume, this means that I can unlock all partitions with only one passphrase
also I'm using a swap file instead of a swap partitions, this means that my swap file is already covered by encryption if I store it on an already encrypted partition
one thing to mention is that you shouldn't get hang up on the term "full disk encryption", it simply means to encrypt all linux system partitions (often times excluding /boot since only GRUB supports this)
I would avoid Veracrypt for system partitions if possible, it's good if you need to access the encrypted data from Windows too but dm-crypt/LUKS is by far the more proven solution more to read: https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system
why did I choose btrfs? Simply because I didn't liked how ext4 is so much barebones without the "bandaid" lvm and ZFS has really big licensing issues
ZFS in particular had some issues in the past with major kernel updates which broke it for a small amount of time
btrfs has some really specific issues with RAID5/6 setups, however I don't need any RAID setups at all
I run snapper snapshots automatically via pacman hook before any upgrade
keep in mind that a snapshot is NOT a backup, always create a backup on a separate disk additionally
the arch wiki has again a really big article on this topic: https://wiki.archlinux.org/index.php/Btrfs
technically someone could still temper with your boot loader
but instead of encrypting the boot loader or using secure boot, you could also put the boot loader on a usb drive you carry on you (if you are paranoid enough)
this is tricky, there are two ways most people do backups:
the later is the fool proof solution and used in i.e. Clonezilla, you can also safely restore them to a working system any time on the same disks
file backups are however better if you need to switch to a different disk with different filesizes or want to switch to a different partition scheme
I currently on the way to do some "config" packages hosted on my own unofficial repository, this gives a rough outline on how you can use them: https://old.reddit.com/r/archlinux/comments/8x3fmj/im_installing_arch_on_a_new_system_tomorrow_for/e20kl55/
for /home dotfiles I have a git repository
pacman -Rsn <package name>removes all system config files (read: NO user config files) and removes all dependencies installed alongsideyou can also check all folder which belong to a package via
pacman -Ql <package name>additionally
pacman -Rsn $(pacman -Qdtq)oryay -Ycremoves any unneeded dependenciessomething worth to mention: pacman will store packages files into
/var/cache/pacman/pkgand won't remove them by default and can get quite easily several GB bigsome options to remove older packages: https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache (I'm using myself a pacman hook which only keeps the two latest package versions)
well, sure you can
but I would say it's more work/tedious than simply starting a VM snapshot with some bare arch linux installation and test some things here beforehands
It's way better to actually read the PKGBUILD of self-build/AUR packages, no matter if you use makepkg or for instance
yayI kinda dislike this "gate keeping", use an AUR helper if you wish
I had good success simply reading this subreddit, bigger issues get cross-posted here
the official forum also has a dedicated sub-forum: https://bbs.archlinux.org/viewforum.php?id=44
additionally you can print arch linux news via yay:
yay -Pwwill list any new news (oryay -Pwwto list all news)this is pretty common, you will basically live in the Arch Wiki and any Arch forum
if you don't like this, you should think about using another distro
I only use my Arch Linux for some really light coding, server maintenance with only two servers via direct ssh/ a bit ansible and don't use any Adobe products
so I can't give much more information, you should probably test yourself if running windows in a virtual machine does the trick for you
afaik Adobe CC products won't work with Wine, older non-CC versions however should
You don't need Arch. If it's for work, something more reliable would be recommended (Ubuntu, Debian etc). Full disk encryption is recommended, and if You NEED certain Windows apps, dual boot is your best option (sure you might be able to use wine etc work, but you don't want to make your job wait for you to figure it out). And those are not known for working with wine. Yes, you could VM, if you have the resources, but keep in mind you're splitting your resources between two OS's so you'll need decent specs.
LUKS is competent and built into everything Linux. Use it. And you could go for a more advanced FS but LVM +Ext4 + encryption is the fastest and lowest on the resources. And most stable.
Don't bother with secure boot.
Good luck!
Thanks for the answer! The windows apps (except Visio) are for my second freelance work. I edit most stuff on the desktop - I have them on the laptop for times when I shoot events and I need to put few pics on the Instagram straight away.
You are probably right... I should use some other distro until I have time to figure all of this out myself.
EDIT: as my current laptop has half the specs of the new one, I thought I might get by with using VM for the windows apps. But honsestly I am not sure.
Try Fedora.
It has a great installer - easy to encrypt your install.
Almost up to date as Arch.
Red Hat is behind it - a big plus.
More stable than Arch.
Updating to a new version once a year is easy - 99% no breakages (can't say that for Arch).
It has sane defaults right out of the box.
Good point