community.riocities.com
  • Home
  • Categories
  • Tags
  • Archives

pvgrub workaround for separate /boot

Intro¶

The pvgrub binary in Debian Jessie (dom0) is not "happy" about the fact that in Fedora (domU) /boot is on a separate partition and that the grub config is stored in /boot/grub2/grub.cfg.

Errors seen when starting a domU with this setup

# xl create /etc/xen/<domU>.cfg -c                                                                                             
Parsing config from /etc/xen/<domU>.cfg
error: no such device: /boot/xen/pvboot-x86_64.elf.
error: no such device: /xen/pvboot-x86_64.elf.
error: no such device: /boot/grub/grub.cfg.

                        GNU GRUB  version 2.02~beta2-22

   Minimal BASH-like line editing is supported. For the first word, TAB   
   lists possible command completions. Anywhere else TAB lists possible   
   device or file completions.                                            


grub>

A quick fix is to create a symlink grub.cfg -> /grub2/grub.cfg

Howto fix from dom0¶

Mount disk (if /boot is the first partition of the disk)

# losetup -f /dev/vg_raid1/<domu>-volume 
# kpartx -av /dev/loop0
add map loop0p1 (253:21): 0 1024000 linear /dev/loop0 2048
add map loop0p2 (253:22): 0 11556864 linear /dev/loop0 1026048

# mount /dev/mapper/loop0p1 /mnt

Add symlink

# cd /mnt/
# mkdir -p boot/grub
# cd boot/grub/
# ln -s /grub2/grub.cfg grub.cfg

Clean-up

# cd /
# umount /mnt 
# kpartx -dv /dev/loop0 
del devmap : loop0p2
del devmap : loop0p1
# losetup -d /dev/loop0

After this pvgrub should be able to bring up the grub menu in the Fedora domU.


  • « Configure OpenIKE Site to Site VPN in OpenBSD
  • NFSv4+Kerberos in FreeBSD »

Published

Jun 26, 2015

Author

henrik

Category

HOWTOs

Tags

  • Debian 8
  • XEN 21

Social

  • atom feed
  • rss feed
  • ipv6 ready
  • Powered by Pelican. Theme: Elegant by Talha Mansoor