Creating bootable disk.img, not detecting grub EUFI boot loader

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Here is my script to generate a bootable Debian disk.



#!/usr/bin/env bash
set -e

# Download the debs to be used to install debian.
if [ ! -e "debs.tar.gz" ]; then
debootstrap --verbose
--make-tarball=debs.tar.gz
--include=linux-image-amd64,grub-efi
stable rootfs https://deb.debian.org/debian
fi

# Make a drive with an EFI boot partition
# and an LVM partition.
rm -rf boot.img
truncate -s 40G boot.img
parted -s boot.img
mklabel gpt
mkpart primary 1MiB 2GiB
mkpart primary 2GiB 3GiB
mkpart primary 3GiB 4GiB
mkpart primary 4GiB 15GiB
mkpart primary 15GiB 100%
set 1 esp on

# Partition layout:
# 1. The EFI boot loader
# 2. The base recovery OS
# 3. Darch configuration (/etc/darch)
# 4. Darch stage/images
# 5. Home directory

# Mount the newly created drive.
loop_device=`losetup --partscan --show --find boot.img`

# Format the partitions
mkfs.fat -F32 $loop_devicep1
mkfs.ext4 $loop_devicep2
mkfs.ext4 $loop_devicep3
mkfs.ext4 $loop_devicep4
mkfs.ext4 $loop_devicep5

# Mount the new partitions
rm -rf rootfs && mkdir rootfs
mount $loop_devicep2 rootfs
mkdir rootfs/boot
mount $loop_devicep1 rootfs/boot

# Generate the rootfs
debootstrap --verbose
--unpack-tarball=$(pwd)/debs.tar.gz
--include=linux-image-amd64,grub-efi
stable rootfs https://deb.debian.org/debian

# Install GRUB
arch-chroot rootfs grub-install $loop_device --target=x86_64-efi --efi-directory=/boot
arch-chroot rootfs grub-mkconfig -o /boot/grub/grub.cfg

genfstab -U -p rootfs > rootfs/etc/fstab

# Clean up
umount rootfs/boot
umount rootfs
losetup -d $loop_device

VBoxManage convertdd boot.img boot.vdi --format VDI


After booting the generate boot.vdi, there is no EUFI image found.



Here is the boot report for the generated image.



http://paste.ubuntu.com/p/F9G3yptH9W/



Any help would be greatly appreciated.



Thanks!









