Bug 450728 - dies if a swap partition is marked bootable
Summary: dies if a swap partition is marked bootable
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xenner
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Gerd Hoffmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-10 18:39 UTC by Bill Nottingham
Modified: 2014-03-17 03:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-23 20:19:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2008-06-10 18:39:45 UTC
Description of problem:

As swap partitions use the same ID as old Solaris partitions.

Version-Release number of selected component (if applicable):

xenner-0.36-1.fc9.x86_64

Comment 1 Gerd Hoffmann 2008-06-12 19:14:31 UTC
Can you provide a log? (/var/log/libvirt/qemu/<name>.log when using libvirt,
stderr otherwise).  Probably it is pygrub failing to find a kernel on the guest
disk.

Comment 2 Bill Nottingham 2008-06-12 19:41:31 UTC
[root@nostromo images]# pygrub -i /var/lib/libvirt/images/test.img 
Traceback (most recent call last):
  File "/usr/bin/pygrub", line 648, in <module>
    fs = fsimage.open(file, get_fs_offset(file))
  File "/usr/bin/pygrub", line 117, in get_fs_offset
    offset += get_solaris_slice(file, offset)
  File "/usr/bin/pygrub", line 80, in get_solaris_slice
    raise RuntimeError, "Invalid disklabel magic"
RuntimeError: Invalid disklabel magic


Comment 3 Gerd Hoffmann 2008-06-23 07:20:11 UTC
Ok, so it actually is pygrub failing.  It isn't xenner specific, trying with xen
itself will fail the very same way.

It also isn't very surprising because pygrub uses the bootable flag to figure
the partition it should get the kernel from.  IMHO that isn't a bug.  Why is the
boot flag set on the swap partition in the first place?

Comment 4 Bill Nottingham 2008-06-23 15:20:10 UTC
Left over from playing with a usb stick, IIRC.

Why is it not a bug? Shouldn't it just ignore the partition and continue?

Comment 5 Gerd Hoffmann 2008-06-23 16:04:24 UTC
Ignoring the partition would break booting solaris guests.
Just fix the active flag.

Comment 6 Bill Nottingham 2008-06-23 16:10:14 UTC
How would it break booting a solaris guest if you just logged the disklabel
error and continued? If they don't have a valid solaris boot, it would still
then fail.

Comment 7 Gerd Hoffmann 2008-06-23 20:19:08 UTC
Ignoring the swap partition (by id) would break solaris guests, this is what I
assumed you meant.

Well, continue with what?  pygrub doesn't scan all partitions, trying to guess
which one is the boot partition.  It expects the boot flag being set on the boot
partition and looks only at that one.

Comment 8 Bill Nottingham 2008-06-23 20:22:36 UTC
Hm, OK. However, you can have multiple partitions with the boot flag, so I
wonder if that's enough.



Note You need to log in before you can comment on or make changes to this bug.