Installing grub boot loader error, grub-pc, ubuntu 18.04.4

Asked by Niklas Klein

Hello everyone,

since about a week I have issues with creating a customized ISO based on ubuntu-18.04.4-server-amd64.iso. My process is the following:

Starting wit the base iso I add some repos in chroot to install additional software like docker, kubernetes, powershell core etc. I do multiple "apt updates" in between because of the added repos. At then end I copy some files and scripts and go on with compressing the ISO. i do not select any packages to be removed automatically, I do not make any changes to ISO Kernal, Preseed files or ISO Boot and I use the default gzip compression.

After generation the ISO and during installation I get the following error "The 'grub-pc' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot."

A full log of cubic and screenshots of the error during installation plus the error in console view are at https://seafile.geutebrueck.com/d/7e551c1605a54278b68e/

What I did to solve the issue so far:

- At first I thought the issue happened because I upgraded the ubuntu VM I use for creating the iso to 18.04.5, therefore I tried to use the daily build of ubuntu as I could not find a iso release for 18.04.5 (I guess there is none). However, i got the same results
- Usually I test my ISOs without internet connection as they have to work in an environment with no access. I installed with network connectivity to an isolated (from the internet) network and with internet access. Also did not solve the issue
- I completely reinstalled my ISO creating vm from the same ISO I use as the base ISO for cubic. Did not solve the issue
- I tried to preinstall or predownload the packages that were mentioned in the error message during ISO installation. However, the installer then came up with other missing packages or dependencies conflicts. So this did also not solve the issue

Could my issue in any way be related to the boothole fixes and the grub problems that came with it? https://www.zdnet.com/article/boothole-fixes-causing-boot-problems-across-multiple-linux-distros/ It does not make any sense for me but I wanted to mention it.

Any help is very appreciated and if I can give you any more information, feel free to ask.

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Niklas Klein
Solved:
Last query:
Last reply:
Revision history for this message
Niklas Klein (mangosniper) said :
#1

After reinstalling the device I am running cubic on with the iso I use during the cubic process and installing the packages that are said to be missing during linux installation from the generated iso with "sudo apt-get -y install grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common libfreetype6 os-prober" during the chroot step, It seems to work now. Just for everyone else wo runs into this.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#2

Thanks for taking the time to post your resolution; I think it is really useful for other users.

The packages you listed as missing (such as grub-common, grub-gfxpayload-lists, grub-pc, etc.) are default for Ubuntu. I'm wondering what could have caused them to not be present? Do you think they were accidentally removed, or could a portion of the file system have been corrupted affecting some files/packages?

Revision history for this message
Niklas Klein (mangosniper) said :
#3

My knowledge about linux is limited but I cant see that I remove them accidentially. I use the official ISO, I dont remove any packages explicitely during my process. And I doubt the packages are already missing in the official ISO of 18.04.4. Someone else should have noticed by now.

Which filesystem do you mean? The one of the host linux I run cubic at, the squashed one in the source ISO or the one in the resulting ISO?