Comments (14)
Yes we can add more subvolumes but if I move /boot (which atm is a fat32 partition) into a @boot btrfs subvolume it'd get encrypted and that wouldn't allow us to use LUKS2 (which means defaulting to LUKS1 and decrypting two times the system at boottime, with the first time being slow since we're not in userspace yet and the bootloader can't use all the CPU decryption algorithms). So TLDR, i can add /root, /opt etc... but not /boot unless we move to LUKS1...
from easy-arch.
I think we shouldn't add /boot subvolume in our case. I forgot that suse encrypts the entire drive including /boot so it's different story. So let's create subvolumes with suse style just without /tmp and /boot. I'll also try to test the snapper-systemd-boot tomorrow and if it'll work I'll probably ask someone to package it on aur.
from easy-arch.
It seems that grub can boot from a luks2 encrypted partition: https://keyb0ardninja.github.io/BTRFS.html#luks2-setup
from easy-arch.
Oh well it indeed can, the problem is that the early decryption (the one that happens to unlock grub first) will be very slow as there's no way to use CPU acceleration for the decryption algorithms. And btw if /boot/ is on a LUKS2 partition that will not work, you can encrypt /boot but it has to be inside a LUKS1 container.
from easy-arch.
Not having the /boot directory as an integral part of the snapshot, makes the restore quite useless, in case of a kernel upgrade. Thatβs why I think it is quite important to address this.
Let me say that this project is very cool and the bash script clean and elegant.
from easy-arch.
@paolomainardi So you're suggesting to move the ESP to /efi and encrypt /boot right (that's a consequence of moving /boot to its own subvolume). I can try btw.
from easy-arch.
I think what they are requesting is that you switch to something more like what https://github.com/tommytran732/Arch-Setup-Script uses, albeit /var/ being that separate probably isn't totally necessary. AFAIK this is what SUSE uses, the main advantage being that you can actually run snapper rollback
after booting any read only snapshot within grub, and it automatically saves a read only snapshot of your current (broken) system, and then creates a read/write copy of the snapshot you booted into from grub, and sets it as the default root partition. The fork I linked is currently non-functional, but I just forked it and got it working enough to create a bootable system, with snapper rollback
functioning. (That being located Here)
from easy-arch.
When we talk about the /var
subvolumes there's just 1 folder in arch that makes it impossible (or painless at least) to create just one subvolume for that directory. It's the /var/lib/pacman/local
which has to be there since it has information about every installed package so in case of rollback pacman could throw errors. But for arch we could create a few subvolumes for var like suse did before Jan 2018 and eventually add more later. What do you guys think? @ShaunTheQuietGamer yes it was all about snapper rollback support.
from easy-arch.
I have found a solution to not create so many subvolumes in /var
. We can create one subvolume for /var
and backup pacman database for example via pacman hook. @classy-giraffe what do you think?
from easy-arch.
I think what they are requesting is that you switch to something more like what https://github.com/tommytran732/Arch-Setup-Script uses, albeit /var/ being that separate probably isn't totally necessary. AFAIK this is what SUSE uses, the main advantage being that you can actually run
snapper rollback
after booting any read only snapshot within grub, and it automatically saves a read only snapshot of your current (broken) system, and then creates a read/write copy of the snapshot you booted into from grub, and sets it as the default root partition. The fork I linked is currently non-functional, but I just forked it and got it working enough to create a bootable system, withsnapper rollback
functioning. (That being located Here)
It is needed. The main reason being, you would either not want those subvols rolled back or if you make them part of the immutable system, the system wont boot from grub-btrfs. On the other hand, pacman stores their database in /var, so you can't just make 1 single subvol for /var, because the database will be out of sync with what's actually on the system after a rollback.
from easy-arch.
Still not sure about switching to LUKS1 in favor of this setup. I'm more than welcome to change layout when booting i can encrypt the entire system with LUKS2.
from easy-arch.
@TommyTran732 what do you think about changing DBPath in /etc/pacman.conf
? This way pacman database could be moved to another location outside of /var
which would allow for one @var
subvolume.
from easy-arch.
I need to check if that has some sort of side effects. If it doesn't we can do that. On a side note, does the script work now? Cause I've had people complaining it didn't work.
from easy-arch.
@TommyTran732 what do you think about changing DBPath in
/etc/pacman.conf
? This way pacman database could be moved to another location outside of/var
which would allow for one@var
subvolume.
The way I think about it, if the user wanna split a subvol out, they can do it themselves. I am not sure splitting the entire @var
out is the best idea, cuz lets say if I do a system rollback I do want my system flatpaks to also rollback.
openSUSE splits out @opt
and it gets weird with apps relying on it, so idk. I didn't split it out from my script.
@classy-giraffe I just came back to Arch 2 days ago so I fixed up a bunch of stuff. The script should work now.
from easy-arch.
Related Issues (20)
- [feature]: Adding more package options to script. HOT 3
- Adding normal user account HOT 2
- Adjustments to default mount settings HOT 1
- Problem with snapshots subvolume HOT 3
- Proposition: two hard drive setup & systemd boot HOT 8
- Switching bootloaders HOT 30
- can i publish a based on script
- Can't Install arch using it on vbox HOT 7
- wheel privilege HOT 2
- Failed to commit transaction conflicting files could not install files to new root HOT 2
- how to use swap partition instead of ZRAM HOT 1
- bios compatibility HOT 1
- Selecting Linux Hardened leads to GRUB rescue mode HOT 6
- Not working on Asus laptop (GL502VS) HOT 10
- Unbootable installation HOT 3
- Request: Dual Boot HOT 2
- Make LUKS2 optional HOT 1
- Consider reducing ESP partition size HOT 2
- Mandatory Acess Control HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easy-arch.