From nobody@FreeBSD.org  Sat Oct  6 21:41:54 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4E716106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Oct 2012 21:41:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F3A08FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Oct 2012 21:41:54 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q96LfrW3080863
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 6 Oct 2012 21:41:53 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q96Lfr2K080862;
	Sat, 6 Oct 2012 21:41:53 GMT
	(envelope-from nobody)
Message-Id: <201210062141.q96Lfr2K080862@red.freebsd.org>
Date: Sat, 6 Oct 2012 21:41:53 GMT
From: Zbigniew <zbigniew2011@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Boot "loader" should accept additional parameters
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172413
>Category:       kern
>Synopsis:       Boot "loader" should accept additional parameters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ae
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 06 21:50:02 UTC 2012
>Closed-Date:    Mon Nov 19 13:07:13 UTC 2012
>Last-Modified:  Mon Nov 19 13:07:13 UTC 2012
>Originator:     Zbigniew
>Release:        9.0
>Organization:
>Environment:
FreeBSD Trurl 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Wed Oct  3 17:39:02 CEST 2012 root@Trurl:/usr/src/sys/i386/compile/GENERIC  i386
>Description:
 Installed recently FreeBSD 9.0 - and I've got a problem: while booting, "loader" somehow gets incorrect currdevice value, stopping boot process. It does get "disk1s6a", but it should be "disk1s7a" ("lsdev" reports such number). I can boot system, when I set currdev "manually", then type "boot". Of course, loader won't read its config files, when not having access to root directory.
  Having multiple OS-es on HDD, I'm using GRUB for booting. My FreeBSD section looks like:

 root (hd0,5,a)
 kernel /boot/loader

 No, I can't change "root partition" - the solution would be to allow to pass the boot parameters to loader, like this:

 kernel /boot/loader currdev=disk1s7a

 I mean: each variable, that can be later examined by "show", should be possible to be changed in such GRUBs command-line, by passing sequence of such parameters, separated by spaces. Such ability is present since years in Linux - no problem there with passing boot parameters - why not in FreeBSD?

 BTW: I would to mention here, that at least two essential utilities - I mean boot0cfg and dumpon - (but maybe more of them) have "artifically" imposed a limit to handle at most fourth partition. It's an obvious nonsense, since I've got by now FreeBSD installed - and working - on "logical partition" 6 created inside "physical partition" 4. Why the most essential tools are ignoring the fact, that nowadays we're able to have - say - 20 partitions, not just four?

 The man page for dumpon is signed "12 may 1995", which suggests to me, that this utility has been left untouched since that time. Maybe 17 years ago keeping the limit "four partitions" was reasonable, but today HDDs of terabyte capacity aren't anything extraordinary. Time, and the work conditions, have changed - therefore such changes should be reflected in such basic tools, needed for proper disk partitioning and setting the boot process.

 I would to add, that on the very same partition I had a few days ago NetBSD installation, which had no problem with the partition number whatsoever. I've replaced Net- with FreeBSD, and since the very start such strange problems "we don't like your partitions schema". Almost twenty years later it's still not possible to install FreeBSD onto chosen partition the straight way, and then to run the system without additional "adventures". Being very essential thing, this really needs a fix!
>How-To-Repeat:
Just by booting FreeBSD from some "unusul" partition (the one with "high" number)
>Fix:


>Release-Note:
>Audit-Trail:

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Zbigniew <zbigniew2011@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/172413: Boot "loader" should accept additional parameters
Date: Sun, 07 Oct 2012 16:18:49 +0400

 On 07.10.2012 01:41, Zbigniew wrote:
 > Installed recently FreeBSD 9.0 - and I've got a problem: while
 > booting, "loader" somehow gets incorrect currdevice value, stopping
 > boot process. It does get "disk1s6a", but it should be "disk1s7a"
 > ("lsdev" reports such number). I can boot system, when I set currdev
 > "manually", then type "boot". Of course, loader won't read its config
 > files, when not having access to root directory. Having multiple
 > OS-es on HDD, I'm using GRUB for booting. My FreeBSD section looks
 > like:
 
 Hi,
 
 it seems your problem is similar to one described in the
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=158358
 
 Can you try the loader(8) binary from the FreeBSD 10.0-CURRENT?
 You can get it from a snapshot:
 	https://pub.allbsd.org/FreeBSD-snapshots/
 
 -- 
 WBR, Andrey V. Elsukov

From: Zbigniew <zbigniew2011@gmail.com>
To: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: misc/172413: Boot "loader" should accept additional parameters
Date: Sun, 7 Oct 2012 12:57:53 +0000

 2012/10/7, Andrey V. Elsukov <bu7cher@yandex.ru>:
 
 > it seems your problem is similar to one described in the
 > 	http://www.freebsd.org/cgi/query-pr.cgi?pr=158358
 >
 > Can you try the loader(8) binary from the FreeBSD 10.0-CURRENT?
 > You can get it from a snapshot:
 > 	https://pub.allbsd.org/FreeBSD-snapshots/
 
 Thanks, it seems so! Downloaded the binary package base.txz from
 https://pub.allbsd.org/FreeBSD-snapshots/i386-i386/10.0-HEAD-20121006-JPSNAP/ftp/base.txz
 - then extracted "loader", replaced with it the former one, and yes -
 the system can be booted quite normally, I can see the logo/menu etc.
 
 Nevertheless I suppose, that ability to add boot-time parameters would
 be helpful as "workaround" in such cases.
 -- 
 regards,
 Zbigniew
Responsible-Changed-From-To: freebsd-bugs->ae 
Responsible-Changed-By: ae 
Responsible-Changed-When: Wed Oct 17 15:30:39 UTC 2012 
Responsible-Changed-Why:  
Take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172413 
State-Changed-From-To: open->closed 
State-Changed-By: ae 
State-Changed-When: Mon Nov 19 11:11:53 UTC 2012 
State-Changed-Why:  
Fixed in head/ and the fix merged to stable/9 with r243243. 
Thanks! 

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