share

























    up vote
    0
    down vote

    favorite












    Here is my script to generate a bootable Debian disk.



    #!/usr/bin/env bash
    set -e

    # Download the debs to be used to install debian.
    if [ ! -e "debs.tar.gz" ]; then
    debootstrap --verbose
    --make-tarball=debs.tar.gz
    --include=linux-image-amd64,grub-efi
    stable rootfs https://deb.debian.org/debian
    fi

    # Make a drive with an EFI boot partition
    # and an LVM partition.
    rm -rf boot.img
    truncate -s 40G boot.img
    parted -s boot.img
    mklabel gpt
    mkpart primary 1MiB 2GiB
    mkpart primary 2GiB 3GiB
    mkpart primary 3GiB 4GiB
    mkpart primary 4GiB 15GiB
    mkpart primary 15GiB 100%
    set 1 esp on

    # Partition layout:
    # 1. The EFI boot loader
    # 2. The base recovery OS
    # 3. Darch configuration (/etc/darch)
    # 4. Darch stage/images
    # 5. Home directory

    # Mount the newly created drive.
    loop_device=`losetup --partscan --show --find boot.img`

    # Format the partitions
    mkfs.fat -F32 $loop_devicep1
    mkfs.ext4 $loop_devicep2
    mkfs.ext4 $loop_devicep3
    mkfs.ext4 $loop_devicep4
    mkfs.ext4 $loop_devicep5

    # Mount the new partitions
    rm -rf rootfs && mkdir rootfs
    mount $loop_devicep2 rootfs
    mkdir rootfs/boot
    mount $loop_devicep1 rootfs/boot

    # Generate the rootfs
    debootstrap --verbose
    --unpack-tarball=$(pwd)/debs.tar.gz
    --include=linux-image-amd64,grub-efi
    stable rootfs https://deb.debian.org/debian

    # Install GRUB
    arch-chroot rootfs grub-install $loop_device --target=x86_64-efi --efi-directory=/boot
    arch-chroot rootfs grub-mkconfig -o /boot/grub/grub.cfg

    genfstab -U -p rootfs > rootfs/etc/fstab

    # Clean up
    umount rootfs/boot
    umount rootfs
    losetup -d $loop_device

    VBoxManage convertdd boot.img boot.vdi --format VDI


    After booting the generate boot.vdi, there is no EUFI image found.



    Here is the boot report for the generated image.



    http://paste.ubuntu.com/p/F9G3yptH9W/



    Any help would be greatly appreciated.



    Thanks!









    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Here is my script to generate a bootable Debian disk.



      #!/usr/bin/env bash
      set -e

      # Download the debs to be used to install debian.
      if [ ! -e "debs.tar.gz" ]; then
      debootstrap --verbose
      --make-tarball=debs.tar.gz
      --include=linux-image-amd64,grub-efi
      stable rootfs https://deb.debian.org/debian
      fi

      # Make a drive with an EFI boot partition
      # and an LVM partition.
      rm -rf boot.img
      truncate -s 40G boot.img
      parted -s boot.img
      mklabel gpt
      mkpart primary 1MiB 2GiB
      mkpart primary 2GiB 3GiB
      mkpart primary 3GiB 4GiB
      mkpart primary 4GiB 15GiB
      mkpart primary 15GiB 100%
      set 1 esp on

      # Partition layout:
      # 1. The EFI boot loader
      # 2. The base recovery OS
      # 3. Darch configuration (/etc/darch)
      # 4. Darch stage/images
      # 5. Home directory

      # Mount the newly created drive.
      loop_device=`losetup --partscan --show --find boot.img`

      # Format the partitions
      mkfs.fat -F32 $loop_devicep1
      mkfs.ext4 $loop_devicep2
      mkfs.ext4 $loop_devicep3
      mkfs.ext4 $loop_devicep4
      mkfs.ext4 $loop_devicep5

      # Mount the new partitions
      rm -rf rootfs && mkdir rootfs
      mount $loop_devicep2 rootfs
      mkdir rootfs/boot
      mount $loop_devicep1 rootfs/boot

      # Generate the rootfs
      debootstrap --verbose
      --unpack-tarball=$(pwd)/debs.tar.gz
      --include=linux-image-amd64,grub-efi
      stable rootfs https://deb.debian.org/debian

      # Install GRUB
      arch-chroot rootfs grub-install $loop_device --target=x86_64-efi --efi-directory=/boot
      arch-chroot rootfs grub-mkconfig -o /boot/grub/grub.cfg

      genfstab -U -p rootfs > rootfs/etc/fstab

      # Clean up
      umount rootfs/boot
      umount rootfs
      losetup -d $loop_device

      VBoxManage convertdd boot.img boot.vdi --format VDI


      After booting the generate boot.vdi, there is no EUFI image found.



      Here is the boot report for the generated image.



      http://paste.ubuntu.com/p/F9G3yptH9W/



      Any help would be greatly appreciated.



      Thanks!









      share













      Here is my script to generate a bootable Debian disk.



      #!/usr/bin/env bash
      set -e

      # Download the debs to be used to install debian.
      if [ ! -e "debs.tar.gz" ]; then
      debootstrap --verbose
      --make-tarball=debs.tar.gz
      --include=linux-image-amd64,grub-efi
      stable rootfs https://deb.debian.org/debian
      fi

      # Make a drive with an EFI boot partition
      # and an LVM partition.
      rm -rf boot.img
      truncate -s 40G boot.img
      parted -s boot.img
      mklabel gpt
      mkpart primary 1MiB 2GiB
      mkpart primary 2GiB 3GiB
      mkpart primary 3GiB 4GiB
      mkpart primary 4GiB 15GiB
      mkpart primary 15GiB 100%
      set 1 esp on

      # Partition layout:
      # 1. The EFI boot loader
      # 2. The base recovery OS
      # 3. Darch configuration (/etc/darch)
      # 4. Darch stage/images
      # 5. Home directory

      # Mount the newly created drive.
      loop_device=`losetup --partscan --show --find boot.img`

      # Format the partitions
      mkfs.fat -F32 $loop_devicep1
      mkfs.ext4 $loop_devicep2
      mkfs.ext4 $loop_devicep3
      mkfs.ext4 $loop_devicep4
      mkfs.ext4 $loop_devicep5

      # Mount the new partitions
      rm -rf rootfs && mkdir rootfs
      mount $loop_devicep2 rootfs
      mkdir rootfs/boot
      mount $loop_devicep1 rootfs/boot

      # Generate the rootfs
      debootstrap --verbose
      --unpack-tarball=$(pwd)/debs.tar.gz
      --include=linux-image-amd64,grub-efi
      stable rootfs https://deb.debian.org/debian

      # Install GRUB
      arch-chroot rootfs grub-install $loop_device --target=x86_64-efi --efi-directory=/boot
      arch-chroot rootfs grub-mkconfig -o /boot/grub/grub.cfg

      genfstab -U -p rootfs > rootfs/etc/fstab

      # Clean up
      umount rootfs/boot
      umount rootfs
      losetup -d $loop_device

      VBoxManage convertdd boot.img boot.vdi --format VDI


      After booting the generate boot.vdi, there is no EUFI image found.



      Here is the boot report for the generated image.



      http://paste.ubuntu.com/p/F9G3yptH9W/



      Any help would be greatly appreciated.



      Thanks!







      system-installation grub2 boot-loader





      share












      share










      share



      share










      asked 3 mins ago









      Paul Knopf

      241310




      241310

























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480021%2fcreating-bootable-disk-img-not-detecting-grub-eufi-boot-loader%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480021%2fcreating-bootable-disk-img-not-detecting-grub-eufi-boot-loader%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?