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: Mon, 29 Jun 2015 04:10:18 +0000
User-agent: Microsoft-MacOutlook/14.4.8.150116

Hi Andrei,

All my issues are fixed except correct generation of grub.cfg file with
grub 2.02 version. The source code had the condition you specified.
I binded following mounts in to chroot as I am installing in chroot. proc,
sys , /dev/loopX and /dev/mapper/loopXp1.

Currently I have to change the root from /dev/mapper/loopXp1 to /dev/sda1
to boot in grub.cfg file. I attached the screenshot of grub.cfg file.

Thanks,
Divya
  


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

>В Sat, 27 Jun 2015 08:47:07 +0000
>Divya Thaluru <address@hidden> пишет:
>
>> >
>> >> 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
>
>       linux   /boot/vmlinuz-3.19.2 root=/dev/mapper/loop2p1 ro
>
>Well, you need to check why, condition is here:
>
> if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}"
> = "xtrue" ] \
>    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
>    || uses_abstraction "${GRUB_DEVICE}" lvm; then
>  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
>
>
>My guess is that GRUB misdetects it as LVM. Hard to tell for old
>version you are using. It does not happen in master:
>
>address@hidden:~/build/grub> LC_ALL=C df -h /mnt
>Filesystem           Size  Used Avail Use% Mounted on
>/dev/mapper/loop0p2  9.0M  5.5M  3.6M  61% /mnt
>address@hidden:~/build/grub> sudo pkgdatadir=$PWD ./grub-probe -t
>abstraction /mnt
>address@hidden:~/build/grub>
>
>
>> >
>> >> 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
>
>Well, there was some non-backward compatible changes indeed since 2.00
>(unintentional). In 2.02~beta2 it should indeed bump verbosity, in
>2.00 it did display version
>
>     print_option_help "-v, --version" "$(gettext "print the version
>     information and exit")"
>
>
>> 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.
>> 
>
>How did you manage it? Do *NOT* ever mess with grub Makefiles for
>targets - it is absolutely and utterly unsupported. GRUB already strips
>everything that is not needed.

Attachment: Screen Shot 2015-06-28 at 9.07.06 PM.png
Description: Screen Shot 2015-06-28 at 9.07.06 PM.png


reply via email to

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