From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 3 11:06:54 2009 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95A76106567A for ; Mon, 3 Aug 2009 11:06:54 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8213E8FC08 for ; Mon, 3 Aug 2009 11:06:54 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n73B6sxJ088551 for ; Mon, 3 Aug 2009 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n73B6re6088547 for freebsd-embedded@FreeBSD.org; Mon, 3 Aug 2009 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 3 Aug 2009 11:06:53 GMT Message-Id: <200908031106.n73B6re6088547@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 11:06:55 -0000 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. From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 7 15:10:10 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224A210656E9 for ; Fri, 7 Aug 2009 15:10:10 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vw0-f180.google.com (mail-vw0-f180.google.com [209.85.212.180]) by mx1.freebsd.org (Postfix) with ESMTP id CD5648FC1D for ; Fri, 7 Aug 2009 15:10:09 +0000 (UTC) Received: by vws10 with SMTP id 10so1728288vws.7 for ; Fri, 07 Aug 2009 08:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=YMc6sw7dEnVzBRm9xfb7hBWCkSOqLLnj48RR2Cev2qk=; b=DbMpFipIZQO+mVqmpTIDxnfoT+rB+WCuBnfUPKPdBl33TXPuw3SH9FKN9OwESS8wjj s3F5dtxIM1Q+R3wAVt2MwFEVTxFSPwveieS6Ia655ToI3UM28tS4soJ1o/gwHu2GFihh 3KDrr+k9J+74zLQHK7lFw62YtnJUaBD18HgTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; b=pGa/EnZgwj/uhCiqPWulM1jGuVkKmjGWkpQW9A/9/RdjKvlSesTCy3SiMPXCGjdrLM oUU5Zft7EVE1PqENQPjSqW2tVESzPhWHNisQooNIaYJFwjjpqjvmnT4qWgRO4sLOnDhE /Jc6/tANyVMCH4L/gLL8nwAKu1r+vkSA+XfQQ= MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.220.98.20 with SMTP id o20mr913866vcn.92.1249657809120; Fri, 07 Aug 2009 08:10:09 -0700 (PDT) From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Fri, 7 Aug 2009 17:09:49 +0200 X-Google-Sender-Auth: 7ec7c76fe511bce1 Message-ID: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com> To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [NanoBSD] Can't use boot0cfg for changing the booting slice X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 15:10:10 -0000 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@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) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 465822 (227 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 465948, size 465822 (227 Meg), flag 0 beg: cyl 29/ head 1/ sector 1; end: cyl 57/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 931770, size 16065 (7 Meg), flag 0 beg: cyl 58/ head 0/ sector 1; end: cyl 58/ head 254/ sector 63 The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 947835, size 16065 (7 Meg), flag 0 beg: cyl 59/ head 0/ sector 1; end: cyl 59/ head 254/ sector 63 [root@router]~#sysctl kern.geom.debugflags=16 kern.geom.debugflags: 0 -> 16 [root@router]~#boot0cfg -s 2 -v /dev/ad0 # flag start chs type end chs offset size 1 0x80 0: 1: 1 0xa5 28:254:63 63 465822 2 0x00 29: 1: 1 0xa5 57:254:63 465948 465822 3 0x00 58: 0: 1 0xa5 58:254:63 931770 16065 4 0x00 59: 0: 1 0xa5 59:254:63 947835 16065 version=1.0 drive=0x80 mask=0x3 ticks=182 bell=# (0x23) options=packet,update,nosetdrv default_selection=F2 (Slice 2) [root@router]~#sysctl kern.geom.debugflags=0 kern.geom.debugflags: 16 -> 0 [root@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) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 465822 (227 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 465948, size 465822 (227 Meg), flag 0 beg: cyl 29/ head 1/ sector 1; end: cyl 57/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 931770, size 16065 (7 Meg), flag 0 beg: cyl 58/ head 0/ sector 1; end: cyl 58/ head 254/ sector 63 The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 947835, size 16065 (7 Meg), flag 0 beg: cyl 59/ head 0/ sector 1; end: cyl 59/ head 254/ sector 63 Thanks, Olivier From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 7 16:32:11 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFF151065670 for ; Fri, 7 Aug 2009 16:32:11 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (ns2.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id A9D2C8FC20 for ; Fri, 7 Aug 2009 16:32:11 +0000 (UTC) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id n77Fa9gJ062047; Fri, 7 Aug 2009 09:36:09 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.3/8.14.3) with ESMTP id n77Fa7Ui013052; Fri, 7 Aug 2009 09:36:07 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.3/8.14.3/Submit) id n77Fa7PU013046; Fri, 7 Aug 2009 09:36:07 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <19068.18919.843159.936827@gromit.timing.com> Date: Fri, 7 Aug 2009 09:36:07 -0600 From: John Hein To: Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= In-Reply-To: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com> References: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com> X-Mailer: VM 8.0.12 under 22.3.1 (i386-portbld-freebsd7.1) X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on Daffy.timing.com X-Virus-Status: Clean Cc: freebsd-embedded@freebsd.org Subject: Re: [NanoBSD] Can't use boot0cfg for changing the booting slice X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 16:32:12 -0000 Olivier Cochard-Labb=E9 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 sli= ce 2. >=20 > Then I use boot0cfg like that: >=20 > sysctl kern.geom.debugflags=3D16 > boot0cfg -s 2 -v /dev/ad0 > sysctl kern.geom.debugflags=3D0 >=20 > But, after the reboot my system still reboot from the slice 1 (but t= he > boot loader show correctly that the default choice is now the 2)! > Where is my problem =3F Are you sure you're booting from slice 1=3F Is fstab on slice 2 pointing to slice 1=3F From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 7 16:47:48 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1EC3106564A for ; Fri, 7 Aug 2009 16:47:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8EE0A8FC19 for ; Fri, 7 Aug 2009 16:47:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n77GhOYT013495; Fri, 7 Aug 2009 10:43:24 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 07 Aug 2009 10:44:14 -0600 (MDT) Message-Id: <20090807.104414.221852486.imp@bsdimp.com> To: jhein@timing.com From: "M. Warner Losh" In-Reply-To: <19068.18919.843159.936827@gromit.timing.com> References: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com> <19068.18919.843159.936827@gromit.timing.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: [NanoBSD] Can't use boot0cfg for changing the booting slice X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 16:47:49 -0000 In message: <19068.18919.843159.936827@gromit.timing.com> John Hein writes: : Olivier Cochard-Labb=E9 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 s= lice 2. : > = : > Then I use boot0cfg like that: : > = : > sysctl kern.geom.debugflags=3D16 : > boot0cfg -s 2 -v /dev/ad0 : > sysctl kern.geom.debugflags=3D0 : > = : > 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 From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 7 20:58:26 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D90A106568C for ; Fri, 7 Aug 2009 20:58:26 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id A84C88FC23 for ; Fri, 7 Aug 2009 20:58:25 +0000 (UTC) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id n77KwHxB084027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Aug 2009 22:58:22 +0200 (CEST) (envelope-from fb-embedded@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id n77KwH4v084026; Fri, 7 Aug 2009 22:58:17 +0200 (CEST) (envelope-from fb-embedded@psconsult.nl) Date: Fri, 7 Aug 2009 22:58:17 +0200 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Message-ID: <20090807205817.GA82868@psconsult.nl> Mail-Followup-To: freebsd-embedded@freebsd.org, freebsd-current@freebsd.org References: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com> <19068.18919.843159.936827@gromit.timing.com> <20090807.104414.221852486.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090807.104414.221852486.imp@bsdimp.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-current@freebsd.org Subject: Re: [NanoBSD] Can't use boot0cfg for changing the booting slice X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 20:58:26 -0000 On Fri, Aug 07, 2009 at 10:44:14AM -0600, M. Warner Losh wrote: > In message: <19068.18919.843159.936827@gromit.timing.com> > John Hein 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] Pre-7.2 world: boot0cfg changes the default slice to boot from by altering block0 byte at offset 0x1b9. Allowed values are 0-3 to boot from slice 1 thru 4 or 4 to boot from the next drive. Boot0 ignores the active flag in the MBR and only looks at the byte described above. 7.2-and-up world: boot0cfg still changes the same byte at 0x1b9 in block0 but boot0 seems to completely ignore this byte and boots from the slice marked active in the MBR. NanoBSD relies on the working of boot0cfg when upgrading, since 7.2 this just does not work any more. It seems that the original implementation of boot0 introduced the new way of storing the default slice to boot from to allow for other defaults than just slice 1 thru 4 which the active flag(s) in MBR allow. My personal opinion is that boot0 should either look at the byte at 0x1b9 or at the active flags. Since the active flags can only specify a default of 1 thru 4 and the design of MBR and the active flags is broken by design [1] I'd *really* like to see boot0 revert to the pre-7.2 behaviour. Hope this gets fixed before 8.0 comes out, leaving it the way it is renders boot0cfg and NanoBSD (which relies on boot0cfg) crippled and too difficult to use for all users not intimately acquainted with the way boot0cfg, the MBR record and boot0 interact. Unfortunately I'm not enough x86 assembly literate to understand the diffs between boot0.s in 7.1 and 7.2 to be able to produce a useful patch. [1] I have had installs of 8.0 snapshots that left MBR with more than one MBR slice marked active, BIOS subsequently completely rejected the disk and the only remedy was to manually fdisk -a from fixit mode using a live CD/DVD. This has happened with several recent Intel desktop boards like DG965RY and DP35DP. > Warner Regards, Paul Schenkeveld