В Wed, 06 May 2015 14:30:00 +0200
Sebastian Pipping <sebast...@pipping.org> пишет:

> 
> 
> Nevertheless, let's get good old
> 
>   grub-install --boot-directory=... /dev/...
> 
> fixed, please.  It did work previously.  How do we proceed?
> 
> Best,
> 
> 
> 
> Sebastian
> 
> 
> PS: I have not tested any from-within-chroot cases yet.  Those have
> given different results to some extent in the past, at least.
> 
> 
> [1] In the the shell:
> 
> # grub-install --boot-directory=/mnt/loop-root/boot '(hd0)' ; echo $?
> /usr/sbin/grub-probe: error: cannot find a GRUB drive for
> /dev/mapper/loop0p1.  Check your device.map.

bor@opensuse:~/build/grub> findmnt /mnt
TARGET SOURCE       FSTYPE OPTIONS
/mnt   /dev/loop0p1 ext2   rw,relatime
bor@opensuse:~/build/grub> sudo ./grub-probe -t fs /mnt
ext2
bor@opensuse:~/build/grub> sudo ./grub-probe -t partmap /mnt
msdos
bor@opensuse:~/build/grub> 

bor@opensuse:~/build/grub> /usr/sbin/losetup --help
...
 -P, --partscan                create a partitioned loop device
...

> Auto-detection of a filesystem of /dev/mapper/loop0p1 failed.
> Try with --recheck.
> If the problem persists please report this together with the output of
> "/usr/sbin/grub-probe --device-map="/mnt/loop-root/boot/grub/device.map"
> --target=fs -v /mnt/loop-root/boot/grub" to <bug-g...@gnu.org>
> 1
> # mount | fgrep /mnt/loop-root
> /dev/mapper/loop0p1 on /mnt/loop-root type ext4

There is no feasible way to map this device back to contained device,
short of scanning all maps, finding all partition labels on them and
matching maps against labels.

Half working solution would be to assume that it is always child map.

Or you can take shortcut and assume that /dev/mapper/XXXXpY is
partition of /dev/mapper/XXX but you still will need to verify it.

Patches are welcome.

> (rw,relatime,user_xattr,barrier=1,data=ordered)
> # cat /mnt/loop-root/boot/grub/device.map
> (hd0) /dev/loop0
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to