FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 11-25-2009, 12:49 PM
Hans de Goede
 
Default Do not set boot flag when there is already a partition with the flag

In F-10 and before we did not set the boot flag for /boot on msdos labels,
this could lead to issues when asked to install grub into a partition,
or with certain BIOS's which won't boot from a disk when there are no
active partitions on the disk. However our new behavior of always setting
the boot flag for /boot is wrong for msdos labels too, and is causing various
issues, see (amongst others) bug 530894 and:
http://forums.fedoraforum.org/showthread.php?t=231421
http://forums.fedoraforum.org/showthread.php?t=2348
---
storage/__init__.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index b3da135..ea89633 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -291,6 +291,19 @@ class Storage(object):
else:
for dev in bootDevs:
if hasattr(dev, "bootable"):
+ # Dos labels can only have one partition marked as active
+ # and unmarking ie the windows partition is not a good idea
+ skip = False
+ if dev.disk.format.partedDisk.type == "msdos":
+ for p in dev.disk.format.partedDisk.partitions:
+ if p.type == parted.PARTITION_NORMAL and
+ p.getFlag(parted.PARTITION_BOOT):
+ skip = True
+ break
+ if skip:
+ log.info("not setting boot flag on %s as there is"
+ "another active partition" % dev.name)
+ continue
log.info("setting boot flag on %s" % dev.name)
dev.bootable = True
dev.disk.setup()
--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org