I am trying to roll my own distro using Debian live, following this documentation. Everything is fine in that the compiled iso runs/installs perfectly, and has the name I have specified in the config file ("MY_LINUX"). However, one peculiar problem is that after installation, the grub menu does not show "MY_LINUX", but "*Debian GNU/Linux". I have searched all the documentation, including the lb-config and lb-build manpages, but have not been able to figure out what option I need to put in where, so that the grub menu shows the name of my distro ("MY_LINUX"), and not the default. Do I have to put in a grub.cfg file before building the image? My config file is given below:


set -e

lb config noauto \
    -b iso-hybrid \
    --apt-options "--force-yes --yes" \
    --cache true \
    --apt-recommends true \
    --architecture amd64 \
    --mirror-bootstrap "http://debian.csail.mit.edu/debian/" \
    --mirror-chroot "http://debian.csail.mit.edu/debian/" \
    --archive-areas "main contrib non-free" \
    --parent-archive-areas "main contrib non-free" \
    --debian-installer live \
    --mode debian \
    --debian-installer-gui true \
    --win32-loader false  \
    --grub-splash "/boot/grub/spash.png" \
    --security true \
    --backports true \
    --updates true \
    --image-name "MY_LINUX" \
    --verbose \

  • I'm not sure in /etc/default/grub GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian``
    – user192526
    Commented Nov 23, 2016 at 10:02

1 Answer 1


Yes you do need a grub.cfg in your installation disks boot directory. The GRUB 2 (assuming you are using GRUB 2) configuration file, grub.cfg, is generated during installation, or by invoking the /usr/sbin/grub2-mkconfig utility, and is automatically updated by grubby each time a new kernel is installed. So you need to generate the grub.cfg at install time with proper label and other details (kernel/initrd locations etc.). Also you need to install GRUB in disk prior to generating grub.cfg. When generating the grub.cfg using grub2-mkconfig, the file is generated according to the template files located in /etc/grub.d/, and custom settings in the /etc/default/grub file. Edits of grub.cfg will be lost any time grub2-mkconfig is used to regenerate the file, so care must be taken to reflect any manual changes in /etc/default/grub as well. Hope that helps you get the flow. Check Red Hat - System administration guide for more details on grub.cfg file configuration.

  • Thanks, Joy. Does that mean I have to include grub.cfg in the /includes.chroot/boot/grub/ directory before running "lb build"?
    – user3671
    Commented Nov 23, 2016 at 10:31
  • Yep, exactly. You need to configure the grub file before live build.
    – Joy
    Commented Nov 24, 2016 at 0:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .