Results 1 to 2 of 2

Thread: Installing Grub unattended

  1. #1
    Join Date
    Mar 2021
    Beans
    2

    Installing Grub unattended

    Hi folks!

    I'm trying to install Ubuntu (focal) from a Live system using debootstrap with the attached bootstrap-ubuntu script.
    This works fine when I manually confirm the dpkg dialogs and select /dev/sda.
    However I'd like to run this completely unattended and when I replace the linux-generic install line with
    Code:
    DEBIAN_FRONTEND=noninteractive chroot /mnt apt-get install -yq linux-generic
    chroot /mnt grub-install /dev/sda
    chroot /mnt update-grub
    , Grub won't be installed, at least not in a state that makes it boot the system.

    Can anyone help me, please?
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2021
    Beans
    2

    Re: Installing Grub unattended

    Just for the record:I had to preseed the answer with this:
    Code:
    echo "deb http://archive.ubuntu.com/ubuntu focal universe" >> /mnt/etc/apt/sources.list
    chroot /mnt apt-get update
    chroot /mnt apt-get install -y debconf-utils
    disk=$(find /dev -type l -lname '*/sda' -path '*/by-id/*')
    chroot /mnt debconf-set-selections << HERE_I_AM
    grub-pc    grub-pc/install_devices    multiselect    $disk
    HERE_I_AM
    chroot /mnt apt-get install -y linux-generic
    ...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •