archiso-zfs icon indicating copy to clipboard operation
archiso-zfs copied to clipboard

doesn't work

Open un-couteau opened this issue 2 years ago • 6 comments

Need a fix image

un-couteau avatar Aug 13 '22 15:08 un-couteau

Please post a debug and tell which iso you used.

eoli3n avatar Aug 19 '22 18:08 eoli3n

I kind of figured out why I couldn't load your script It's because of the gpg. I think I fixed it with the command 'pacman-key --populate archlinux' but it doesn't always work and I have to restart image

un-couteau avatar Aug 21 '22 19:08 un-couteau

This seems to me to be related somehow to what mirror gets randomly chosen when the script runs. I've been playing around with an Arch install on ZFS over the past 24 hours and have seen this same result intermittently.

I tried hardcoding a mirror I knew was working earlier and still saw the issue, though, so I'm really not sure. It seems to be related to gpg and archlinux-keyring, though.

Edit: I was able to work around this by:

  • adding the ArchZFS repos specified in the script to pacman.conf directly
  • setting SigLevel to TrustAll

darrmitchell avatar Aug 30 '22 16:08 darrmitchell

I just updated the project to make it easier to use, and cleaner.

Be aware that the script url changed ! I also improved the way to provide debug.log file to your issue, please follow https://github.com/eoli3n/archiso-zfs#debug


About your issue, I just tested with the latest archiso, I can't reproduce. I will try few more time later, if this is a random issue.

eoli3n avatar Aug 31 '22 09:08 eoli3n

New version worked on the first try. With the old version I found it to be extremely intermittent, but I had gotten it to work pretty regularly by disabling signature checking and adding the repos manually to pacman.conf. I finally got my last ZFS issue solved this morning and am into my new install - not sure how I'd have done it without your script, so thank you! 😃

darrmitchell avatar Aug 31 '22 13:08 darrmitchell

Strange, because I didn't change anything related to what it really does, only structure. You're welcome ;) feel free to check github.com/eoli3n/arch-config too. If you do not use zfsbootmenu, you should really give it a try !

  • https://zfsbootmenu.org/
  • https://github.com/zbm-dev/zfsbootmenu/wiki

eoli3n avatar Aug 31 '22 13:08 eoli3n

I recommend that @eoli3n you give it a try again, or I can write some tests inside GitHub Actions if needed, but I need an ArchLinux environment, I'm not sure whether that's doable or not, because it is still broken to this day, debugging is doable for anyone who can spin up an ArchLinux VM.

I had to :

  • Add manually 3 Server URLs into pacman.conf
  • Run pacman-key --init, which fails to update the trust-db at the end.
  • Run pacman-key --populate archlinux which failed at the end, did not update the trust-db.
  • All packages, that I tried to install were said to be corrupted or of invalid PGP signature.
  • Hence as a last workaround I had to add to SigLevel TrustAll in pacman.conf
  • Reinstall/update pacman -S archlinux-keyring.

Finally, the init script worked as intended, I did this in a QEMU KVM VM with TianoCore as an UEFI BIOS and the archiso archlinux-2022.10.01-x86_64.iso (the latest to this day).

I believe automating such tests is a bit annoying, but should be done once and for all to reproduce issues, I can give it a try but I'm not sure about using GitHub Actions for this.

EDIT: I can provide all necessary logs as well, and most likely will provide them either here or in another issue referencing this one.

AkechiShiro avatar Oct 16 '22 01:10 AkechiShiro

This script is not intended to work in all cases but only in most cases. It depends a lot to what Arch Rollback Machine and ArchZFS contains at the run time. It sometimes needs some workaround for specific versions, like https://github.com/eoli3n/archiso-zfs/blob/master/init#L62-L65 And sometimes, as the readme says:

In some very specific cases, you won't be able to get ZFS module working for a specific archiso version. In that case, just switch to the previous month iso.

Not sure if you could test this with github actions, there are two problems to solve:

  • github actions run tests in containers based on built images, i'm pretty sure that archlinux doesn't provide container images for archiso
  • there is no archiso process to automate the start of a script once the iso is booted (from the outside, like "boot the archiso and run that script inside it)

For that last reason, I didn't even automate tests in a local vagrant env as I did for my others os related projects. For exemple, I use this vagrant file to automate VM creation, but it then require a manual intervention to trigger the install script in the VM once booted https://github.com/eoli3n/arch-config/tree/master/vagrant

I just found this : https://github.com/jonashackt/vagrant-github-actions So I guess that this solve the first point, but there is still the second one.

Feel free to fork and make some tries, I'll keep an eye on your work if you do.

eoli3n avatar Oct 16 '22 06:10 eoli3n

Thanks, @eoli3n, I'll fork, and struggle a bit on my free time when I feel like it, in my case the issue wasn't with the specific kernel version being too new, or dodgy for the script, it was specifically something broken, with pacman's keyring and all packages were seen as corrupted, it could be an upstream issue, it could be even completely unrelated to Archiso-zfs, but testing nonetheless could reveal then, issues upstream :thinking: (a bit weird to test upstream, I'd agree with that).

I'm thinking about the second issue, and I can't help but wonder how does Arch Linux Developers Team do any testing ? They don't ?

AkechiShiro avatar Oct 16 '22 06:10 AkechiShiro

The problem is that what the init script does, is not officially supported, it's kind of hacky way to get packages, as archiso is "snapshotted" at first date of the month. What the script does, is to try to get all pieces aligned, but this is not surprising that it fails in some specific case.

eoli3n avatar Oct 16 '22 08:10 eoli3n

@eoli3n I think what's needed for testing at least the components, solving the second point probably, I still need to understand how to use it, and I'm not sure if it will be possible to do in GitHub Actions.

See the Testing part here : https://gitlab.archlinux.org/archlinux/archiso But that's used for testing archiso, and I failed to reach out to any ArchLinux Archiso dev for some help on how I could use that.

For vagrant, this may be more useful : https://gitlab.archlinux.org/archlinux/arch-boxes

Maybe something like this could be done, either we build or just download the last iso file from ArchLinux : https://gitlab.archlinux.org/archlinux/archiso/-/jobs/95543

Then at the end, we'd add a step to run run_archiso.sh, I'd need to tweak the run_archiso.sh script so that it runs the archiso-zfs bash script from the repo here and finally runs the zfs commands for instance.

This script looks like it's launching an archiso VM, logging in and doing some stuff: https://gitlab.archlinux.org/archlinux/ci-scripts/-/blob/master/scripts/build_in_archiso_vm.sh

AkechiShiro avatar Oct 20 '22 03:10 AkechiShiro