I install a domU using: disk = [ ''phy:system/dpm_0,xvda:sda,w'', ''file:/lucid.iso,xvdc:cdrom,r'' ] During the install I see the partition map as: ~ # sfdisk -d /dev/sda Warning: extended partition does not start at a cylinder boundary. DOS and Linux will interpret the contents differently. # partition table of /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 9226240, Id=83 /dev/sda2 : start= 9230334, size= 532482, Id= 5 /dev/sda3 : start= 0, size= 0, Id= 0 /dev/sda4 : start= 0, size= 0, Id= 0 /dev/sda5 : start= 9230336, size= 532480, Id=82 sda1 = / sda5 = swap so far so good. After running partprobe, I see the embedded partitions: brw-rw---- 1 root disk 250, 4 Jul 10 12:06 system-dpm_0 brw-rw---- 1 root disk 250, 8 Jul 10 09:25 system-dpm_0p1 brw-rw---- 1 root disk 250, 9 Jul 10 09:25 system-dpm_0p2 brw-rw---- 1 root disk 250, 10 Jul 10 09:25 system-dpm_0p5 Still OK. Now it gets weird. I mount the domU / to edit grub.cfg: # mount /dev/mapper/system-dpm_0p1 /mnt/dpm # vi /mnt/dpm/boot/grub/grub.cfg -- add a new boot entry -- # umount /mnt/dpm pygrub /dev/mapper/dpm_0: pyGRUB version 0.6 ┌──────────────────────── │ dpm-domu , with Linux 2.6.32.16 The 2nd boot entry is missing - why is it not seeing the embedded partition? But if I run pygrub /dev/mapper/dpm_0p1, I see the new boot entry:: pyGRUB version 0.6 ┌──────────────────────── │ dpm-domu , with Linux 2.6.32.16 │ dpm-domu , with Linux 2.6.32 Shouldn''t pygrub see the 2nd boot entry when pointed at the lvm partition /dev/mapper/system-dpm_0 as opposed to the embedded partition pygrub /dev/mapper/dpm_0p1 ? Where is the second copy of the grub.cfg? I thought there was no boot sector grub.cfg anymore. Is that not the case? -Bruce _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jul-11 12:40 UTC
Re: [Xen-users] pygrub lvm partition & grub.cfg question
On Sun, Jul 11, 2010 at 6:41 AM, Bruce Edge <bruce.edge@gmail.com> wrote:> pygrub /dev/mapper/dpm_0: > > pyGRUB version 0.6 > ┌──────────────────────── > │ dpm-domu , with Linux 2.6.32.16 > The 2nd boot entry is missing - why is it not seeing the embedded partition? > But if I run > pygrub /dev/mapper/dpm_0p1, I see the new boot entry:: > pyGRUB version 0.6 > ┌──────────────────────── > │ dpm-domu , with Linux 2.6.32.16 > │ dpm-domu , with Linux 2.6.32 > Shouldn''t pygrub see the 2nd boot entry when pointed at the lvm partition > /dev/mapper/system-dpm_0 > as opposed to the embedded partition pygrub /dev/mapper/dpm_0p1 ? > Where is the second copy of the grub.cfg? > I thought there was no boot sector grub.cfg anymore. > Is that not the case?Short summary, there might be some caching issue involved there. Try something like echo 3 > /proc/sys/vm/drop_caches Then test again with pygrub -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, Jul 11, 2010 at 5:40 AM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Sun, Jul 11, 2010 at 6:41 AM, Bruce Edge <bruce.edge@gmail.com> wrote: > > pygrub /dev/mapper/dpm_0: > > > > pyGRUB version 0.6 > > ┌──────────────────────── > > │ dpm-domu , with Linux 2.6.32.16 > > The 2nd boot entry is missing - why is it not seeing the embedded > partition? > > But if I run > > pygrub /dev/mapper/dpm_0p1, I see the new boot entry:: > > pyGRUB version 0.6 > > ┌──────────────────────── > > │ dpm-domu , with Linux 2.6.32.16 > > │ dpm-domu , with Linux 2.6.32 > > Shouldn''t pygrub see the 2nd boot entry when pointed at the lvm partition > > /dev/mapper/system-dpm_0 > > as opposed to the embedded partition pygrub /dev/mapper/dpm_0p1 ? > > Where is the second copy of the grub.cfg? > > I thought there was no boot sector grub.cfg anymore. > > Is that not the case? > > Short summary, there might be some caching issue involved there. Try > something like > > echo 3 > /proc/sys/vm/drop_caches > > Then test again with pygrub > >That was it. Thanks! I would have thought that ''sync'' would do the same thing, but it doesn''t. -Bruce _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users