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: Divya Thaluru
Subject: Re: Error during Install grub on img using loop devices
Date: Sat, 27 Jun 2015 08:47:07 +0000
User-agent: Microsoft-MacOutlook/14.4.8.150116

See inline…

On 6/27/15, 12:54 AM, "Andrei Borzenkov" <address@hidden> wrote:

>В Sat, 27 Jun 2015 07:40:30 +0000
>Divya Thaluru <address@hidden> пишет:
>
>> Hi Andrei,
>> 
>> Good news I was able to install grub, but I have some issues.
>> 
>
>How did you install? In host or in chroot?

I am running in chroot
>
>> 1)
>> Grub-install and grub-mkconfig commands throw this error but both are
>> completed.
>> device-mapper: table ioctl on  failed: No such device or address
>> 
>
>Which version of grub?

2.02
>
>> 2)I generate grub.cfg file using grub-mkconfig command. It generates
>> grub.cfg file with loop devices as root. I have to go change manually.
>>Is
>> there any fix for it?
>> 
>
>What do you mean "root"? Could you attach grub.cfg?

I mounted raw image as loop back device. And I am installing grub on my
loop back device. I am installing grub with device map file. Attached
grub.cfg file
>
>> 3)If I add verbose option to grub-install, grub-install command won’t
>>work
>> and it just displays version info as output. Is there any patch for
>>this
>> fix?
>> 
>
>Copy'n'paste would be good. But grub-install did not really support
>--verbose as far as I remember; it was --debug.


bash-4.3# grub-install -v --no-floppy --grub-mkdevicemap=/device.map
/dev/loop2
grub-install (GRUB) 2.00
bash-4.3# grub-install --no-floppy --grub-mkdevicemap=/device.map
/dev/loop2
device-mapper: table ioctl on  failed: No such device or address
…..
Installation finished. No error reported.

In first try, it did not install grub but in second case it installed grub.




>
>> 4)At the time of boot, I am getting a following error message
>> error: no symbol table
>> 
>> Loading Linux 3.19.2…. ...
>> Press any key to continue ...
>> 
>> The system then proceeds to boot normally.
>> 
>> 
>
>Do you boot on real hardware or QEMU (or similar) using just installed
>image?

These seems to be fixed if I don’t strip symbols from grub binaries.

 
>> 
>> Thanks for your help...
>> 
>> Thanks,
>> Divya
>> 
>> 
>> On 6/26/15, 10:53 PM, "Divya Thaluru" <address@hidden> wrote:
>> 
>> >Hi Andrei,
>> >
>> >I am not building with device mapper. I will try and let you know.
>>Thanks
>> >for your help.
>> >
>> >Thanks,
>> >Divya
>> >
>> >Sent from my iPhone
>> >
>> >> On Jun 26, 2015, at 10:47 PM, Andrei Borzenkov <address@hidden>
>> >>wrote:
>> >> 
>> >> В 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
>> 
>

Attachment: grub.cfg
Description: grub.cfg


reply via email to

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