Creating bootable disk.img, not detecting grub EUFI boot loader
Clash 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!
system-installation grub2 boot-loader
add a comment |Â
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!
system-installation grub2 boot-loader
add a comment |Â
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!
system-installation grub2 boot-loader
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
system-installation grub2 boot-loader
asked 3 mins ago
Paul Knopf
241310
241310
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password