FreeBSD bugmaster | 3 Aug 13:06 2009
Picon

freebsd-embedded@...

Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o misc/136889  embedded   [nanobsd] [path] nanobsd error reporting and other ref
o misc/135588  embedded   [nanobsd] simple patch for adding amd64 support
o misc/52256   embedded   [picobsd] picobsd build script does not read in user/s
o kern/42728   embedded   [picobsd] many problems in src/usr.sbin/ppp/*  after c

4 problems total.

Olivier Cochard-Labbé | 7 Aug 17:09 2009

[NanoBSD] Can't use boot0cfg for changing the booting slice

Hi,

I meet a problem under FreeBSD 7.2 and 8.0-current (nanoBSD) using
boot0cfg: I can't use boot0cfg for changing the booting slice.
Here is my problem:
I'm using the FreeBSD Boot manager on a system with MBR partitions.
The active slice is the partition 1, but I want to boot from the slice 2.

Then I use boot0cfg like that:

sysctl kern.geom.debugflags=16
boot0cfg -s 2 -v /dev/ad0
sysctl kern.geom.debugflags=0

But, after the reboot my system still reboot from the slice 1 (but the
boot loader show correctly that the default choice is now the 2)!
Where is my problem ?

The "active" flag of the slice is not modified after using boot0cfg, is normal ?

Here is the full log:

[root <at> router]~#fdisk /dev/ad0
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=968 heads=16 sectors/track=63 (1008 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=968 heads=16 sectors/track=63 (1008 blks/cyl)

(Continue reading)

John Hein | 7 Aug 17:36 2009
Picon

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

Olivier Cochard-Labbé wrote at 17:09 +0200 on Aug  7, 2009:
 > I meet a problem under FreeBSD 7.2 and 8.0-current (nanoBSD) using
 > boot0cfg: I can't use boot0cfg for changing the booting slice.
 > Here is my problem:
 > I'm using the FreeBSD Boot manager on a system with MBR partitions.
 > The active slice is the partition 1, but I want to boot from the slice 2.
 > 
 > Then I use boot0cfg like that:
 > 
 > sysctl kern.geom.debugflags=16
 > boot0cfg -s 2 -v /dev/ad0
 > sysctl kern.geom.debugflags=0
 > 
 > But, after the reboot my system still reboot from the slice 1 (but the
 > boot loader show correctly that the default choice is now the 2)!
 > Where is my problem ?

Are you sure you're booting from slice 1?
Is fstab on slice 2 pointing to slice 1?
M. Warner Losh | 7 Aug 18:44 2009

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

In message: <19068.18919.843159.936827@...>
            John Hein <jhein@...> writes:
: Olivier Cochard-Labbé wrote at 17:09 +0200 on Aug  7, 2009:
:  > I meet a problem under FreeBSD 7.2 and 8.0-current (nanoBSD) using
:  > boot0cfg: I can't use boot0cfg for changing the booting slice.
:  > Here is my problem:
:  > I'm using the FreeBSD Boot manager on a system with MBR partitions.
:  > The active slice is the partition 1, but I want to boot from the slice 2.
:  > 
:  > Then I use boot0cfg like that:
:  > 
:  > sysctl kern.geom.debugflags=16
:  > boot0cfg -s 2 -v /dev/ad0
:  > sysctl kern.geom.debugflags=0
:  > 
:  > But, after the reboot my system still reboot from the slice 1 (but the
:  > boot loader show correctly that the default choice is now the 2)!
:  > Where is my problem ?
: 
: Are you sure you're booting from slice 1?
: Is fstab on slice 2 pointing to slice 1?

Also, boot0cfg won't mark the slice as ACTIVE, just remember that was
the last slice you booted from...  To mark it active, you must use
fdisk.  If by 'active' you mean 'what mount reports root as' then I
think John's suggestion is right on the money...

Warner
Paul Schenkeveld | 7 Aug 22:58 2009
Picon

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

On Fri, Aug 07, 2009 at 10:44:14AM -0600, M. Warner Losh wrote:
> In message: <19068.18919.843159.936827@...>
>             John Hein <jhein@...> writes:
> : Olivier Cochard-Labbé wrote at 17:09 +0200 on Aug  7, 2009:
> :  > I meet a problem under FreeBSD 7.2 and 8.0-current (nanoBSD) using
> :  > boot0cfg: I can't use boot0cfg for changing the booting slice.
> :  > Here is my problem:
> :  > I'm using the FreeBSD Boot manager on a system with MBR partitions.
> :  > The active slice is the partition 1, but I want to boot from the slice 2.
> :  > 
> :  > Then I use boot0cfg like that:
> :  > 
> :  > sysctl kern.geom.debugflags=16
> :  > boot0cfg -s 2 -v /dev/ad0
> :  > sysctl kern.geom.debugflags=0
> :  > 
> :  > But, after the reboot my system still reboot from the slice 1 (but the
> :  > boot loader show correctly that the default choice is now the 2)!
> :  > Where is my problem ?
> : 
> : Are you sure you're booting from slice 1?
> : Is fstab on slice 2 pointing to slice 1?
> 
> Also, boot0cfg won't mark the slice as ACTIVE, just remember that was
> the last slice you booted from...  To mark it active, you must use
> fdisk.  If by 'active' you mean 'what mount reports root as' then I
> think John's suggestion is right on the money...

[I cc'ed freebsd-current as I feel this is a regression that really needs
 fixing before 8.0 comes out]
(Continue reading)

FreeBSD bugmaster | 10 Aug 13:06 2009
Picon

freebsd-embedded@...

Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o misc/136889  embedded   [nanobsd] [path] nanobsd error reporting and other ref
o misc/135588  embedded   [nanobsd] simple patch for adding amd64 support
o misc/52256   embedded   [picobsd] picobsd build script does not read in user/s
o kern/42728   embedded   [picobsd] many problems in src/usr.sbin/ppp/*  after c

4 problems total.

Nick Hibma | 11 Aug 14:49 2009

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

> > :  > But, after the reboot my system still reboot from the slice 1 (but
> > :  > the boot loader show correctly that the default choice is now the
> > :  > 2)! Where is my problem ?
> > :
> > : Are you sure you're booting from slice 1?
> > : Is fstab on slice 2 pointing to slice 1?
> >
> > Also, boot0cfg won't mark the slice as ACTIVE, just remember that was
> > the last slice you booted from...  To mark it active, you must use
> > fdisk.  If by 'active' you mean 'what mount reports root as' then I
> > think John's suggestion is right on the money...

Perhaps you could change the line in the update script from

	boot0cfg -s $oslice $NANO_DRIVE

to

	boot0cfg -s $oslice $NANO_DRIVE
	echo "a $oslice" | fdisk -f /dev/stdin $NANO_DRIVE

That's taken from our own version of the update script, but should fit in 
the NanoBSD update script.

Nick

Paul Schenkeveld | 11 Aug 17:58 2009
Picon

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

On Tue, Aug 11, 2009 at 02:49:51PM +0200, Nick Hibma wrote:
> > > :  > But, after the reboot my system still reboot from the slice 1 (but
> > > :  > the boot loader show correctly that the default choice is now the
> > > :  > 2)! Where is my problem ?
> > > :
> > > : Are you sure you're booting from slice 1?
> > > : Is fstab on slice 2 pointing to slice 1?
> > >
> > > Also, boot0cfg won't mark the slice as ACTIVE, just remember that was
> > > the last slice you booted from...  To mark it active, you must use
> > > fdisk.  If by 'active' you mean 'what mount reports root as' then I
> > > think John's suggestion is right on the money...
> 
> Perhaps you could change the line in the update script from
> 
> 	boot0cfg -s $oslice $NANO_DRIVE
> 
> to
> 
> 	boot0cfg -s $oslice $NANO_DRIVE
> 	echo "a $oslice" | fdisk -f /dev/stdin $NANO_DRIVE

boot0cfg -s $oslice $NANO_DRIVE
fdisk -f - << !
a $NANO_DRIVE
!

is even cheaper 8->

> That's taken from our own version of the update script, but should fit in 
(Continue reading)

Alexey Shuvaev | 11 Aug 18:41 2009
Picon

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

On Tue, Aug 11, 2009 at 05:58:51PM +0200, Paul Schenkeveld wrote:
> On Tue, Aug 11, 2009 at 02:49:51PM +0200, Nick Hibma wrote:
> > > > :  > But, after the reboot my system still reboot from the slice 1 (but
> > > > :  > the boot loader show correctly that the default choice is now the
> > > > :  > 2)! Where is my problem ?
> > > > :
> > > > : Are you sure you're booting from slice 1?
> > > > : Is fstab on slice 2 pointing to slice 1?
> > > >
> > > > Also, boot0cfg won't mark the slice as ACTIVE, just remember that was
> > > > the last slice you booted from...  To mark it active, you must use
> > > > fdisk.  If by 'active' you mean 'what mount reports root as' then I
> > > > think John's suggestion is right on the money...
> > 
> > Perhaps you could change the line in the update script from
> > 
> > 	boot0cfg -s $oslice $NANO_DRIVE
> > 
> > to
> > 
> > 	boot0cfg -s $oslice $NANO_DRIVE
> > 	echo "a $oslice" | fdisk -f /dev/stdin $NANO_DRIVE
> 
> boot0cfg -s $oslice $NANO_DRIVE
> fdisk -f - << !
> a $NANO_DRIVE
> !
> 
> is even cheaper 8->
> 
(Continue reading)

Michael Reifenberger | 11 Aug 23:26 2009

Re: [NanoBSD] Can't use boot0cfg for changing the booting slice

On Tue, 11 Aug 2009, Nick Hibma wrote:
...
> to
>
> 	boot0cfg -s $oslice $NANO_DRIVE
> 	echo "a $oslice" | fdisk -f /dev/stdin $NANO_DRIVE
>

Why not:
 	gpart set -a active -i 1 ${NANO_DRIVE}

Bye/2
---
Michael Reifenberger
Michael <at> Reifenberger.com
http://www.Reifenberger.com

_______________________________________________
freebsd-current <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe <at> freebsd.org"


Gmane