Custom GRUB entries

Asked by Lars Lansink

When trying to customize grub.cfg and loopback.cfg under custom-live-iso/boot/grub/ it seems they are not used when generating the actual boot of the ISO (or I am doing it wrong)

But they do end up in the ISO when I mount it but the old "installer" menu is shown when I boot it.

I worked around this by actually making a new project with my first custom CD as the source.

But I wounder if there is a smarter/right way of doing this.

Example: I want to push net.ifnames=0 and biosdevname=0, systemd.show_status=false etc to my live system.

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

So you're editing...

    custom-live-iso/boot/grub/grub.cfg

..then you are creating your ISO using Cubic,...

...AND your edits to grub.cfg are overwritten ?
...AND (as a result) the generated ISO does not have your changes to grub.cfg ?

Also, please confirm you are using Cubic version 2018.07-33 ?

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

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

The newest version of Cubic supports editing boot (grub) configuration files.
(Note, this feature is not available in Ubuntu 14.04, but it is available in 16.04 and subsequent releases).

Simply upgrade to the latest release:

    $ sudo apt-add-repository ppa:cubic-wizard/release
    $ sudo apt update
    $ sudo apt install cubic

    $ sudo dpkg -l cubic
    # (Should show release version 2019-03-49 or greater).

Revision history for this message
TQ (nothinrandom) said :
#4

So I'm also seeing this issue using latest cubic version: 2020.02-62-release~202002012002~ubuntu19.10.1 all

If I take a Ubuntu 18.04 image and modify grub to force Ubuntu to use default interface names with:
GRUB_CMDLINE_LINUX="net.ifnames=0 and biosdevname=0"

Run 'update-grub' or 'grub-mkconfig -o /boot/grub/grub.cfg'

When I install OS and boot up, the settings doesn't stick.

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

Tri Quach,

I presume, you are making these changes inside Cubic's chroot Terminal, to the file `/etc/default/grub` ?

I don't think this is an issue Cubic could remedy, since Cubic doesn't really make changes to your files inside chroot; you control those changes.

It is possible that the Ubiquity installer overrides `/etc/default/grub` with its own version.

In my experience, I have changed other grub parameters (such as GRUB_TIMEOUT and GRUB_TIMEOUT_STYLE) and I find they "stick" after installation.

(I usually only run `update-grub` , not `grub-mkconfig`. However, I think the installer does this for you anyway, so it doesn't matter if you run this inside chroot).

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

Reopening expired question since a user commented on it.

Revision history for this message
TQ (nothinrandom) said :
#7

Hey Cubic Team,

I meant to update this a few days ago after some testing. So it turned out that it's not Cubic issue, but something weird with the RAID1 config on the system using Intel RST. I still don't know what is going on, but this is the best work-around that I currently have. Image installs with correct grub config on fresh install. If I boot from USB again and force install, then this is when the grub settings disappear and get reset back to default after reboot. If I delete the RAID1 setup, recreate it, and install again, then it works fine.

Revision history for this message
Joseph B (joe-b3) said :
#8

Tri Quach, cubic-wizard was correct in that this is caused by the Ubiquity installer, not cubic. Look at the script d-i/source/grub-installer/grub-installer in ubiquity, it runs "sed -i" on $ROOT/etc/default/grub and replaces GRUB_CMDLINE_LINUX_DEFAULT with only quiet and splash. This also explains why GRUB_TIMEOUT and other parameters are preserved, but the cmdline args are not.

Can you help with this problem?

Provide an answer of your own, or ask Lars Lansink for more information if necessary.

To post a message you must log in.