help-grub
[Top][All Lists]
Advanced

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

Re: Error during Install grub on img using loop devices


From: Andrei Borzenkov
Subject: Re: Error during Install grub on img using loop devices
Date: Sat, 27 Jun 2015 08:47:12 +0300

В Sat, 27 Jun 2015 05:25:12 +0000
Divya Thaluru <address@hidden> пишет:

> Hi Andrei,
> 
> I tried with 2.02 beta also , I have seen similar error. I will try with 
> current stream and let you know.
> 

I just yesterday tested exactly this when answering another mail (see
archives). So I am absolutely sure it works in current upstream. What
could go wrong, you need to link grub utilities with libdevmapper. Make
sure configure summary shows "With devmapper support: Yes".

> >> 
> >> losetup --show --find XXX.raw -> return /dev/loop0
> >> kpartx -av /dev/loop0 -> adds maps loop0p1
> >> mkfs.ext4 /dev/mapper/loop0p1
> >> mount /dev/mapper/loop0p1 /mnt/work/chroot/
> >> touch /mnt/work/chroot/dev/loop0
> >> mount --bind /dev/loop0 /mnt/work/chroot/dev/loop0
> >> mkdir -p  /mnt/work/chroot/dev/mapper/
> >> touch /mnt/work/chroot/dev/mapper/loop0p1
> >> mount --bind /dev/mapper/loop0p1 /mnt/work/chroot/dev/mapper/loop0p1
> >> mount -t proc none /mnt/work/chroot/proc
> >> mount -t sysfs none /mnt/work/chroot/sys
> >> 
> >> chroot /mnt/work/chroot
> >> 

No, this probably won't work in any case. You need to bind mount
full /dev into your chroot as well. Also there is really no need to use
chroot at all, you can use grub-install
--boot-directory=/mnt/chroot/boot



reply via email to

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