How to customize grub boot entries?

Asked by benjamin on 2019-09-10

I'm trying to customize a Linux Lite image but their initrd file doesn't have the .gz extension but Cubic still puts initrd.gz in the grub menu entries.

Is there any way to customize the boot entries to fix this or, even better, automatically detect the initrd file on the original iso and use the exact same name?

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
2019-09-10
Last reply:
2019-09-11
Cubic PPA (cubic-wizard) said : #1

Cubic automatically detects the correct compression type of the initrd file, appends the correct extension to the file, and updates the grub entry with the correct file name and extension.

Many times, distros leave off the *.gz extension, or use an incorrect extension (that doesn't' correspond to the file's actual compression type). Cubic will correct this.

You will not be able to use the original initrd file name in Cubic, if it was incorrectly named by the distro. (You should file a bug with the distro and ask them to correct this on their live ISO image, if they are interested in doing so).

Otherwise, the Cubic customized ISO should boot just fine-- Cubic ensures the name of the initrd file in the grub boot entries match the name of the initrd file used by casper.

benjamin (blackswords) said : #2

I can ask the Linux Lite team to fix this but wouldn't it be better to detect and use the full name of the file rather than inferring its extension based on its compression method?

Cubic PPA (cubic-wizard) said : #3

benjamin,

The name "initrd" means the file is a cpio archive with no compression.
The name "initrd.gz" means the file is a cpio archive with gzip compression.
The name "initrd.lz" means the file is a cpio archive with lz compression.
(...And I presume other compression schemes could be used as well).

The Linux Lite team is using an initrd cpio archive with gzip compression, but they have misleadingly named it "initrd".

Even if they don't correct it on their live CD, Cubic detects and fixes the problem when you create a custom ISO.

I'm trying to understand your use case... what is your need or value of using the original file name for initrd for your customized ISO? Are you just trying visually to match it to what the original ISO has, or is there some other process or program that needs the file to be named "initrd," specifically ?

Can you help with this problem?

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

To post a message you must log in.