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

Parallel installations overwrite each other's loader entries #75

Open
danielwe opened this issue Oct 16, 2023 · 1 comment
Open

Parallel installations overwrite each other's loader entries #75

danielwe opened this issue Oct 16, 2023 · 1 comment

Comments

@danielwe
Copy link

The loader entry filename generated by kernelstub only depends on the OS name and does not include a unique identifier:

os.path.join(self.entry_dir, '%s-current' % self.opsys.name))

This causes parallel installations of Pop!_OS to overwrite each other's loader entries. This is inconvenient if you just want to set up a throwaway partition to test something (see, e.g., pop-os/pop#3152 (comment)).

As a point of comparison, the loader entries generated by EndeavourOS (an arch-derivative) include a UUID in the loader entry filename:

root@thelaptop:/boot/efi/loader/entries# ls -l
total 24
-rwx------ 1 root root 542 Oct 16 08:30 843d283c5bc34d10bf2bc80afb2556e8-6.1.58-1-lts.conf
-rwx------ 1 root root 582 Oct 16 08:30 843d283c5bc34d10bf2bc80afb2556e8-6.1.58-1-lts-fallback.conf
-rwx------ 1 root root 546 Oct 15 20:52 843d283c5bc34d10bf2bc80afb2556e8-6.5.7-arch1-1.conf
-rwx------ 1 root root 586 Oct 15 20:52 843d283c5bc34d10bf2bc80afb2556e8-6.5.7-arch1-1-fallback.conf
-rwx------ 1 root root 256 Oct 16 11:27 Pop_OS-current.conf
-rwx------ 1 root root 274 Oct 16 11:27 Pop_OS-oldkern.conf

As far as I can tell, there's no way to work around this using a config option, since the OS name used by kernelstub is derived directly from /etc/os-release via the lines below. I suppose I could edit this file manually to disambiguate the installations, but that seems a bit hacky, I'm not sure what other tools might be reading this file.

def get_os_release(self):
try:
with open('/etc/os-release') as os_release_file:
os_release = os_release_file.readlines()

@danielwe
Copy link
Author

I'm thinking that the easiest fix to this might be to ask for a nickname during installation and let kernelstub use this to disambiguate. You could maybe even use the device name/hostname (i.e., /etc/hostname), although perhaps people have good reason for wanting to keep this the same across different OS installations on the same machine. Either way, it's important that the disambiguating identifier name can be configured during installation, so this fix must be coordinated between kernelstub and the Pop installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant