From h.eichmann@gmx.de  Sun Feb 16 13:05:50 2003
Return-Path: <h.eichmann@gmx.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E1F9337B405
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 16 Feb 2003 13:05:50 -0800 (PST)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by mx1.FreeBSD.org (Postfix) with SMTP id BCEC743F75
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 16 Feb 2003 13:05:49 -0800 (PST)
	(envelope-from h.eichmann@gmx.de)
Received: (qmail 16739 invoked by uid 0); 16 Feb 2003 21:05:48 -0000
Received: from pD9EC2375.dip.t-dialin.net (HELO 192.168.254.43) (217.236.35.117)
  by mail.gmx.net (mp016-rz3) with SMTP; 16 Feb 2003 21:05:48 -0000
Message-Id: <200302162039.16382.h.eichmann@gmx.de>
Date: Sun, 16 Feb 2003 20:39:16 +0100
From: Heiner <h.eichmann@gmx.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Sysinstall deletes mbr although it should not

>Number:         48341
>Category:       bin
>Synopsis:       sysinstall(8): changes the active slice flag when it perhaps shouldn't
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-sysinstall
>State:          suspended
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 16 13:10:09 PST 2003
>Closed-Date:    
>Last-Modified:  Tue Mar 12 21:19:00 UTC 2013
>Originator:     Heiner Eichmann <h.eichmann@gmx.de>
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Sirius Cybernetics Corp.
>Environment:
System: FreeBSD 7of9.unimatrix-zero.borg 4.7-STABLE FreeBSD 4.7-STABLE #0: Sat 
Oct 12 19:14:16 CEST 2002 
root@7of9.unimatrix-zero.borg:/usr/obj/usr/src/sys/MYKERNEL i386
Athlon 1300 borad, 2 hard drives.
Prim. master: 1st partition: Windows 98 with Windows 200 dual boot, 2nd 
partition free (for FreeBSD)
Prim. slave: Windows 2000
>Description:
During the installation from CD as described in the hanbook ad0s2 was choosen 
as install target and partitioned by pressing 'a'. Afterwards, the boot 
manager question (chapter 2.5.4) was answered with "None". My plan was to use 
a boot utility on a floppy disk to boot FreeBSD later on (which works on 
another computer) in order to leave microsoft boot handler untouched. After 
finishing the installation process, the computer could not boot at all: The 
mbr of the primary master hard drive was deleted or destroyed!
By booting from a MS-DOS boot disk and running fdisk /mbr the boot problem was 
fixed. The bug remains: If I choose 'None' in sysinstall I expect the mbr to 
be untouched!
>How-To-Repeat:
Install a non FreeBSD operating system on the first partition of your prim. 
master harddisk which uses the mbr to boot. Install FreeBSD afterwards on the 
second partition of the same disk, answering the question of chapter 2.5.4 
with 'none'. After the installation the mbr is gone.
>Fix:



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->qa 
Responsible-Changed-By: johan 
Responsible-Changed-When: Tue May 6 13:53:46 PDT 2003 
Responsible-Changed-Why:  
Over to maintainer group. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
Responsible-Changed-From-To: qa->freebsd-qa 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Mon Aug 2 18:37:56 GMT 2004 
Responsible-Changed-Why:  
Canonicalize responsible. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
State-Changed-From-To: open->feedback 
State-Changed-By: matteo 
State-Changed-When: Mon Mar 6 14:14:30 UTC 2006 
State-Changed-Why:  
does this bug still exist in recent -RELEASEs ? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 

From: Heiner <h.eichmann@gmx.de>
To: bug-followup@freebsd.org,
 freebsd-qa@freebsd.org
Cc:  
Subject: Re: bin/48341: sysinstall(8): sysinstall deletes mbr although it should not
Date: Fri, 16 Jun 2006 21:01:37 +0200

 I have now tested the installation of FreeBSD 6.1 on a machine with some other 
 OS already existing. I've choosen 'none' as described in the bug description. 
 The goal was to use the existing boot manager and point it afterwards to the 
 FreeBSD installation as well.
 
 Result: the system was not bootable after the FreeBSD installation. An 
 analysis shows, that the mbr was not deleted or destroyed; just the active 
 flag was removed and the FreeBSD slice was set active. Setting the previous 
 slice active resolved the problem!
 
 So the bug text should be replaced by:
 
 sysinstall changes the active slice flag although the corresponding sysinstall 
 question was answered with "None - Leave Master Boot Record untouched"
 
 
 Heiner

From: Heiner <h.eichmann@gmx.de>
To: John Baldwin <john@baldwin.cx>,
 bug-followup@freebsd.org,
 h.eichmann@gmx.de
Cc:  
Subject: Re: bin/48341: sysinstall(8): sysinstall deletes mbr although it
Date: Sun, 25 Jun 2006 11:26:58 +0200

 On Monday 19 June 2006 21:18, John Baldwin wrote:
 > Please fix your mail server to actually honor what SPF says if you want
 > people to reply to your questions.  The SPF record for FreeBSD.org is not
 > exclusive.
 
 Sorry, my mail provider seems to be black listed sometimes. Can't do anything 
 against it ...
 
 > Hmm, this is because the menu is not about leaving the MBR completely
 > untouched (we couldn't add new slices if we did that!) but instead about
 > leaving the boot code in the MBR untouched.  Note that the Active flag
 > isn't stored in the boot code, but in the partition table.  When you
 > create the FreeBSD slice in the MBR during installation, it will have
 > the Active flag set.  You can manually reset the Active flag on the
 
 That is right. But what are the options? Either I do not have a bootloader 
 installed. Then "standard" is the correct choice. Or I have other OS 
 installed and I would like to let the BSD boot manager handle it. 
 Then "BootMgr" is a good choice. Or I would like let my favorite boot manager 
 do the job. Then "None" is my choice. Unfortunately my favorite boot manager 
 will not boot, as the active flag has been changed! I can not think on any 
 situation, where this behaviour might be usefull!
 
 > Windows partition before exiting that stage of the disk editor and
 > things should work as expected.  Would you be able to try that out and
 > verify that?
 
 I did. During the fdisk "Allocating Disk Space" of the installation I selected 
 the windows partition and pressed 'S'. After the installation the windows 
 partition was still active. So this is a good workaround.
 
 
 Heiner

From: John Baldwin <john@baldwin.cx>
To: Heiner <h.eichmann@gmx.de>
Cc: bug-followup@freebsd.org
Subject: Re: bin/48341: sysinstall(8): sysinstall deletes mbr although it
Date: Mon, 26 Jun 2006 08:20:33 -0400

 On Sunday 25 June 2006 05:26, Heiner wrote:
 > On Monday 19 June 2006 21:18, John Baldwin wrote:
 > > Hmm, this is because the menu is not about leaving the MBR completely
 > > untouched (we couldn't add new slices if we did that!) but instead about
 > > leaving the boot code in the MBR untouched.  Note that the Active flag
 > > isn't stored in the boot code, but in the partition table.  When you
 > > create the FreeBSD slice in the MBR during installation, it will have
 > > the Active flag set.  You can manually reset the Active flag on the
 > 
 > That is right. But what are the options? Either I do not have a bootloader 
 > installed. Then "standard" is the correct choice. Or I have other OS 
 > installed and I would like to let the BSD boot manager handle it. 
 > Then "BootMgr" is a good choice. Or I would like let my favorite boot manager 
 > do the job. Then "None" is my choice. Unfortunately my favorite boot manager 
 > will not boot, as the active flag has been changed! I can not think on any 
 > situation, where this behaviour might be usefull!
 
 The problem is the active flag isn't part of the boot code, just part of
 the partition table.  I might want to leave the default DOS MBR boot loader
 present (use "None") but boot FreeBSD, in that case choosing "None" just
 works.  It's not really feasible for the installer to know how custom boot
 loaders treat the Active flag or intuit which slice the user wants to boot
 by default.  If you want to boot a slice other than FreeBSD it is up to the
 user to manually mark the other slice as active after adding the FreeBSD
 slice.  This could probably be made clearer in the documentation though.
 
 > > Windows partition before exiting that stage of the disk editor and
 > > things should work as expected.  Would you be able to try that out and
 > > verify that?
 > 
 > I did. During the fdisk "Allocating Disk Space" of the installation I selected 
 > the windows partition and pressed 'S'. After the installation the windows 
 > partition was still active. So this is a good workaround.
 > 
 > 
 > Heiner
 > 
 
 -- 
 John Baldwin

From: Heiner <h.eichmann@gmx.de>
To: John Baldwin <john@baldwin.cx>
Cc: bug-followup@freebsd.org,
 freebsd-qa@freebsd.org
Subject: Re: bin/48341: sysinstall(8): sysinstall deletes mbr although it
Date: Mon, 26 Jun 2006 22:38:18 +0200

 Hi!
 
 > by default.  If you want to boot a slice other than FreeBSD it is up to the
 > user to manually mark the other slice as active after adding the FreeBSD
 > slice.  This could probably be made clearer in the documentation though.
 
 While I disagree in the first part, I agree in:
 
 - the docmentation should clearly state, what "none" means (changing the 
 active slice) and how to prevent it, if unwanted (selecting the slice and 
 pressing 'S')
 
 - afterwards bug 48341 can be closed
 
 
 Thanks
 
 Heiner
State-Changed-From-To: feedback->open 
State-Changed-By: gavin 
State-Changed-When: Tue Jan 29 11:37:55 UTC 2008 
State-Changed-Why:  
Feedback was received 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
Responsible-Changed-From-To: freebsd-bugs->brucec  
Responsible-Changed-By: brucec 
Responsible-Changed-When: Sat Mar 13 11:27:40 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
State-Changed-From-To: open->suspended  
State-Changed-By: brucec 
State-Changed-When: Wed Jun 16 23:51:11 UTC 2010 
State-Changed-Why:  
sysinstall obtains the list of slices from kern.geom.conftxt.  Unfortunately  
that doesn't contain the flags so sysinstall has no way of knowing which slice  
is active. Suspend this PR pending a rewrite of the slice editor. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
Responsible-Changed-From-To: brucec->freebsd-sysinstall 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Sun Jan 23 21:05:37 UTC 2011 
Responsible-Changed-Why:  
Back to the pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
State-Changed-From-To: suspended->closed 
State-Changed-By: crees 
State-Changed-When: Tue Mar 12 21:13:53 UTC 2013 
State-Changed-Why:  
Sysinstall is no longer in base. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
State-Changed-From-To: closed->suspended 
State-Changed-By: crees 
State-Changed-When: Tue Mar 12 21:18:39 UTC 2013 
State-Changed-Why:  
However, stable/8 is not EOL and still contains sysinstall. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48341 
>Unformatted:
