Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

install.sh doesn't create bootable images #288

Closed
dxlr8r opened this issue Nov 20, 2019 · 6 comments
Closed

install.sh doesn't create bootable images #288

dxlr8r opened this issue Nov 20, 2019 · 6 comments
Labels
area/installation kind/bug Something isn't working

Comments

@dxlr8r
Copy link

dxlr8r commented Nov 20, 2019

Running a successful installation (according to the script):

K3OS_DEBUG=true ./install.sh /dev/sdb /home/vagrant/k3os-amd64.iso

Then converted it to an image:

qemu-img convert -O vmdk -f raw /dev/sdb /home/vagrant/k3OS.vmdk -o size=2G -o compat6

And tested this image in both VMWare and VirtualBox, and they all just show the grub prompt, not the menus.

Also tried to take the disk image for /dev/sdb and boot from that from a new VM, same result.

Tried this process with RHEL7, Ubuntu Xenial and OpenSuse 42.

The image do boot though if I'm using for example Super Grub2 Disk , which also detect the menu entries.

@dxlr8r
Copy link
Author

dxlr8r commented Nov 20, 2019

Seems like the installation splits the configuration into:

/boot/grub
/boot/grub2

Consolidating the two into grub2 resulted in a successful boot.

@dweomer
Copy link
Contributor

dweomer commented Nov 20, 2019

Hi @dxlr8r what is the host operating system that you are invoking ./install.sh on and what does the grub/grub2 installation look like there?

@dweomer dweomer added area/installation kind/bug Something isn't working labels Nov 20, 2019
@dxlr8r
Copy link
Author

dxlr8r commented Nov 20, 2019

what is the host operating system that you are invoking ./install.sh on

  • RHEL7, CentOS 8 and OpenSuse 42 (also had to symlink grub2-install to grub-install)
  • Ubuntu Xenial as well, had a lot of issues there as well, but as I have vagrant I just moved to another distro

what does the grub/grub2 installation look like there

Here from RHEL7, but same on CentOS 8 and OpenSuse 42.

# ll /mnt/boot/grub*
/mnt/boot/grub:
total 12K
drwxr-xr-x. 2 root root 4,0K nov.  19 17:41 .
drwxr-xr-x. 4 root root 4,0K nov.  19 17:41 ..
-rw-r--r--. 1 root root  827 nov.  19 17:41 grub.cfg

/mnt/boot/grub2:
total 32K
drwxr-xr-x. 5 root root 4,0K nov.  19 17:41 .
drwxr-xr-x. 4 root root 4,0K nov.  19 17:41 ..
drwxr-xr-x. 2 root root 4,0K nov.  19 17:41 fonts
-rw-r--r--. 1 root root 1,0K nov.  19 17:41 grubenv
drwxr-xr-x. 2 root root  12K nov.  19 17:55 i386-pc
drwxr-xr-x. 2 root root 4,0K nov.  19 17:55 locale

What distro do you use to build?

@dweomer
Copy link
Contributor

dweomer commented Nov 20, 2019

@dxlr8r if you change the grub-install to grub2-install on lines 5 and 195 of install.sh does that solve the problem for you?

What you have encountered here is a gap in testing. I think most of the community. including myself, is either doing an arm/arm64 overlay, a takeover (see the aws packer templates), or booting from the ISO (see the vagrant packer template).

@dxlr8r
Copy link
Author

dxlr8r commented Nov 20, 2019

if you change the grub-install to grub2-install on lines 5 and 195 of install.sh does that solve the problem for you?

Only for the symlinking, but found it easier to do a symlink in my pipeline versus editing the install.sh

gap in testing

Yes, that was kinda the idea I got as well from looking at the script. We use k3OS for x86 and with VMWare without DHCP, so some tinkering is involved.

dweomer added a commit to dweomer/k3os that referenced this issue Jan 28, 2020
In the Remastering ISO section of the README.md note that it is not
uncommon for `grub-mkrescue` from grub2 installations to create `boot/grub2`
instead of the expected `boot/grub`.

Addresses rancher#288 (and possibly rancher#358)
dweomer added a commit to dweomer/k3os that referenced this issue Jan 28, 2020
In the Remastering ISO section of the README.md note that it is not
uncommon for `grub-mkrescue` from grub2 installations to create `boot/grub2`
instead of the expected `boot/grub`.

Addresses rancher#288 (and possibly rancher#358)
dweomer added a commit to dweomer/k3os that referenced this issue Jan 28, 2020
In the Remastering ISO section of the README.md note that it is not
uncommon for `grub-mkrescue` from grub2 installations to create `boot/grub2`
instead of the expected `boot/grub`.

Addresses rancher#288 (and possibly rancher#358)
@dweomer
Copy link
Contributor

dweomer commented Jan 28, 2020

I've added some documentation to let people know that this is an outstanding incompatibility with some installations of grub2. If you do not feel that this adequately warns users of the problem please feel free to re-open.

@dweomer dweomer closed this as completed Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installation kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants