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

Submitted by:  Alexander <viliar>
Submitted on:  Fri 16 Jan 2015 05:50:04 PM UTC  
 
Category: BootingSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: Alex
Open/Closed: ClosedRelease: 
Release: 2.02~beta1Reproducibility: Every Time
Planned Release: None

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

Fixed in 2f73d2733ce8f1e60561a4f7c3a7caa3717fb174.

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

@Andrei: go ahead with your patch

Vladimir Serbinenko <phcoder>
Project 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>
Project 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>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Jan 2015 04:54:27 PM UTCarvidjaarStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 17 Jan 2015 10:02:14 AM UTCarvidjaarAttached File-=>Added 0001-accept-also-hdX-as-alias-to-native-Xen-disk-name.patch, #32857

    Back to the top


    Powered by Savane 3.1-cleanup1