bugGNU GRUB - Bugs: bug #44026, legacy_configfile fail to boot...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44026: legacy_configfile fail to boot system with xen pvgrub

Submitter:  Alexander <viliar>
Submitted:  Fri 16 Jan 2015 05:50:04 PM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name:  Alex
Open/Closed:  Closed Release:  2.02~beta1
Release:  Reproducibility:  Every Time
Planned Release:  None

Fri 23 Jan 2015 04:54:27 PM UTC, comment #5: 

Fixed in 2f73d2733ce8f1e60561a4f7c3a7caa3717fb174.

Andrei Borzenkov <arvidjaar>
Group Member
Thu 22 Jan 2015 07:34:22 PM UTC, comment #4: 

@Andrei: go ahead with your patch

Vladimir Serbinenko <phcoder>
Group administrator
Sat 17 Jan 2015 08:47:43 PM UTC, comment #3: 

Yep, I can confirm, patch fix this problem. Thank you!

Alexander <viliar>
Sat 17 Jan 2015 10:02:14 AM UTC, comment #2: 

Does attached patch help?

(file #32857)

Andrei Borzenkov <arvidjaar>
Group Member
Fri 16 Jan 2015 06:16:08 PM UTC, comment #1: 

Update:
Sorry for misspelling. I mean "menu.lst has been loaded correctly, but system fail to boot with it".

Alexander <viliar>
Fri 16 Jan 2015 05:50:04 PM UTC, original submission:  

I'm trying to replace old pvgrub in xen env with new pvgrub2 and use it for booting domU with grub2 and grub-legacy inside via universal grub.cfg (search apropriate config file and then boot system with it).

According https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/ I have compiled grub for i386-xen, x86_64-xen. domU with grub2 booting correct. But trying to load grub-legacy menu.lst inside domU with legacy_configfile has been failed:
error: couldn't load file kernel-version
error: you need to load the kernel first.

Looks like where is no mapping real device (xen/xvda) with (hd0), so system cannot boot.
Manual "set root" allow to boot system with legacy_kernel/legacy_initrd (see bellow)




============================================
Additional system information

dom0: fedora21, xen 4.5.
domU: fedora20/21 (kernel = "/usr/lib/xen/boot/grub-x86_64-xen.bin")

grub: grub-2.02~beta2 
(compiled with CFLAGS="-Wno-error=cpp" ./configure --target=x86_64 --with-platform=xen; make
CFLAGS="-Wno-error=cpp" ./configure --target=i386 --with-platform=xen; make)

pvgrub create:

grub-bootstrap.cfg:
normal (memdisk)/grub.cfg

test grub.cfg:
set root=(xen/xvda,msdos1)
if search -s -f /boot/grub/menu.lst; then
        legacy_configfile /boot/grub/menu.lst
fi

tar cf memdisk.tar grub.cfg
grub-mkimage -O x86_64-xen -c grub-bootstrap.cfg -m memdisk.tar -o grub-x86_64-xen.bin /usr/lib/grub/x86_64-xen/*.mod

domU /boot/grub/menu.lst:
title Fedora release 20 (Heisenbug) via grub-legacy config
 root (hd0,0)
 kernel /boot/vmlinuz-3.17.8-200.fc20.x86_64 root=/dev/xvda1 ro clocksource=xen ipv6.disable=1 biosdevname=0 net.ifnames=0 console=hvc0
 initrd /boot/initramfs-3.17.8-200.fc20.x86_64.img


Boot error:
  Booting `Fedora release 20 (Heisenbug) via grub-legacy config'

error: couldn't load file /boot/vmlinuz-3.17.8-200.fc20.x86_64.
error: you need to load the kernel first.

Press any key to continue...


Generated config vi legacy_configfile looks this way:

 |set root='(hd0,1)'; set legacy_hdbias='0'                                   |
 |legacy_kernel   '/boot/vmlinuz-3.17.8-200.fc20.x86_64' '/boot/vmlinuz-3.17.\|
 |8-200.fc20.x86_64' 'root=/dev/xvda1' 'ro' 'clocksource=xen' 'ipv6.disable=1\|
 |' 'biosdevname=0' 'net.ifnames=0' 'console=hvc0'                            |
 |legacy_initrd '/boot/initramfs-3.17.8-200.fc20.x86_64.img' '/boot/initramfs\|
 |-3.17.8-200.fc20.x86_64.img'                                                |

Variables:
grub> ls
(memdisk) (proc) (xen/xvda) (xen/xvda,msdos1)
grub> set
?=18
DAY=16
HOUR=17
MINUTE=27
MONTH=1
SECOND=48
WEEKDAY=Friday
YEAR=2015
check_signatures=no
color_highlight=black/light-gray
color_normal=light-gray/black
config_directory=(memdisk)
config_file=(memdisk)/grub.cfg
default=0
feature_200_final=y
feature_all_video_module=y
feature_chainloader_bpb=y
feature_default_font_path=y
feature_menuentry_id=y
feature_menuentry_options=y
feature_nativedisk_cmd=y
feature_ntldr=y
feature_platform_search_hint=y
feature_timeout_style=y
grub_cpu=x86_64
grub_platform=xen
lang=
legacy_hdbias=0
locale_dir=
net_default_ip=(null)
net_default_mac=(null)
net_default_server=
pager=
prefix=(memdisk)/boot/grub
pxe_default_server=
root=hd0,1
secondary_locale_dir=


Manual "set root" allow to boot system with legacy_kernel/legacy_initrd:
grub> set root=(xen/xvda,msdos1)
grub> legacy_kernel '/boot/vmlinuz-3.17.8-200.fc20.x86_64' '/boot/vmlinuz-3.17.8
-200.fc20.x86_64' 'root=/dev/xvda1' 'ro' 'clocksource=xen' 'ipv6.disable=1' 'bio
sdevname=0' 'net.ifnames=0' 'console=hvc0'
grub> legacy_initrd '/boot/initramfs-3.17.8-200.fc20.x86_64.img' '/boot/initramf
s-3.17.8-200.fc20.x86_64.img'
grub> boot                  [ initramfs-3.17.8-200  8.92MiB  100%  17.09KiB/s ]
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
...
Fedora release 20 (Heisenbug)
Kernel 3.17.8-200.fc20.x86_64 on an x86_64 (hvc0)

localhost login:
...
============================================


I didn't find workarounds for it yet. Can make some other testing if it needed. Thank you.



 |

Alexander <viliar>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Updated the item)
  • -email is unavailable- added by viliar (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-23 arvidjaar StatusNone Fixed
        Open/ClosedOpen Closed
    2015-01-17 arvidjaar Attached File- Added 0001-accept-also-hdX-as-alias-to-native-Xen-disk-name.patch, #32857

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code