On 05/06/2015 07:16 PM, Andrei Borzenkov wrote:
> 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
> ...

Thanks for introducing me to --partscan.  It's too young for Debian
wheezy, though.


>> 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.

Why not?

lsblk manages to detect that /dev/mapper/loop0p1 is a child of /dev/loop0:

# lsblk | fgrep loop | sed 's| \{23\}||'
loop0                 7:0    0   100M  0 loop
└─loop0p1 (dm-9)    254:9    0    96M  0 part  /mnt/loop-root


> 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.

I am still wondering: how come it was working in GRUB 2.00 but now
longer is?

Best,



Sebastian


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

Reply via email to