help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub-install fails with nbd device


From: listsb
Subject: grub-install fails with nbd device
Date: Tue, 16 Jun 2020 12:10:39 -0400

hi-

i'm attempting to install grub to an esp partition on an nbd device, but it 
fails, and says "error: cannot find a GRUB drive for /dev/nbd0p1" [see below].  
this is a qcow2 image, presented to the system as /dev/nbd0 [e.g. qemu-nbd 
--connect ...].  i also have another "traditional" disk connected as /dev/vdd, 
partitioned the exact same way, and this works as expected.

i've tried --force, --removable, --no-nvram, with and without device.map files, 
using a loop device - all with the same result.

what makes grub decide it's not a grub drive?  also, why doesn't --force make 
it work?  based on what the man page says, it seemed to me like it should.

here's some hopefully relevant info - thanks!:

>parted /dev/nbd0 print
Model: Unknown (unknown)
Disk /dev/nbd0: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size   File system  Name  Flags
 1      1049kB  105MB   104MB  fat32        esp   boot, esp
 2      105MB   1073MB  968MB               pv1   lvm

>cat 
>/opt/build/operating_systems/alpine/work/imagetest-c5676f32-412a-4ef4-b617-962b932b8ef2/boot/grub/device.map
(hd0)                   /dev/nbd0

installing grub to /dev/nbd0p1:
=============================
>grub-install \
>   --verbose \
>   --force \
>   --removable \
>   --target=x86_64-efi \
>   --bootloader-id=alpine \
>   
> "--efi-directory=/opt/build/operating_systems/alpine/work/imagetest-c5676f32-412a-4ef4-b617-962b932b8ef2/boot/efi"
>  \
>   
> "--boot-directory=/opt/build/operating_systems/alpine/work/imagetest-c5676f32-412a-4ef4-b617-962b932b8ef2/boot"
Installing for x86_64-efi platform.
grub-install: info: cannot open 
`/opt/build/operating_systems/alpine/work/imagetest-c5676f32-412a-4ef4-b617-962b932b8ef2/boot/grub/device.map':
 No such file or directory.
grub-install: info: /dev/nbd0p1 is not present.
grub-install: info: Looking for /dev/nbd0p1.
grub-install: info: /dev/nbd0 is a parent of /dev/nbd0p1.
grub-install: info: /dev/nbd0p1 is present.
grub-install: info: Looking for /dev/nbd0p1.
grub-install: info: /dev/nbd0 is a parent of /dev/nbd0p1.
grub-install: info: /dev/nbd0p1 is present.
grub-install: info: Looking for /dev/nbd0p1.
grub-install: info: /dev/nbd0 is a parent of /dev/nbd0p1.
grub-install: error: cannot find a GRUB drive for /dev/nbd0p1.  Check your 
device.map.

installing grub to /dev/vdd1:
=============================
>grub-install \
>   --force \
>   --removable \
>   --target=x86_64-efi \
>   --bootloader-id=alpine \
>   
> "--efi-directory=/opt/build/operating_systems/alpine/work/imagetest-1e909864-b820-4939-9dff-b4918184c632/boot/efi"
>  \
>   
> "--boot-directory=/opt/build/operating_systems/alpine/work/imagetest-1e909864-b820-4939-9dff-b4918184c632/boot"
Installing for x86_64-efi platform.
File descriptor 4 (/dev/vdd1) leaked on vgs invocation. Parent PID 10249: 
grub-install
You have a memory leak (not released memory pool):
 [0x7fcace1b3f80] dtree
Internal error: Unreleased memory pool(s) found.
File descriptor 4 (/dev/vdd1) leaked on vgs invocation. Parent PID 10249: 
grub-install
You have a memory leak (not released memory pool):
 [0x7fcace1b3f80] dtree
Internal error: Unreleased memory pool(s) found.
Installation finished. No error reported.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]