From nobody@FreeBSD.ORG  Fri Nov 24 01:36:44 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 8FF5C37B479; Fri, 24 Nov 2000 01:36:44 -0800 (PST)
Message-Id: <20001124093644.8FF5C37B479@hub.freebsd.org>
Date: Fri, 24 Nov 2000 01:36:44 -0800 (PST)
From: k.j.koster@kpn.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Alphas do not boot if `a' (/) partition isn't at a lower offset than `b' (swap)
X-Send-Pr-Version: www-1.0

>Number:         23064
>Category:       alpha
>Synopsis:       Alphas do not boot if `a' (/) partition isn't at a lower offset than `b' (swap)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jkh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 24 01:40:01 PST 2000
>Closed-Date:    Fri Jul 13 09:45:28 PDT 2001
>Last-Modified:  Fri Jul 13 09:45:38 PDT 2001
>Originator:     Kees Jan Koster
>Release:        FreeBSD 4.2 Release
>Organization:
KPN Research
>Environment:
FreeBSD 4.2 Release (sorry, no Alpha to paste from. Besides, how can I
paste from a machine that does not boot?)
>Description:
Alphas do not boot if `a' (/) partition isn't at a lower offset than
`b' (swap). This problem is not seen on FreeBSD/x86. I have several
machines that are configured in this way.
>How-To-Repeat:
In a single disk system, create a swap partition of 2x memory size first,
, and then use "the rest" for /. Install, reboot, death.
>Fix:
No fix, sorry.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: wilko 
State-Changed-When: Tue Jan 23 14:07:54 PST 2001 
State-Changed-Why:  
The issue reported is inherent in the alpha SRM. The requirement 
for the partition location is documented in INSTALL.TXT for both 
-current and -releng4 


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

From: "Koster, K.J." <K.J.Koster@kpn.com>
To: "'freebsd-gnats-submit@FreeBSD.org'" <freebsd-gnats-submit@FreeBSD.org>
Cc: "'wilko@FreeBSD.org'" <wilko@FreeBSD.org>,
	"Koster, K.J." <K.J.Koster@kpn.com>
Subject: Re: alpha/23064: Alphas do not boot if `a' (/) partition isn't at	a
 lower offset than `b' (swap)
Date: Wed, 24 Jan 2001 10:56:56 +0100

 Dear Wilko,
 
 While I appreciate your janitorial :) efforts, I would like to ask you to
 reopen this PR.
 
 The reason for me to open the PR was that it may scare off the
 Alpha-newbies.
 
 Since this is an Alpha-specific problem, perhaps /stand/sysinstall should
 have a warning if someone on an Alpha wants to shoot himself in the foot.
 (Just a warning, because if people need their foot shot off they should be
 able to do it). Something along the lines of: "Gee, looks like you're going
 to create a non-booting disk layout, are you sure you want to do that?" (I'm
 sure you can download an appropriate ASCII-art paperclip from microsoft.com)
 
 This is a similar case as the >1024 cylinder install, which was a PC BIOS
 issue. I believe /stand/sysinstall had a warning in place for that issue.
 
     Kees Jan
 
 ================================================
  You are only young once,
        but you can stay immature all your life.
 
 

From: Wilko Bulte <wkb@freebie.demon.nl>
To: "Koster, K.J." <K.J.Koster@kpn.com>,
	"Jordan K. Hubbard" <jkh@freebsd.org>
Cc: "'freebsd-gnats-submit@FreeBSD.org'" <freebsd-gnats-submit@freebsd.org>,
	"'wilko@FreeBSD.org'" <wilko@freebsd.org>
Subject: Re: alpha/23064: Alphas do not boot if `a' (/) partition isn't at	a lower offset than `b' (swap)
Date: Thu, 25 Jan 2001 21:00:07 +0100

 Hi Jordan,
 
 Sysinstall being essentially your baby (don't try to deny it ;-), do you
 think things like the issue reported below should be in sysinstall? 
 
 I'm not particularly in favor of it to be honest, but I'd appreciate your
 view. There are so many things that one could do wrong during install, this
 example is just one of them. Example: nothing stops you from creating much
 too small filesystems.
 
 People Just Should Read Docs, before loading the ammo and then shooting
 themselves in the foot.
 
 tnx
 
 Wilko
 
 
 On Wed, Jan 24, 2001 at 10:56:56AM +0100, Koster, K.J. wrote:
 
 > Dear Wilko,
 > 
 > While I appreciate your janitorial :) efforts, I would like to ask you to
 > reopen this PR.
 > 
 > The reason for me to open the PR was that it may scare off the
 > Alpha-newbies.
 > 
 > Since this is an Alpha-specific problem, perhaps /stand/sysinstall should
 > have a warning if someone on an Alpha wants to shoot himself in the foot.
 > (Just a warning, because if people need their foot shot off they should be
 > able to do it). Something along the lines of: "Gee, looks like you're going
 > to create a non-booting disk layout, are you sure you want to do that?" (I'm
 > sure you can download an appropriate ASCII-art paperclip from microsoft.com)
 > 
 > This is a similar case as the >1024 cylinder install, which was a PC BIOS
 > issue. I believe /stand/sysinstall had a warning in place for that issue.
 > 
 >     Kees Jan
 > 
 > ================================================
 >  You are only young once,
 >        but you can stay immature all your life.
 ---end of quoted text---
 
 -- 
 |   / o / /  _  	 Arnhem, The Netherlands    	email: wilko@freebsd.org
 |/|/ / / /( (_) Bulte	 http://www.freebsd.org 	http://www.nlfug.nl
 
State-Changed-From-To: closed->open 
State-Changed-By: wilko 
State-Changed-When: Sat Jan 27 11:16:13 PST 2001 
State-Changed-Why:  
Re-opening and assigning to jkh for comment on suggested sysinstall  
check for sanity on partition layout. 

Jordan, can we please have your thumbs up/down on this? 



Responsible-Changed-From-To: freebsd-alpha->jkh 
Responsible-Changed-By: wilko 
Responsible-Changed-When: Sat Jan 27 11:16:13 PST 2001 
Responsible-Changed-Why:  
Would like feedback from Mr Sysinstall ;) 


http://www.freebsd.org/cgi/query-pr.cgi?pr=23064 
State-Changed-From-To: open->closed 
State-Changed-By: wilko 
State-Changed-When: Fri Jun 15 01:37:58 PDT 2001 
State-Changed-Why:  
As we are facing an SRM restriction AND this issue has been 
documented in the FreeBSD docs now there is no point in keeping 
this PR open. 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23064 

From: Kees Jan Koster <kjkoster@kjkoster.org>
To: freebsd-gnats-submit@FreeBSD.org, k.j.koster@kpn.com
Cc:  
Subject: Re: alpha/23064: Alphas do not boot if `a' (/) partition isn't at a 
 lower offset than `b' (swap)
Date: Mon, 18 Jun 2001 21:37:20 +0200

 This is a multi-part message in MIME format.
 --------------34B220A08806D09F83360BA3
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Here is a suggested patch. My little Alpha is currenly busted, so
 I tested on i386 and wrapped #ifdef __alpha__ around it before
 diffing.
 
  Yours,
    Kees Jan
 
 -------------------------------------------------------
  Kees Jan Koster   e-mail: kjkoster "at" kjkoster.org
                    www:       http://www.kjkoster.org/
 -------------------------------------------------------
        File not found. Should I fake it? [Y/N]
 --------------34B220A08806D09F83360BA3
 Content-Type: text/plain; charset=us-ascii;
  name="label.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="label.diff"
 
 --- release/sysinstall/label.c.orig	Mon Jun 18 20:54:02 2001
 +++ release/sysinstall/label.c	Mon Jun 18 21:28:33 2001
 @@ -965,6 +965,27 @@
  		    clear_wins();
  		    break;
  		}
 +
 +#ifdef __alpha__
 +		/*
 +		 * SRM seems to assume that the root partition is the first on
 +		 * the disk and cannot boot otherwise. Warn Alpha users if they
 +		 * are about to shoot themselves in the foot in this way.
 +		 *
 +		 * Since partitions may not start precisely at offset 0 we
 +		 * check for a "close to 0" instead. :-(
 +		 */
 +		if ((flags & CHUNK_IS_ROOT) && (tmp->offset > 1024)) {
 +		    msgConfirm("Your root partition (a) does not seem to be the first\n"
 +			       "partition. SRM can only boot from the first partition,\n"
 +			       "so it is unlikely that your current disk layout will\n"
 +			       "be bootable boot after installation.\n"
 +			       "\n"
 +			       "Please allocate the root partition before allocating\n"
 +			       "any others.\n");
 +		}
 +#endif
 +
  		if (type != PART_SWAP) {
  		    /* This is needed to tell the newfs -u about the size */
  		    tmp->private_data = new_part(p->mountpoint, p->newfs, tmp->size);
 
 --------------34B220A08806D09F83360BA3--
 
State-Changed-From-To: closed->open 
State-Changed-By: wilko 
State-Changed-When: Sun Jul 1 05:32:23 PDT 2001 
State-Changed-Why:  
Newly proposed patch has arrived. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23064 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Fri Jul 13 09:45:28 PDT 2001 
State-Changed-Why:  
it needed to be done 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23064 
>Unformatted:

From a pretty reliable source (Tru64 Engineering) I have learned that SRM 
apparantly only can boot from the very first partition on the disk. I have not
yet found further hard evidence (meaning SRM docs) but I suspect this is 
something we will have to live with as a restriction. "Doctor, it hurts 
when I push here". "Then don't push there".

Wilko

--- 

Sun Jul  1 05:32:17 PDT 2001

Received the following patch from Kees-Jan <kjkoster@kjkoster.org>.
I don't particularly like the 'precisely at offset 0' clause to
be honest. Sysinstall hackers please feel free to comment/commit.

Wilko


Dag Wilko,

Hier heb ik een patchje voor alpha/23064. Heb je even tijd om
ernaar te kijken?

   Kees Jan

-------------------------------------------------------
 Kees Jan Koster   e-mail: kjkoster "at" kjkoster.org
                   www:       http://www.kjkoster.org/
-------------------------------------------------------
       File not found. Should I fake it? [Y/N]
[-- Attachment #2: label.diff --]
[-- Type: text/plain, Encoding: 7bit, Size: 1.1K --]

--- release/sysinstall/label.c.orig     Mon Jun 18 20:54:02 2001
+++ release/sysinstall/label.c  Mon Jun 18 21:28:33 2001
@@ -965,6 +965,27 @@
                    clear_wins();
                    break;
                }
+
+#ifdef __alpha__
+               /*
+                * SRM seems to assume that the root partition is the first on
+                * the disk and cannot boot otherwise. Warn Alpha users if they
+                * are about to shoot themselves in the foot in this way.
+                *
+                * Since partitions may not start precisely at offset 0 we
+                * check for a "close to 0" instead. :-(
+                */
+               if ((flags & CHUNK_IS_ROOT) && (tmp->offset > 1024)) {
+                   msgConfirm("Your root partition (a) does not seem to be the
+first\n"
+                              "partition. SRM can only boot from the first
+partition,\n"
+                              "so it is unlikely that your current disk layout
+will\n"
+                              "be bootable boot after installation.\n"
+                              "\n"
+                              "Please allocate the root partition before
+allocating\n"
+                              "any others.\n");
+               }
+#endif
+
                if (type != PART_SWAP) {
                    /* This is needed to tell the newfs -u about the size */
                    tmp->private_data = new_part(p->mountpoint, p->newfs,
+tmp->size);


