oddlama / gentoo-install

A gentoo installer with a TUI interface that supports systemd and OpenRC, EFI and BIOS, as well as variable disk layouts using ext4, zfs, btrfs, luks and mdraid.
MIT License
512 stars 72 forks source link

Allow selection of explicit kernel version to prevent ZFS issues. #11

Open oddlama opened 3 years ago

oddlama commented 3 years ago

ZFS needs time to support new kernel versions. Prevent manual intervention by allowing to select kernel version

9glenda commented 2 years ago

Which kernel should I use for ZFS?

oddlama commented 2 years ago

Any kernel with a version supported by ZFS. gentoo-kernel-bin usually works fine, as long as upstream ZFS supports the current version. (Which should be the case for 5.15.*).

9glenda commented 2 years ago

I get an error when einig it. I’m installing gentoo myself at the moment but if you would help me solve the error I can sand you the error by just running it again

oddlama commented 2 years ago

As this isn't related to the installer at all, I think you will be better off asking for support on the official gentoo support channels.

9glenda commented 2 years ago

I think it’s related to the installer and I’ve got another error wich definitely is related to the installer: error:Could not find PTUUID=... in lsblk Output error@ Could not resolve device with id=gpt_dev0 Im on a Mac Book pro from about 2012

9glenda commented 2 years ago

The error occurs also on the normal ext4 config

oddlama commented 2 years ago

Would you mind opening a new issue for this? I don't believe it belongs here.

9glenda commented 2 years ago

No problem

9glenda commented 2 years ago

22

NotAlexNoyle commented 1 year ago

conflict

I think I am experiencing the consequences of this issue.

NotAlexNoyle commented 1 year ago

conflict

I think I am experiencing the consequences of this issue.

Just following up on this... by adding USE flag "dist-kernel" I was able to get new kernels to build, but I have no way to switch into them. No GRUB menu even after I reloaded my config and followed the steps on the gentoo/grub2 wiki. I am effectively stuck on the kernel that my system came with during the install (5.15.80-gentoo-dist) because there is no way I can see to select another one.

oddlama commented 1 year ago

I'm not entirely sure what you are trying to do, but the installer is not using the GRUB bootloader at all. A bootloader like grub is not required anymore in modern systems, since your UEFI can directly boot the kernel, without needing software like systemd-boot, GRUB or any other bootloader in between. This technique is called EFISTUB and it is what this installer is using.

Basically your UEFI has an inbuilt bootloader which you can access and modify using the efibootmgr command. The installer will have set up a boot entry for gentoo already, so to update your kernel the only thing you need to do is to overwrite the vmlinuz.efi and initramfs.img files on the boot/efi partition.

Although it looks like you have already played around with grub so now your mileage may vary since I don't know what grub will have done to your system at this point.

I am effectively stuck on the kernel that my system came with during the install (5.15.80-gentoo-dist) because there is no way I can see to select another one.

Have your read the according section in the installer's readme before trying to use GRUB? All commands required to update the kernel are shown step-by-step there. (https://github.com/oddlama/gentoo-install#updating-the-kernel)

NotAlexNoyle commented 1 year ago

I'm not entirely sure what you are trying to do, but the installer is not using the GRUB bootloader at all. A bootloader like grub is not required anymore in modern systems, since your UEFI can directly boot the kernel, without needing software like systemd-boot, GRUB or any other bootloader in between. This technique is called EFISTUB and it is what this installer is using.

Basically your UEFI has an inbuilt bootloader which you can access and modify using the efibootmgr command. The installer will have set up a boot entry for gentoo already, so to update your kernel the only thing you need to do is to overwrite the vmlinuz.efi and initramfs.img files on the boot/efi partition.

Although it looks like you have already played around with grub so now your mileage may vary since I don't know what grub will have done to your system at this point.

I am effectively stuck on the kernel that my system came with during the install (5.15.80-gentoo-dist) because there is no way I can see to select another one.

Have your read the according section in the installer's readme before trying to use GRUB? All commands required to update the kernel are shown step-by-step there. (https://github.com/oddlama/gentoo-install#updating-the-kernel)

Thank you, very informative. This is my first time running a system without a bootloader. That explains a lot. I also assumed that once the system was installed I could follow gentoo's instructions for upgrading, I should have read the README more carefully. I will try a kernel update as described there and reinstall if it fails.

zarMarco commented 11 months ago

Sorry if I write on this old topic. I would like to install Gentoo with your script on a partition just in zfs because I use arch with zfs on this partition and I would create dataset for Gentoo on pre esistent zpool. Can I do it? I also thought to another partition to create on zfs, but I can't choose zfs but only ext4 or btrfs.

Can I choose also fat32 partition? I wouldn't format currently because I have zfsbootmenu install on this

oddlama commented 11 months ago

I fear this isn't really supported currently in they way you'd need. The installer supports a preexisting partitions layout where only the formatting is done, but not a pre-mounted partitions layout at the moment. I mainly didn't implement this because by far the most common use case is to do a "fresh" install, and it had the nice side-effect that we can assume a clean state. Meaning no room for errors because of wrong usage regarding existing partitions and files.

Theoretically you can get it to work by using the pre-existing partitions layout, comment out all of the formatting and mounting stuff in the code and replace it with a simple mount to whatever you want to use. But I'd consider this quite adventurous, so don't do this if you don't have a backup.

Otherwise what you can do is to install this in a virtual machine and afterwards copy the contents of the finished root partition to your zfs dataset when the machine is shut down. The only file you should need to adjust is /etc/fstab to accomodate for the changed root and boot partitions.

zarMarco commented 11 months ago

Thanks, if with Black Friday I'll buy new ssd, I'll use your script with zfs

zarMarco commented 10 months ago

Sorry for another question, are you sure that your script goes with zfs? I tried with a empty disk but failed with uuid