Skip to content
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

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

Open
oddlama opened this issue Jun 5, 2021 · 17 comments
Open

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

oddlama opened this issue Jun 5, 2021 · 17 comments
Labels
enhancement New feature or request

Comments

@oddlama
Copy link
Owner

oddlama commented Jun 5, 2021

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

@9glenda
Copy link

9glenda commented Dec 27, 2021

Which kernel should I use for ZFS?

@oddlama
Copy link
Owner Author

oddlama commented Dec 27, 2021

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
Copy link

9glenda commented Dec 27, 2021

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
Copy link
Owner Author

oddlama commented Dec 27, 2021

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
Copy link

9glenda commented Dec 27, 2021

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
Copy link

9glenda commented Dec 27, 2021

The error occurs also on the normal ext4 config

@oddlama
Copy link
Owner Author

oddlama commented Dec 28, 2021

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

@9glenda
Copy link

9glenda commented Dec 28, 2021

No problem

@9glenda
Copy link

9glenda commented Dec 28, 2021

#22

@NotAlexNoyle
Copy link

conflict

I think I am experiencing the consequences of this issue.

@NotAlexNoyle
Copy link

NotAlexNoyle commented Feb 17, 2023

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
Copy link
Owner Author

oddlama commented Feb 17, 2023

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
Copy link

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
Copy link

zarMarco commented Nov 1, 2023

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
Copy link
Owner Author

oddlama commented Nov 1, 2023

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
Copy link

zarMarco commented Nov 1, 2023

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

@zarMarco
Copy link

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

@oddlama oddlama added the enhancement New feature or request label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants