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

Re: [Xen-users] pvgrub2 launch of Xen 4.5.1 DomU just drops to grub2 prompt ?



When xvda has only one partition, and its root contains symlinks to the
kernel/ramdisk pair, this works

cat boot/grub/grub.cfg
insmod part_msdos
insmod part_bsd
insmod part_gpt

# check for symlinks to boot pair
if [ -f "(xen/xvda,msdos1)/vmlinuz" ] ; then
set root=(xen/xvda,msdos1)
set dev=xvda1
echo 'got msdos1, fire missle'
else
if [ -f "(xen/xvda)/vmlinuz" ] ; then
set root=(xen/xvda)
set dev=xvda
echo 'got flat device, fire missle'
fi
fi
if [ $root != '(memdisk)' ]; then
insmod xzio
insmod gzio
insmod btrfs
insmod ext2
echo 'Loading Linux ...'
linux /vmlinuz root=/dev/$dev ro noresume selinux=0 console=hvc0
echo 'Loading initial ramdisk ...'
initrd /initrd.img
boot
fi

if [ -f "(xen/xvda,msdos1)/boot/grub/menu.lst" ] ; then
set root=(xen/xvda,msdos1)
legacy_configfile /boot/grub/menu.lst
fi

for part in msdos1 gpt1 bsd1; do
    for maindir in boot/ /; do
        for subdir in grub grub2; do
            if [ -f "(xen/xvda,$part)/$maindir/$subdir/grub.cfg" ]; then
                set root=(xen/xvda,$part)
                configfile /$maindir/$subdir/grub.cfg
            fi
        done
    done
done

set root=(xen/xvde,msdos1)
legacy_configfile /boot/grub/menu.lst
======= end grub.cfg =======

I'm in C7 with a xen enabled grub2:
 grub2-mkstandalone --compress=gz  --fonts="unicode" --locales="en@quot" --themes="" -O x86_64-xen -o xa-grub2-x86_64-xen.bin boot/grub/grub.cfg

When you have a partition, its very important that the grub2 logic finds it. My first few attempts to script this, the (xen/xvda,msdos1) seemed hidden.

PryMar56




On Monday, October 19, 2015 9:06 AM, PGNet Dev <pgnet.dev@xxxxxxxxx> wrote:


On 10/19/2015 08:47 AM, Mark Pryor wrote:
> your root is actually at
> (xen/xvda,msdos1)
> since you use partitions in each device. I usually don't.
> When you drop to a shell during the boot attempt, try and browse around
> and you should see all the partitions:
>>ls
> == all the partitions ==
>>root=(xen/xvda,msdos1)

Here I get

grub> ls
(memdisk) (xen/xvda) (xen/xvdc)
grub> ls /
boot/

using


root=(xen/xvda,msdos1)


simply drops me, similarly, to the grub prompt.




_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.