Bug 467576

Summary: parted breaks content of extended partition
Product: [openSUSE] openSUSE 11.1 Reporter: Jozef Uhliarik <juhliarik>
Component: BasesystemAssignee: Petr Uzel <puzel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P1 - Urgent CC: behlert, dietmar.hahn, jreidinger, vpelcak
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard: maint:released:11.1:22275
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jozef Uhliarik 2009-01-20 13:38:48 UTC
Hi Petr,

partitioning of disk: 
 - "/" is on logical partition
 - there doesn't exist primary /boot partition

bootloader proposes:
 - write generic boot code to MBR
 - GRUB stage1 to extended partition
 - GRUB stage2 to "/" on logical partition

If I called set boot flag to extended partition via parted it breaks content of extended partition (the first 512B) It is cause of unbootable system. It is desribed in bug #461613 for yast2-bootloader.

I did fix for calling parted in yast2-bootloader (called only if it is necessary not each time) but the basic problem is in parted.

The problem is also in openSUSE 11.1

How to reproduce it:
 - create partitiong of disk where "/" is on logical and there is missing primary /boot partition
 - propose bootloader to install generic boot code to MBR and select boot from extended partition
 - start parted and set boot flag for extended partition
Comment 1 Josef Reidinger 2009-01-21 08:42:37 UTC
*** Bug 467593 has been marked as a duplicate of this bug. ***
Comment 2 Josef Reidinger 2009-01-21 09:09:12 UTC
Problem is more serious. it affects any change done by parted to logical partition as you can see in duplicate bug. So if you boot from extended partition and change logical partition (shrink, create, delete) you end with non-bootable system.

How to reproduce it -
1) install grub to extended partition ( I can paste command)
2) do something with parted on logical partition
and you end up with empty boot code in extended partition
Comment 3 Petr Uzel 2009-01-22 13:23:13 UTC
(In reply to comment #2)
> How to reproduce it -
> 1) install grub to extended partition ( I can paste command)
Please, be so kind :)
Comment 4 Josef Reidinger 2009-01-22 13:28:25 UTC
easiest way is that (or you can come personal ;)
1) start grub shell: grub
2) set root to your current boot partition (e.g. /dev/sda6): root (hd0,5)
3) install stage 1 to extended partition (e.g. /dev/sda3): setup (hd0,2)
4) quit grub shell: quit

and thats all
Comment 5 Petr Uzel 2009-01-22 16:05:53 UTC
It's even worse than in comment #2 - it's enough to touch primary partition (IOW make parted rewrite the partitions to disk) and the bootcode from extended partition is gone. 

Reported upstream and working on the fix.
Comment 9 Petr Uzel 2009-01-23 13:00:27 UTC
Fixed in Factory and SLE11.
Comment 12 Thorsten Kukuk 2009-01-26 15:53:17 UTC
If this is fixed and only is there for maintenace update tracking, it should be moved to openSUSE 11.1.
Comment 13 Anja Stock 2009-01-27 12:57:14 UTC
Does this have to be fixed in the installation system?
Comment 14 Petr Uzel 2009-01-27 14:17:39 UTC
(In reply to comment #13)
> Does this have to be fixed in the installation system?

I guess no as the issue in installation system/YaST is already solved with bug #461613. But booting still might broke when parted is invoked directly from console - and thus I think we should do maintenance update for parted too.
Comment 17 Petr Uzel 2009-01-28 12:45:37 UTC
Submitted to 11.1. Closing
Comment 18 Swamp Workflow Management 2009-02-11 13:40:47 UTC
Update released for: parted, parted-devel
Products:
openSUSE 11.1 (debug, i586, ppc, ppc64, x86_64)