-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master] Crashes trying to use an already existing btrf layout. Does not find the root mount point #718
Comments
It might be an issue exclusively with my layout, or a btrfs specific one. I will investigate the issue further, so you don't have to worry with this one for the time being. |
Could spend some time at it and can pinpoint the cause. The real solution would need the rethinking of the Partition class and its relation to Filesystems to make it to get along with btrfs By the way, the main reason of my layout is because I could boot into an older snapshot / very different root contents "simply" switching the subvolid in the entries file and/or changing fstab. |
I need your underlaying specs more than anything tho, because this is 99% guaranteed a timing issue between us being "too quick" and the hardware not reporting changes, and those changes are based on how quick your hosts CPU, cache and harddrive is. |
@wllacer: Loop devices & USB drives are currently very shaky and I would almost dare say not supported at this moment. Regarding btrfs subvolumes, we're aware they're not complete. The support for this will be built on coming releases. |
Got it. Host machine specs are Intel i5 8250U, system uses nvme but vdi is in the 5400rpm HDD, 12GB ram (guest has 4gb), up to date windows 11. |
Try it, if it works let me know. We might need more than 10 seconds of sleep for the 5400RPM specs. I hoped it was enough. |
I've moved vdi to Adata Xpg 8200Pro 256GB nvme drive but still same error. |
I've now doubled the disk timeouts to roughly 20 seconds. Successful attempts should still be delayed by maximum a second or so. So you should be able to test with the 5400 RPM drive again and have different results. |
@Torxed I've tried 3 times on 5400rpm hdd and 2 of them failed with same error. |
I can increase the time some more, but it's specifically these two parts of the code that "breaks" when it breaks.. archinstall/archinstall/lib/disk/partition.py Lines 144 to 160 in d2a4572
And the following code will attempt to find a partition with archinstall/archinstall/lib/disk/filesystem.py Lines 35 to 47 in d2a4572
I really, really don't get why the kernel some times returns the UUID immediately, and some times not even after 20 seconds. But if you run |
Oh for f*** sake I'm born yesterday.. archinstall/archinstall/lib/disk/partition.py Line 156 in d2a4572
Will ALWAYS return None .. my bad..
|
Oh god lol |
Haha, yea.. I haven't laughed this hard and cried at the same time.. Oh well hehe.. You live and you learn ^^ Fix is in master now! Thank you for bouncing ideas! |
@Torxed I can confirm it's working perfectly! Thanks heaps! |
Humm, this is a new issue. I don't think we need to create a completely separate issue. |
Partuuid is empty for ainstloop after 2 mins :/ |
I wonder if it should use the PARTUUID of the parent device instead of the logical loop device created by cryptsetup. |
Minor issue, it's the |
@hkaancaliskan: Should be fixed in master now! : ) |
Bad news. Still crashes for me, although the error is a bit more specific
This error was the original error that prompted me to have a look into archinstall (it was with v2.2.0). It happened to me both under Virtualbox, looped devices, and a real SSD. Might be there are delays, my rig is extremely underpowered (an Intel Celeron N2840@2.16GHz, 8 GiB of RAM and a Crucial MX500 SSD), but my reading of the code hasn't changed: there are naming issues with complex btrfs subvolume schemas. I understand too well that the code for that beast is still not ready. And, as it is the question which bugs me, I want to help it solved. |
IIRC there was complaints about me mounting the subvolumes, but this script mounts subvolumes as well. I can wrap my head around btrfs and subvolumes, but I'll need a few days of tinkering with it. I will extract the command sequence used (and probably create a |
mkfs.btrfs -f /dev/mapper/ainstloop
mount /dev/mapper/ainstloop /mnt/archinstall/
btrfs subvolume create /mnt/archinstall/home
mount /dev/mapper/ainstloop /mnt/archinstall/home -o subvol=@/home
btrfs subvolume create /mnt/archinstall/var/log
mount /dev/mapper/ainstloop /mnt/archinstall/var/log -o subvol=@/var/log
btrfs subvolume create /mnt/archinstall/var/cache/pacman/pkg
mount /dev/mapper/ainstloop /mnt/archinstall/var/cache/pacman/pkg -o subvol=@/var/cache/pacman/pkg
btrfs subvolume create /mnt/archinstall/.snapshots
mount /dev/mapper/ainstloop /mnt/archinstall/.snapshots -o subvol=@/.snapshots vs mkfs.btrfs -f /dev/mapper/ainstloop
mount -t btrfs /dev/mapper/ainstloop /mnt/archinstall/
btrfs subvolume create /mnt/archinstall/root
mount -o subvol=root /dev/mapper/ainstloop /mnt/archinstall
btrfs subvolume create /mnt/archinstall/.snapshots
btrfs subvolume create /mnt/archinstall/home
mount -o subvol=home /dev/mapper/ainstloop /mnt/archinstall/home
btrfs subvolume create /mnt/archinstall/opt
mount -o subvol=opt /dev/mapper/ainstloop /mnt/archinstall/opt
btrfs subvolume create /mnt/archinstall/srv
mount -o subvol=srv /dev/mapper/ainstloop /mnt/archinstall/srv
btrfs subvolume create /mnt/archinstall/var
mount -o subvol=var /dev/mapper/ainstloop /mnt/archinstall/var
umount /mnt/ainstloop # Is done prior to running the above 'mount -o subvol' The only huge difference I can see is that you unmount |
There is a subtle difference. You create one simple file tree under /mnt/archinstall. Subvolumes behavea as subdirectores in the same partition. And the root partition has a name as any other (no subvolume in name) . |
I see, I'll take a second look at the diff with that in mind. Edit: Re-opening this as it's related to re-using existing BTRFS structures and not necessarily one of the issues mentioned during this thread. |
edited |
I could work a little on this problem. And I'm glad to say that I managed at last a minimal installation on my BTRFS layout, using --script minimal and using the preexisting mount point (still /mnt btw).
|
EUREKA. I got my setup booting under qemu. The last change has been to modify how the systemd-bootctl entry is generated to include the line above.
If anyone is interested below you'll find a patch from my master, with all the changes till now btrfs_4.patch.txt edited had an error Edited: the two problems are fixed now |
Feedback has also been given in #781 |
I can now create any (well many) weird kind of subvolumes and their mounting. No UI still. but works fine with a disk_layouts file. btrfs_5.patch.txt Is the accumulated patch set till now user_disk_layout.json.txt the test layout i use. Never try this in a real environment ;-) |
It's in master and in the v2.3.1 branch now. So scheduled for release in the upcoming release which I was planning on having done soon. It's going to be a minor release to address some patches, all of which are completed now. So this was the last thing in that version : ) Good job on this one, you've done a really good job getting to know the code really fast, all delays have been on my part. Happy new year! |
I have a somewhat peculiar btrfs layout (a flat one in the sense of
https://btrfs.wiki.kernel.org/index.php/SysadminGuide
). For reasons, i decided it was the one that suited me, but it is not set in stonelayout via findmnt
Note that the root dir is also a subvolume.
Using this structure i run archinstall NOT doing anything disk related (for the time being i'm content to have my own partitioning/mounting script). When the system ought to pacstrap the base directories, archinstall abends with the following messages
No wonder because my actual lsblk output is
The text was updated successfully, but these errors were encountered: