grub-devel
[Top][All Lists]
Advanced

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

Re: Future of installing GRUB to LVM volumes (and loop devices)


From: Andrei Borzenkov
Subject: Re: Future of installing GRUB to LVM volumes (and loop devices)
Date: Wed, 6 May 2015 20:16:45 +0300

В Wed, 06 May 2015 14:30:00 +0200
Sebastian Pipping <address@hidden> пишет:

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

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

address@hidden:~/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 <address@hidden>
> 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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel




reply via email to

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