-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Fix grub.cfg location for ubuntu Fix grub.efi name cleanup Signed-off-by: Itxaka <itxaka@kairos.io>
pkg/action/build-iso.go
Outdated
@@ -183,6 +183,19 @@ func (b BuildISOAction) createEFI(rootdir string, isoDir string) error { | |||
b.cfg.Logger.Errorf("Failed writing grub.cfg: %v", err) | |||
return err | |||
} | |||
// Ubuntu efi searches for the grub.cfg file under /EFI/ubuntu/grub.cfg while we store it under /boot/grub2/grub.cfg | |||
// workaround this by copying it there as well | |||
// TODO: Should we symlink all the distros folders to our single grub.cfg? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If symlinks work for this, this sounds like a good idea
pkg/action/build-iso.go
Outdated
// Ubuntu efi searches for the grub.cfg file under /EFI/ubuntu/grub.cfg while we store it under /boot/grub2/grub.cfg | ||
// workaround this by copying it there as well | ||
// TODO: Should we symlink all the distros folders to our single grub.cfg? | ||
err = utils.MkdirAll(b.cfg.Fs, filepath.Join(isoDir, "EFI/ubuntu/"), constants.DirPerm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so every distro will have an ubuntu
directory now? Maybe we should try the symlink idea instead. That fix would happen in the Dockerfiles right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for isos. The final system should not have that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the install part, we will need to do the same for ubuntu, but in that point we know what distro is due to being able to read /etc/os-release so we can only trigger the same thing if we are on ubuntu.
Maybe we should do the same here.....
b7f5ebf
to
66788af
Compare
pkg/action/build-iso.go
Outdated
// Ubuntu efi searches for the grub.cfg file under /EFI/ubuntu/grub.cfg while we store it under /boot/grub2/grub.cfg | ||
// workaround this by copying it there as well | ||
// read the os-release from the rootfs to know if we are creating a ubuntu based iso | ||
FLAVOR, err := sdk.OSRelease("FLAVOR", filepath.Join(rootdir, "etc/os-release")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Minor] No reason to use upper cased variable names. Just flavor
should be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERRO[2024-01-12T14:22:07Z] Failed preparing ISO's root tree: KAIROS_flavor key not found
case sensitive!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry yes, I meant the golang variable, not the os-release
one.
Also do the efi part first before the squashfs so we fail faster Signed-off-by: Itxaka <itxaka@kairos.io>
66788af
to
b2fd666
Compare
Fix grub.cfg location for ubuntu
Fix grub.efi name cleanup