From info at rickvanderzwet.nl Sun May 3 12:20:25 2009 From: info at rickvanderzwet.nl (Rick van der Zwet) Date: Sun May 3 12:20:32 2009 Subject: nanobsd image boot issues In-Reply-To: <20090423.162427.-1543901316.imp@bsdimp.com> References: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> <20090423.162427.-1543901316.imp@bsdimp.com> Message-ID: <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> 2009/4/24 M. Warner Losh : > In message: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> > Rick van der Zwet writes: > : Boot delay and fail issues on various hardware using nanobsd generated > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example while > : trying to run a image on a soekris net4521 (bios 1.33) it seems to > : take ages (up to a minute) to start booting. Same image supplied to a > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems > : trying to find a boot loader. The net4801 even bails out after a > : while. Output of fdisk of image list as follows: [snip: fdisk outputs] > Have you enabled packet mode for boot in boot0 with boot0cfg? I did. The problems turned out to be something completely different. Starting from soekris bios version 1.31 and upwards boot0sio does not work anymore, freezing forever while trying to boot initially e.g. not showing the following output: F1 FreeBSD F2 FreeBSD Default: F1 I generated my images like this: $ fdisk -i -f _.fdisk da0 $ boot0cfg -B -b /boot/boot0sio -o packet -s 1 -m 3 da0 $ bsdlabel -w -B -b /boot/boot da0s1 $ bsdlabel -w -B -b /boot/boot da0s2 $ newfs /dev/da0s1a $ newfs /dev/da0s2a $ newfs /dev/da0s3 $ cat _.fdisk # 1000944 2 63 16 0 8192 0 g c993 h16 s63 p 1 165 63 495873 p 2 165 495999 495873 p 3 165 991872 9072 When using /boot/boot0 instead of /boot/boot0sio all seems to work perfectly fine on all Soekris boards I could test it on (net4521, net4801, net5501). Next comes the interesting question when I use the some CF card in PC is does _not_ work. I did get the output on the screen, but when trying to press F1 or F2 or CR. All I got was a beep and no progress forward, but just remain in the same section. Default behavior or something off? /Rick (reply-to-all button is sometimes hard to find) -- http://rickvanderzwet.nl From jhein at timing.com Mon May 4 03:47:36 2009 From: jhein at timing.com (John Hein) Date: Mon May 4 03:47:42 2009 Subject: nanobsd image boot issues In-Reply-To: <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> References: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> <20090423.162427.-1543901316.imp@bsdimp.com> <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> Message-ID: <18942.21245.958712.837180@gromit.timing.com> Rick van der Zwet wrote at 14:20 +0200 on May 3, 2009: > 2009/4/24 M. Warner Losh : > > In message: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> > > Rick van der Zwet writes: > > : Boot delay and fail issues on various hardware using nanobsd generated > > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example while > > : trying to run a image on a soekris net4521 (bios 1.33) it seems to > > : take ages (up to a minute) to start booting. Same image supplied to a > > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not > > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems > > : trying to find a boot loader. The net4801 even bails out after a > > : while. Output of fdisk of image list as follows: > [snip: fdisk outputs] > > > Have you enabled packet mode for boot in boot0 with boot0cfg? > > I did. The problems turned out to be something completely different. > Starting from soekris bios version 1.31 and upwards boot0sio does not > work anymore, freezing forever while trying to boot initially e.g. not > showing the following output: > F1 FreeBSD > F2 FreeBSD > > Default: F1 > > I generated my images like this: > $ fdisk -i -f _.fdisk da0 > $ boot0cfg -B -b /boot/boot0sio -o packet -s 1 -m 3 da0 > $ bsdlabel -w -B -b /boot/boot da0s1 > $ bsdlabel -w -B -b /boot/boot da0s2 > $ newfs /dev/da0s1a > $ newfs /dev/da0s2a > $ newfs /dev/da0s3 > $ cat _.fdisk > # 1000944 2 63 16 0 8192 0 > g c993 h16 s63 > p 1 165 63 495873 > p 2 165 495999 495873 > p 3 165 991872 9072 > > When using /boot/boot0 instead of /boot/boot0sio all seems to work > perfectly fine on all Soekris boards I could test it on (net4521, > net4801, net5501). > > Next comes the interesting question when I use the some CF card in PC > is does _not_ work. I did get the output on the screen, but when > trying to press F1 or F2 or CR. All I got was a beep and no progress > forward, but just remain in the same section. Default behavior or > something off? Note that 7.1 (which is what I seem to recall you're using) changed the boot loader to use real mode (see sys/boot/i386/btx). You could try using boot blocks from 7.0 (or 6.3) to see if it makes a difference.. From bugmaster at FreeBSD.org Mon May 4 11:07:45 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 4 11:08:16 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200905041107.n44B7h5U098487@freefall.freebsd.org> 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 kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub 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 o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From jhb at freebsd.org Mon May 4 19:22:18 2009 From: jhb at freebsd.org (John Baldwin) Date: Mon May 4 19:22:34 2009 Subject: nanobsd image boot issues In-Reply-To: <18942.21245.958712.837180@gromit.timing.com> References: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> <18942.21245.958712.837180@gromit.timing.com> Message-ID: <200905040955.44391.jhb@freebsd.org> On Sunday 03 May 2009 10:29:17 pm John Hein wrote: > Rick van der Zwet wrote at 14:20 +0200 on May 3, 2009: > > 2009/4/24 M. Warner Losh : > > > In message: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> > > > Rick van der Zwet writes: > > > : Boot delay and fail issues on various hardware using nanobsd generated > > > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example while > > > : trying to run a image on a soekris net4521 (bios 1.33) it seems to > > > : take ages (up to a minute) to start booting. Same image supplied to a > > > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not > > > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems > > > : trying to find a boot loader. The net4801 even bails out after a > > > : while. Output of fdisk of image list as follows: > > [snip: fdisk outputs] > > > > > Have you enabled packet mode for boot in boot0 with boot0cfg? > > > > I did. The problems turned out to be something completely different. > > Starting from soekris bios version 1.31 and upwards boot0sio does not > > work anymore, freezing forever while trying to boot initially e.g. not > > showing the following output: > > F1 FreeBSD > > F2 FreeBSD > > > > Default: F1 > > > > I generated my images like this: > > $ fdisk -i -f _.fdisk da0 > > $ boot0cfg -B -b /boot/boot0sio -o packet -s 1 -m 3 da0 > > $ bsdlabel -w -B -b /boot/boot da0s1 > > $ bsdlabel -w -B -b /boot/boot da0s2 > > $ newfs /dev/da0s1a > > $ newfs /dev/da0s2a > > $ newfs /dev/da0s3 > > $ cat _.fdisk > > # 1000944 2 63 16 0 8192 0 > > g c993 h16 s63 > > p 1 165 63 495873 > > p 2 165 495999 495873 > > p 3 165 991872 9072 > > > > When using /boot/boot0 instead of /boot/boot0sio all seems to work > > perfectly fine on all Soekris boards I could test it on (net4521, > > net4801, net5501). > > > > Next comes the interesting question when I use the some CF card in PC > > is does _not_ work. I did get the output on the screen, but when > > trying to press F1 or F2 or CR. All I got was a beep and no progress > > forward, but just remain in the same section. Default behavior or > > something off? > > Note that 7.1 (which is what I seem to recall you're using) > changed the boot loader to use real mode (see sys/boot/i386/btx). > > You could try using boot blocks from 7.0 (or 6.3) to see > if it makes a difference.. boot0 doesn't use BTX so those changes should not affect that. Luigi (luigi@) did make some changes to boot0, however, and you may want to ask him about this. -- John Baldwin From fb-embedded at psconsult.nl Tue May 5 08:14:28 2009 From: fb-embedded at psconsult.nl (Paul Schenkeveld) Date: Tue May 5 08:14:35 2009 Subject: nanobsd image boot issues In-Reply-To: <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> References: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> <20090423.162427.-1543901316.imp@bsdimp.com> <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> Message-ID: <20090505081420.GA72340@psconsult.nl> Hello, On Sun, May 03, 2009 at 02:20:18PM +0200, Rick van der Zwet wrote: > 2009/4/24 M. Warner Losh : > > In message: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> > > Rick van der Zwet writes: > > : Boot delay and fail issues on various hardware using nanobsd generated > > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example while > > : trying to run a image on a soekris net4521 (bios 1.33) it seems to > > : take ages (up to a minute) to start booting. Same image supplied to a > > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not > > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems > > : trying to find a boot loader. The net4801 even bails out after a > > : while. Output of fdisk of image list as follows: > [snip: fdisk outputs] > > > Have you enabled packet mode for boot in boot0 with boot0cfg? > > I did. The problems turned out to be something completely different. > Starting from soekris bios version 1.31 and upwards boot0sio does not > work anymore, freezing forever while trying to boot initially e.g. not > showing the following output: > F1 FreeBSD > F2 FreeBSD > > Default: F1 Yesterday I did a complete nanobsd build from scratch, sources checked out with RELENG_7_1 tag (gave me 7.1p5) and with the default boot loader (boot0sio), packet mode is on. The resulting _.disk.full was put on a Kingston CF/256 compact flash and put in a Soekris net4801-50 with bios 1.33. No problem at all. Haven't tried with net4521 yet, can try upgrade of my net4521 WiFi AP soon if time permits. Output of a boot (truncated): | POST: 012345689bcefghipsajklnopqr,,,tvwxy | | | | | | | | | comBIOS ver. 1.33 20080103 Copyright (C) 2000-2007 Soekris Engineering. | | net4801 | | 0128 Mbyte Memory CPU Geode SC1100 267 Mhz | | Pri Mas Hitachi XX.V.3.4.0.0 LBA 695-15-48 250 Mbyte | | Slot Vend Dev ClassRev Cmd Stat CL LT HT Base1 Base2 Int | ------------------------------------------------------------------- | 0:00:0 1078 0001 06000000 0107 0280 00 00 00 00000000 00000000 | 0:06:0 100B 0020 02000000 0107 0290 00 3F 00 0000E101 A0000000 10 | 0:07:0 100B 0020 02000000 0107 0290 00 3F 00 0000E201 A0001000 10 | 0:08:0 100B 0020 02000000 0107 0290 00 3F 00 0000E301 A0002000 10 | 0:10:0 104C AC23 06040002 0107 0210 08 3F 01 00000000 00000000 | 0:18:2 100B 0502 01018001 0005 0280 00 00 00 00000000 00000000 | 0:19:0 0E11 A0F8 0C031008 0117 0280 08 38 00 A0003000 00000000 11 | 1:00:0 100B 0020 02000000 0107 0290 00 3F 00 0000D001 A4000000 05 | 1:01:0 100B 0020 02000000 0107 0290 00 3F 00 0000D101 A4001000 11 | | 1 Seconds to automatic boot. Press Ctrl-P for entering Monitor. | | 1 FreeBSD | 2 FreeBSD | | Default: 1 | /boot.config: -h | Consoles: serial port | BIOS drive C: is disk0 | BIOS 639kB/130048kB available memory | | FreeBSD/i386 bootstrap loader, Revision 1.1 | (xxxx@xxxxxx.xxxxxxxxx.xx, Mon May 4 12:11:37 CEST 2009) | Loading /boot/defaults/loader.conf | /boot/kernel/kernel text=0x2be700 data=0x2f200+0x1b32c syms=[0x4+0x3af80+0x4+0x4c39b] | \ | Hit [Enter] to boot immediately, or any other key for command prompt. | Booting [/boot/kernel/kernel]... | Copyright (c) 1992-2009 The FreeBSD Project. | Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 | The Regents of the University of California. All rights reserved. | FreeBSD is a registered trademark of The FreeBSD Foundation. | FreeBSD 7.1-RELEASE-p5 #1: Mon May 4 14:05:05 CEST 2009 | xxxx@xxxxxx.xxxxxxxxx.xx:/usr/obj/usr/src/sys/XXXX | Timecounter "i8254" frequency 1193182 Hz quality 0 Total boot takes ~ 1 min. > I generated my images like this: > $ fdisk -i -f _.fdisk da0 > $ boot0cfg -B -b /boot/boot0sio -o packet -s 1 -m 3 da0 > $ bsdlabel -w -B -b /boot/boot da0s1 > $ bsdlabel -w -B -b /boot/boot da0s2 > $ newfs /dev/da0s1a > $ newfs /dev/da0s2a > $ newfs /dev/da0s3 > $ cat _.fdisk > # 1000944 2 63 16 0 8192 0 > g c993 h16 s63 > p 1 165 63 495873 > p 2 165 495999 495873 > p 3 165 991872 9072 > > When using /boot/boot0 instead of /boot/boot0sio all seems to work > perfectly fine on all Soekris boards I could test it on (net4521, > net4801, net5501). > > Next comes the interesting question when I use the some CF card in PC > is does _not_ work. I did get the output on the screen, but when > trying to press F1 or F2 or CR. All I got was a beep and no progress > forward, but just remain in the same section. Default behavior or > something off? The boot0sio uses "1" and "2" instead of "F1" and "F2". I accidently found out on a server that "1" and "2" work for the standard boot0 too but am not sure if I used the FB7 or FB8 boot0 on that machine. > /Rick (reply-to-all button is sometimes hard to find) > -- > http://rickvanderzwet.nl -- Paul Schenkeveld From info at rickvanderzwet.nl Tue May 5 08:34:57 2009 From: info at rickvanderzwet.nl (Rick van der Zwet) Date: Tue May 5 08:35:03 2009 Subject: nanobsd image boot issues In-Reply-To: <20090505081420.GA72340@psconsult.nl> References: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> <20090423.162427.-1543901316.imp@bsdimp.com> <5aaae08a0905030520t1e942e76o6e7c9447700cf5f0@mail.gmail.com> <20090505081420.GA72340@psconsult.nl> Message-ID: <5aaae08a0905050134i6b620c37j3bd107e61e7e39a4@mail.gmail.com> 2009/5/5 Paul Schenkeveld : > On Sun, May 03, 2009 at 02:20:18PM +0200, Rick van der Zwet wrote: >> 2009/4/24 M. Warner Losh : >> > In message: <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> >> > ? ? ? ? ? ?Rick van der Zwet writes: >> > : Boot delay and fail issues on various hardware using nanobsd generated >> > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example while >> > : trying to run a image on a soekris net4521 (bios 1.33) it seems to >> > : take ages (up to a minute) to start booting. Same image supplied to a >> > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not >> > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems >> > : trying to find a boot loader. The net4801 even bails out after a >> > : while. Output of fdisk of image list as follows: >> [snip: fdisk outputs] >> >> > Have you enabled packet mode for boot in boot0 with boot0cfg? >> >> I did. The problems turned out to be something completely different. >> Starting from soekris bios version 1.31 and upwards boot0sio does not >> work anymore, freezing forever while trying to boot initially e.g. not >> showing the following output: >> ? ?F1 ? FreeBSD >> ? ?F2 ? FreeBSD >> >> ? ?Default: F1 > > Yesterday I did a complete nanobsd build from scratch, sources checked > out with RELENG_7_1 tag (gave me 7.1p5) and with the default boot loader > (boot0sio), packet mode is on. Interesting, could you share your nanobsd configuration and if possible one of the images so I could test them over here? Configuration I am using could be found at: http://svn.wirelessleiden.nl/svn/projects/iris/nanobsd/cfg/nanobsd.wleiden /Rick -- http://rickvanderzwet.nl From info at rickvanderzwet.nl Tue May 5 09:58:37 2009 From: info at rickvanderzwet.nl (Rick van der Zwet) Date: Tue May 5 09:58:44 2009 Subject: Boot0 testing (WAS: Re: nanobsd image boot issues) Message-ID: <5aaae08a0905050258t5ca6a84ep2b7d1a47bcca6d8c@mail.gmail.com> Hi Luigi, Down below a thread currently running at freebsd-embedded@ regarding the boot0 loader and it's weirdness. I don't seems to find a proper way of getting the boot0 loader to work on various (old) hardware, like Pentium I PC's with awardBios, which I need to get nanobsd to work properly on various types of hardware. I have tried a whole number of options and combination all varies from LBA bios settings to different boot0 loaders of various releases, but all combination seems to 'die' or got 'stuck', e.g. not to continue with the generic boot cycle. Looking at the source code it seems to be 3 points of failure, ranging from invalid input to unreadable sectors, but all ends with the same generic warning (read: one 'beep'). I know space is limited, but how about a different beep sequence for all warning, will that be possible? Next as you did quite some work in the field of boot loaders, what is the best way to test the boot loader sequence e.g. enable full debugging at all parts of the progress? Thanks in advance, /Rick PS: Some background: Bunch of enthusiastic volunteers running FreeBSD RELENG_5 at 80+ wireless nodes of various types of hardware, in and around the city of Leiden, The Netherlands. Planning a overhaul of the software to run on recent version of FreeBSD using nanobsd to provide remote update possibilities. 2009/5/4 John Baldwin : > On Sunday 03 May 2009 10:29:17 pm John Hein wrote: >> Rick van der Zwet wrote at 14:20 +0200 on May ?3, 2009: >> ?> 2009/4/24 M. Warner Losh : >> ?> > In message: > <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> >> ?> > ? ? ? ? ? ?Rick van der Zwet writes: >> ?> > : Boot delay and fail issues on various hardware using nanobsd > generated >> ?> > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example > while >> ?> > : trying to run a image on a soekris net4521 (bios 1.33) it seems to >> ?> > : take ages (up to a minute) to start booting. Same image supplied to a >> ?> > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not >> ?> > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems >> ?> > : trying to find a boot loader. The net4801 even bails out after a >> ?> > : while. Output of fdisk of image list as follows: >> ?> [snip: fdisk outputs] >> ?> >> ?> > Have you enabled packet mode for boot in boot0 with boot0cfg? >> ?> >> ?> I did. The problems turned out to be something completely different. >> ?> Starting from soekris bios version 1.31 and upwards boot0sio does not >> ?> work anymore, freezing forever while trying to boot initially e.g. not >> ?> showing the following output: >> ?> ? ?F1 ? FreeBSD >> ?> ? ?F2 ? FreeBSD >> ?> >> ?> ? ?Default: F1 >> ?> >> ?> I generated my images like this: >> ?> ? ?$ fdisk -i -f _.fdisk da0 >> ?> ? ?$ boot0cfg -B -b /boot/boot0sio -o packet -s 1 -m 3 da0 >> ?> ? ?$ bsdlabel -w -B -b /boot/boot da0s1 >> ?> ? ?$ bsdlabel -w -B -b /boot/boot da0s2 >> ?> ? ?$ newfs /dev/da0s1a >> ?> ? ?$ newfs /dev/da0s2a >> ?> ? ?$ newfs /dev/da0s3 >> ?> ? ?$ cat _.fdisk >> ?> ? ?# 1000944 2 63 16 0 8192 0 >> ?> ? ?g c993 h16 s63 >> ?> ? ?p 1 165 63 495873 >> ?> ? ?p 2 165 495999 495873 >> ?> ? ?p 3 165 991872 9072 >> ?> >> ?> When using /boot/boot0 instead of /boot/boot0sio all seems to work >> ?> perfectly fine on all Soekris boards I could test it on (net4521, >> ?> net4801, net5501). >> ?> >> ?> Next comes the interesting question when I use the some CF card in PC >> ?> is does _not_ work. I did get the output on the screen, but when >> ?> trying to press F1 or F2 or CR. All I got was a beep and no progress >> ?> forward, but just remain in the same section. Default behavior or >> ?> something off? >> >> Note that 7.1 (which is what I seem to recall you're using) >> changed the boot loader to use real mode (see sys/boot/i386/btx). >> >> You could try using boot blocks from 7.0 (or 6.3) to see >> if it makes a difference.. > > boot0 doesn't use BTX so those changes should not affect that. ?Luigi (luigi@) > did make some changes to boot0, however, and you may want to ask him about > this. > > -- > John Baldwin > From rizzo at iet.unipi.it Tue May 5 10:57:30 2009 From: rizzo at iet.unipi.it (Luigi Rizzo) Date: Tue May 5 10:57:37 2009 Subject: Boot0 testing (WAS: Re: nanobsd image boot issues) In-Reply-To: <5aaae08a0905050258t5ca6a84ep2b7d1a47bcca6d8c@mail.gmail.com> References: <5aaae08a0905050258t5ca6a84ep2b7d1a47bcca6d8c@mail.gmail.com> Message-ID: <20090505104419.GA12107@onelab2.iet.unipi.it> On Tue, May 05, 2009 at 11:58:35AM +0200, Rick van der Zwet wrote: > Hi Luigi, > > Down below a thread currently running at freebsd-embedded@ regarding > the boot0 loader and it's weirdness. I don't seems to find a proper > way of getting the boot0 loader to work on various (old) hardware, > like Pentium I PC's with awardBios, which I need to get nanobsd to > work properly on various types of hardware. One problem I had with some old hardware was that the BIOS could not read more than one sector at a time, and eventually (but it was really long ago so i do not remember the details well) I had to patch some code so that reading would occur one sector at a time instead of using track-long blocks. But if the problem is this one, it should be really something that pertains to boot1 and boot2. Also, some BIOSes and CF cards can be confused if the geometry is not correct. That's all i know. cheers luigi > I have tried a whole number of options and combination all varies > from LBA bios settings to different boot0 loaders of various releases, > but all combination seems to 'die' or got 'stuck', e.g. not to > continue with the generic boot cycle. > > Looking at the source code it seems to be 3 points of failure, ranging > from invalid input to unreadable sectors, but all ends with the same > generic warning (read: one 'beep'). I know space is limited, but how > about a different beep sequence for all warning, will that be > possible? > > Next as you did quite some work in the field of boot loaders, what is > the best way to test the boot loader sequence e.g. enable full > debugging at all parts of the progress? > > Thanks in advance, > /Rick > PS: Some background: Bunch of enthusiastic volunteers running FreeBSD > RELENG_5 at 80+ wireless nodes of various types of hardware, in and > around the city of Leiden, The Netherlands. Planning a overhaul of the > software to run on recent version of FreeBSD using nanobsd to provide > remote update possibilities. > > 2009/5/4 John Baldwin : > > On Sunday 03 May 2009 10:29:17 pm John Hein wrote: > >> Rick van der Zwet wrote at 14:20 +0200 on May ?3, 2009: > >> ?> 2009/4/24 M. Warner Losh : > >> ?> > In message: > > <5aaae08a0904231438v5b655056g8852dc11f1e83987@mail.gmail.com> > >> ?> > ? ? ? ? ? ?Rick van der Zwet writes: > >> ?> > : Boot delay and fail issues on various hardware using nanobsd > > generated > >> ?> > : RELENG_7_1 images on a sandisk 2gb CF (SDCFH2-002G). For example > > while > >> ?> > : trying to run a image on a soekris net4521 (bios 1.33) it seems to > >> ?> > : take ages (up to a minute) to start booting. Same image supplied to a > >> ?> > : PC (intel Pentium 1 & award bios) using a CF->IDE converter does not > >> ?> > : seems to boot at all, neither does a net4801 (bios 1.33). Just seems > >> ?> > : trying to find a boot loader. The net4801 even bails out after a > >> ?> > : while. Output of fdisk of image list as follows: > >> ?> [snip: fdisk outputs] > >> ?> > >> ?> > Have you enabled packet mode for boot in boot0 with boot0cfg? > >> ?> > >> ?> I did. The problems turned out to be something completely different. > >> ?> Starting from soekris bios version 1.31 and upwards boot0sio does not > >> ?> work anymore, freezing forever while trying to boot initially e.g. not > >> ?> showing the following output: > >> ?> ? ?F1 ? FreeBSD > >> ?> ? ?F2 ? FreeBSD > >> ?> > >> ?> ? ?Default: F1 > >> ?> > >> ?> I generated my images like this: > >> ?> ? ?$ fdisk -i -f _.fdisk da0 > >> ?> ? ?$ boot0cfg -B -b /boot/boot0sio -o packet -s 1 -m 3 da0 > >> ?> ? ?$ bsdlabel -w -B -b /boot/boot da0s1 > >> ?> ? ?$ bsdlabel -w -B -b /boot/boot da0s2 > >> ?> ? ?$ newfs /dev/da0s1a > >> ?> ? ?$ newfs /dev/da0s2a > >> ?> ? ?$ newfs /dev/da0s3 > >> ?> ? ?$ cat _.fdisk > >> ?> ? ?# 1000944 2 63 16 0 8192 0 > >> ?> ? ?g c993 h16 s63 > >> ?> ? ?p 1 165 63 495873 > >> ?> ? ?p 2 165 495999 495873 > >> ?> ? ?p 3 165 991872 9072 > >> ?> > >> ?> When using /boot/boot0 instead of /boot/boot0sio all seems to work > >> ?> perfectly fine on all Soekris boards I could test it on (net4521, > >> ?> net4801, net5501). > >> ?> > >> ?> Next comes the interesting question when I use the some CF card in PC > >> ?> is does _not_ work. I did get the output on the screen, but when > >> ?> trying to press F1 or F2 or CR. All I got was a beep and no progress > >> ?> forward, but just remain in the same section. Default behavior or > >> ?> something off? > >> > >> Note that 7.1 (which is what I seem to recall you're using) > >> changed the boot loader to use real mode (see sys/boot/i386/btx). > >> > >> You could try using boot blocks from 7.0 (or 6.3) to see > >> if it makes a difference.. > > > > boot0 doesn't use BTX so those changes should not affect that. ?Luigi (luigi@) > > did make some changes to boot0, however, and you may want to ask him about > > this. > > > > -- > > John Baldwin > > From fb-embedded at psconsult.nl Tue May 5 14:49:45 2009 From: fb-embedded at psconsult.nl (Paul Schenkeveld) Date: Tue May 5 14:49:52 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <4b925570b9c69698b6eb029454ed29fa@mteege.de> References: <200904201535.21191.nick@van-laarhoven.org> <4b925570b9c69698b6eb029454ed29fa@mteege.de> Message-ID: <20090505144938.GA87033@psconsult.nl> On Mon, Apr 20, 2009 at 03:55:23PM +0200, Matthias Teege wrote: > Moin, > > > I've seen this problem as well, but can't for the life of me remember what I > > I'm relieved to hear that. Ok, a bit late (interrupt storm generated by device $WORK) but I just tested with a clean 7.2-RELEASE source tree. I too can report this regression in boot0 which now looks at the active flag in a MBR table entry instead of its own default partition byte when not choosing the partition by pressing 1 or 2 at the prompt. This is a regression. The boot0 source code appears to have had a complete overhaul between 7.1 and 7.2. As a workaround, use the 7.1 boot0 source (or even use 7.1 completely if you care about the anticipated eol of the release). I hope Luigi will have some time to look at the default drive delection algorithm again zome time soon. Regards, Paul Schenkeveld From info at rickvanderzwet.nl Tue May 5 19:52:53 2009 From: info at rickvanderzwet.nl (Rick van der Zwet) Date: Tue May 5 19:53:00 2009 Subject: Boot0 testing (WAS: Re: nanobsd image boot issues) In-Reply-To: <20090505104419.GA12107@onelab2.iet.unipi.it> References: <5aaae08a0905050258t5ca6a84ep2b7d1a47bcca6d8c@mail.gmail.com> <20090505104419.GA12107@onelab2.iet.unipi.it> Message-ID: <5aaae08a0905051252l7d3cd0a0m7149d7421a4af20c@mail.gmail.com> 2009/5/5 Luigi Rizzo : > On Tue, May 05, 2009 at 11:58:35AM +0200, Rick van der Zwet wrote: >> Down below a thread currently running at freebsd-embedded@ regarding >> the boot0 loader and it's weirdness. I don't seems to find a proper >> way of getting the boot0 loader to work on various (old) hardware, >> like Pentium I PC's with awardBios, which I need to get nanobsd to >> work properly on various types of hardware. Turned out to be an issue with packet 'mode', as not all old PC's bios did not have the support included, sigh :-( > One problem I had with some old hardware was that the BIOS > could not read more than one sector at a time, and eventually > (but it was really long ago so i do not remember > the details well) I had to patch some code so that > reading would occur one sector at a time instead of > using track-long blocks. D?j? vu, that's fellow W(ireless)L(eiden) hacker Dw: http://lists.freebsd.org/pipermail/freebsd-hackers/2003-May/000636.html >> Looking at the source code it seems to be 3 points of failure, ranging >> from invalid input to unreadable sectors, but all ends with the same >> generic warning (read: one 'beep'). I know space is limited, but how >> about a different beep sequence for all warning, will that be >> possible? FYI: during debugging I wrote it to aid me. (thanks to the wonderful SAVE_MEMORY and SAVE_MORE_MEMORY flags for making coding easy). http://www.freebsd.org/cgi/query-pr.cgi?pr=134242 /Rick -- http://rickvanderzwet.nl From rizzo at iet.unipi.it Tue May 5 22:15:04 2009 From: rizzo at iet.unipi.it (Luigi Rizzo) Date: Tue May 5 22:15:11 2009 Subject: Boot0 testing (WAS: Re: nanobsd image boot issues) In-Reply-To: <5aaae08a0905051252l7d3cd0a0m7149d7421a4af20c@mail.gmail.com> References: <5aaae08a0905050258t5ca6a84ep2b7d1a47bcca6d8c@mail.gmail.com> <20090505104419.GA12107@onelab2.iet.unipi.it> <5aaae08a0905051252l7d3cd0a0m7149d7421a4af20c@mail.gmail.com> Message-ID: <20090505222022.GA36031@onelab2.iet.unipi.it> On Tue, May 05, 2009 at 09:52:51PM +0200, Rick van der Zwet wrote: > 2009/5/5 Luigi Rizzo : > > On Tue, May 05, 2009 at 11:58:35AM +0200, Rick van der Zwet wrote: > >> Down below a thread currently running at freebsd-embedded@ regarding > >> the boot0 loader and it's weirdness. I don't seems to find a proper > >> way of getting the boot0 loader to work on various (old) hardware, > >> like Pentium I PC's with awardBios, which I need to get nanobsd to > >> work properly on various types of hardware. > > Turned out to be an issue with packet 'mode', as not all old PC's bios > did not have the support included, sigh :-( > > > One problem I had with some old hardware was that the BIOS > > could not read more than one sector at a time, and eventually > > (but it was really long ago so i do not remember > > the details well) I had to patch some code so that > > reading would occur one sector at a time instead of > > using track-long blocks. > > D?j? vu, that's fellow W(ireless)L(eiden) hacker Dw: > http://lists.freebsd.org/pipermail/freebsd-hackers/2003-May/000636.html ok so the actual patch was here http://lists.freebsd.org/pipermail/freebsd-hackers/2003-May/000638.html Does this patch fix your issue ? cheers luigi From jsimpson.za at gmail.com Wed May 6 07:35:53 2009 From: jsimpson.za at gmail.com (Johan Simpson) Date: Wed May 6 07:36:02 2009 Subject: FreeBSD 7.1 AMD Geode LX 800 / Compact Flash boot issues Message-ID: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> Hi all, im having some problems with getting FreeBSD to work on a new embedded Geode based motherboard. This is the board im using: http://files.ieiworld.com/files/news/080325/NOVA-LX_homepage.html To sum up what ive tried.. 1. When i boot the freebsd 7.1 dvd normally, sysinstall hangs at probing devices. 2. I managed to get a minimal install on the compact flash, by disabling ACPI on the dvd's boot menu. 3. Now i have FreeBSD 7.1 successfully installed on the CF card. Here is where the problems start :( It locks up right before/after the loader loads loader.conf. Ive put some printf calls in the loader to see where exactly the system hangs. In src/sys/boot/common/interp.c,v 1.29.28.1 2008/11/25 02:59:29 kensmith Exp $ ive found a problem in interact() ------------------------------------------------------------------------------- #ifdef BOOT_FORTH bf_init(); #endif printf("Reached interact1\n"); /*PUT IN BY ME */ /* * Read our default configuration */ if(include("/boot/loader.rc")!=CMD_OK) include("/boot/boot.conf"); printf("\n"); /* * Before interacting, we might want to autoboot. */ printf("Reached interact2\n"); /*PUT IN BY ME */ autoboot_maybe(); ----------------------------------------------------------------------------- It never gets to print "Reached interact2". So ive put in some printf's into include() which look like this: ----------------------------------------------------------- printf("Including config file\n"); if (((fd = open(filename, O_RDONLY)) == -1)) { sprintf(command_errbuf,"can't open '%s': %s\n", filename, strerror(errno)); return(CMD_ERROR); } printf("Config file is open: %s\n", filename); /* * Read the script into memory. */ script = se = NULL; line = 0; while (fgetstr(input, sizeof(input), fd) >= 0) { printf("Reading.. %s\n", input); ------------------------------------------------------------ It seems that include() is called 3 times. After which it hangs. So ive decided to print out the lines its reading from the config files. Turns out that its not reading the config files, but garbage data. What can i do to fix this problem, and is this a filesystem / CF problem? Im willing to fix up the problem, but need some advice from the experts before i go look for the problem in the wrong places. Thank you for your time Johan Simpson From jacques.fourie at gmail.com Wed May 6 08:26:31 2009 From: jacques.fourie at gmail.com (Jacques Fourie) Date: Wed May 6 08:26:38 2009 Subject: FreeBSD 7.1 AMD Geode LX 800 / Compact Flash boot issues In-Reply-To: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> References: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> Message-ID: > Hi all, im having some problems with getting FreeBSD to work on a new > embedded Geode based motherboard. > > This is the board im using: > http://files.ieiworld.com/files/news/080325/NOVA-LX_homepage.html > > To sum up what ive tried.. > > 1. When i boot the freebsd 7.1 dvd normally, sysinstall hangs at > probing devices. > 2. I managed to get a minimal install on the compact flash, by > disabling ACPI on the dvd's boot menu. > 3. Now i have FreeBSD 7.1 successfully installed on the CF card. > > > Here is where the problems start :( > > > It locks up right before/after the loader loads loader.conf. > > > Ive put some printf calls in the loader to see where exactly the system hangs. > > > In src/sys/boot/common/interp.c,v 1.29.28.1 2008/11/25 02:59:29 kensmith Exp $ > > ive found a problem in interact() > > ------------------------------------------------------------------------------- > #ifdef BOOT_FORTH > ? ?bf_init(); > #endif > ? ? printf("Reached interact1\n"); ? ?/*PUT IN BY ME */ > ? ?/* > ? ? * Read our default configuration > ? ? */ > ? ?if(include("/boot/loader.rc")!=CMD_OK) > ? ? ? ?include("/boot/boot.conf"); > ? ?printf("\n"); > ? ?/* > ? ? * Before interacting, we might want to autoboot. > ? ? */ > ? ? printf("Reached interact2\n"); /*PUT IN BY ME */ > > ? ?autoboot_maybe(); > > ----------------------------------------------------------------------------- > > It never gets to print "Reached interact2". > > > > So ive put in some printf's into include() > > which look like this: > > ----------------------------------------------------------- > > ?printf("Including config file\n"); > ? ?if (((fd = open(filename, O_RDONLY)) == -1)) { > ? ? ? ?sprintf(command_errbuf,"can't open '%s': %s\n", filename, strerror(errno)); > ? ? ? ?return(CMD_ERROR); > ? ?} > ? ?printf("Config file is open: %s\n", filename); > ? ?/* > ? ? * Read the script into memory. > ? ? */ > ? ?script = se = NULL; > ? ?line = 0; > > ? ?while (fgetstr(input, sizeof(input), fd) >= 0) { > > ? ? ? ?printf("Reading.. %s\n", input); > > > > ------------------------------------------------------------ > > > It seems that include() is called 3 times. > > After which it hangs. So ive decided to print out the lines its > reading from the config files. > > > Turns out that its not reading the config files, but garbage data. > > What can i do to fix this problem, and is this a filesystem / CF problem? > > Im willing to fix up the problem, but need some advice from the > experts before i go look for the problem in the wrong places. > > > Thank you for your time > > Johan Simpson > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" > Disable DMA by adding hw.ata.ata_dma=0 to /boot/loader.conf and see if it makes a difference. Jacques From mah at jump-ing.de Wed May 6 09:31:26 2009 From: mah at jump-ing.de (Markus Hitter) Date: Wed May 6 09:31:35 2009 Subject: FreeBSD 7.1 AMD Geode LX 800 / Compact Flash boot issues In-Reply-To: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> References: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> Message-ID: <7A6423DA-FEF0-43E1-9AAF-E61895C21F1D@jump-ing.de> Am 06.05.2009 um 09:03 schrieb Johan Simpson: > What can i do to fix this problem, and is this a filesystem / CF > problem? The 7.1 release doesn't have the best reputation here, as well. Networking did better on 7.0, but see . USB drives were very unreliable either, but installing Hans Petter Selasky's new USB stack did the trick. It appears to be bullet-proof now: . Both reports contain solutions. While the later is in 8-current already, the former bug report obviously got stuck. Perhaps you can pick up there. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From jsimpson.za at gmail.com Thu May 7 07:54:11 2009 From: jsimpson.za at gmail.com (Johan Simpson) Date: Thu May 7 07:54:19 2009 Subject: FreeBSD 7.1 AMD Geode LX 800 / Compact Flash boot issues In-Reply-To: References: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> Message-ID: <9e6237170905070054n604b1a8bhb267a6efc84f56dc@mail.gmail.com> > Disable DMA ?by adding hw.ata.ata_dma=0 to /boot/loader.conf and see > if it makes a > difference. > > Jacques > Doesnt seem to work, ive re-installed a standard minimal 7.1R installation. then booted into the dvd's fixit console, mounted the cf, changed loader.conf to look like this: hw.ata.ata_dma=0 hw.ata.ata_dma_check_80pin=0 hw.ata.wc=0 hint.acpi.0.disabled=0 Boot loader starts then prints a | or / after which it makes the screen red and fills it with garbage arrow-like characters. It is strange because i can mount the CF fine from the fixit console and no-errors there. Only booting from it seems to give problems. I believe it might be something else, i found this : http://phaq.phunsites.net/2006/08/15/freebsd-boot-loader-hangs-on-startup/ which says -------------------------------------------------------------------------------------------------------------------------------------------- The FreeBSD boot loader seems to hang at startup. The system will not respond and not boot. Either nothing or one of the following may be printed on the system console: | or boot: -D Reason The reasons for this are most probably 1. Absence of a serial port on your mainboard 2. The serial port on your mainboard is deactivated 3. FreeBSD has a default value to use a non-existing serial port Solution The FreeBSD boot loader is by its nature very limited in its capabilities. It has quiet enough intellence for reading boot blocks and starting a kernel, but it may stall if it is instructed to redirect it?s output to a non-existing or disabled serial port. So any of these solutions may apply: * check your BIOS settings and enable the serial port(s) * disable boot loader?s serial console redirection (remove -D flag from /boot.config) * check and correct to boot loader?s compiled in default for the serial port if you have an usual setup --------------------------------------------------------------------------------------------------------------------------------------------------------------- Im going to see if the serial port settings can make any difference. Thanks for the advice. From jsimpson.za at gmail.com Thu May 7 08:57:46 2009 From: jsimpson.za at gmail.com (Johan Simpson) Date: Thu May 7 08:57:53 2009 Subject: FreeBSD 7.1 AMD Geode LX 800 / Compact Flash boot issues In-Reply-To: <9e6237170905070054n604b1a8bhb267a6efc84f56dc@mail.gmail.com> References: <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com> <9e6237170905070054n604b1a8bhb267a6efc84f56dc@mail.gmail.com> Message-ID: <9e6237170905070157gfbb56d8h76942b2c13c85fe3@mail.gmail.com> On Thu, May 7, 2009 at 9:54 AM, Johan Simpson wrote: >> Disable DMA ?by adding hw.ata.ata_dma=0 to /boot/loader.conf and see >> if it makes a >> difference. >> >> Jacques >> > > > Doesnt seem to work, ive re-installed a standard minimal 7.1R installation. > > then booted into the dvd's fixit console, mounted the cf, changed > loader.conf to look like this: > > ? ?hw.ata.ata_dma=0 > ? ?hw.ata.ata_dma_check_80pin=0 > ? ?hw.ata.wc=0 > ? ?hint.acpi.0.disabled=0 > > > Boot loader starts > then prints a | or / > > after which it makes the screen red and fills it with garbage > arrow-like characters. > > It is strange because i can mount the CF fine from the fixit console > and no-errors there. Only booting from it seems to give problems. > > > I believe it might be something else, > i found this : > http://phaq.phunsites.net/2006/08/15/freebsd-boot-loader-hangs-on-startup/ > > > which says > -------------------------------------------------------------------------------------------------------------------------------------------- > The FreeBSD boot loader seems to hang at startup. The system will not > respond and not boot. > Either nothing or one of the following may be printed on the system console: > > | > > or > > boot: -D > > Reason > > The reasons for this are most probably > > ? 1. Absence of a serial port on your mainboard > ? 2. The serial port on your mainboard is deactivated > ? 3. FreeBSD has a default value to use a non-existing serial port > > Solution > > The FreeBSD boot loader is by its nature very limited in its capabilities. > > It has quiet enough intellence for reading boot blocks and starting a > kernel, but it may stall if it is instructed to redirect it?s output > to a non-existing or disabled serial port. > > So any of these solutions may apply: > > ? ?* check your BIOS settings and enable the serial port(s) > ? ?* disable boot loader?s serial console redirection (remove -D flag > from /boot.config) > ? ?* check and correct to boot loader?s compiled in default for the > serial port if you have an usual setup > --------------------------------------------------------------------------------------------------------------------------------------------------------------- > > > Im going to see if the serial port settings can make any difference. > > > Thanks for the advice. > Fixed the IRQs in the bios, made no difference, except that dmesg on the dvd loader doesnt complain about sio0 not working anymore. Here is some screenshots of the dma errors dmesg reports when i boot from the CD: http://img26.imageshack.us/img26/6989/07052009001v.jpg http://img17.imageshack.us/img17/5034/07052009.jpg The garbage data that fills the screen right after BTX loader prints | or / http://img19.imageshack.us/img19/4623/07052009002h.jpg I guess im going to have to take the loader apart....... From bugmaster at FreeBSD.org Mon May 11 11:06:52 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 11 11:07:40 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200905111106.n4BB6pmm085904@freefall.freebsd.org> 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 kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub 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 o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From jhb at freebsd.org Mon May 11 16:49:37 2009 From: jhb at freebsd.org (John Baldwin) Date: Mon May 11 16:50:19 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <20090505144938.GA87033@psconsult.nl> References: <200904201535.21191.nick@van-laarhoven.org> <4b925570b9c69698b6eb029454ed29fa@mteege.de> <20090505144938.GA87033@psconsult.nl> Message-ID: <200905110940.31187.jhb@freebsd.org> On Tuesday 05 May 2009 10:49:38 am Paul Schenkeveld wrote: > On Mon, Apr 20, 2009 at 03:55:23PM +0200, Matthias Teege wrote: > > Moin, > > > > > I've seen this problem as well, but can't for the life of me remember what I > > > > I'm relieved to hear that. > > Ok, a bit late (interrupt storm generated by device $WORK) but I just > tested with a clean 7.2-RELEASE source tree. I too can report this > regression in boot0 which now looks at the active flag in a MBR table > entry instead of its own default partition byte when not choosing the > partition by pressing 1 or 2 at the prompt. This is a regression. > > The boot0 source code appears to have had a complete overhaul between > 7.1 and 7.2. > > As a workaround, use the 7.1 boot0 source (or even use 7.1 completely > if you care about the anticipated eol of the release). > > I hope Luigi will have some time to look at the default drive delection > algorithm again zome time soon. I think you can simply re-enable the 'update' flag using boot0cfg in 7.2 to fix this? -- John Baldwin From fb-embedded at psconsult.nl Tue May 12 07:53:04 2009 From: fb-embedded at psconsult.nl (Paul Schenkeveld) Date: Tue May 12 07:53:10 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <200905110940.31187.jhb@freebsd.org> References: <200904201535.21191.nick@van-laarhoven.org> <4b925570b9c69698b6eb029454ed29fa@mteege.de> <20090505144938.GA87033@psconsult.nl> <200905110940.31187.jhb@freebsd.org> Message-ID: <20090512075254.GA88230@psconsult.nl> On Mon, May 11, 2009 at 09:40:31AM -0400, John Baldwin wrote: > On Tuesday 05 May 2009 10:49:38 am Paul Schenkeveld wrote: > > On Mon, Apr 20, 2009 at 03:55:23PM +0200, Matthias Teege wrote: > > > Moin, > > > > > > > I've seen this problem as well, but can't for the life of me remember > what I > > > > > > I'm relieved to hear that. > > > > Ok, a bit late (interrupt storm generated by device $WORK) but I just > > tested with a clean 7.2-RELEASE source tree. I too can report this > > regression in boot0 which now looks at the active flag in a MBR table > > entry instead of its own default partition byte when not choosing the > > partition by pressing 1 or 2 at the prompt. This is a regression. > > > > The boot0 source code appears to have had a complete overhaul between > > 7.1 and 7.2. > > > > As a workaround, use the 7.1 boot0 source (or even use 7.1 completely > > if you care about the anticipated eol of the release). > > > > I hope Luigi will have some time to look at the default drive delection > > algorithm again zome time soon. > > I think you can simply re-enable the 'update' flag using boot0cfg in 7.2 to > fix this? The update flag is on, besides it controls whether the first sector is written back or not after selecting another slice than the default using the keyboard. The problem above shows that the 'default' slice variable in sector 0 is not read anymore but the MBR records are searched for an active flag. Using the (M$DOS-compatible) active flag only slices 1-4 can be set as default, the boot0 default variable also allows for selection 5 (next disk) and probably also 6 (pxe boot) to be saved as default. -- Paul Schenkeveld From info at martenvijn.nl Tue May 12 08:35:02 2009 From: info at martenvijn.nl (Marten Vijn) Date: Tue May 12 08:35:09 2009 Subject: Minimal NanoBSD image / make.conf? In-Reply-To: <1236874484.16141.4.camel@mvn-desktop> References: <93A3902C-A459-48A9-A36C-7036E0ED5C0D@develooper.com> <1236874484.16141.4.camel@mvn-desktop> Message-ID: <1242116381.6449.83.camel@mvn-desktop> On Thu, 2009-03-12 at 17:14 +0100, Marten Vijn wrote: > On Thu, 2009-03-12 at 08:28 -0700, Ask Bj?rn Hansen wrote: > > Hi everyone, > > > > I used to build my NanoBSD images off 6.x. My original NanoBSD > > make.conf was based on one phk had for his ntpns clock (I think it was). > > > > I'm upgrading to 7.1 now and was wondering if anyone would like to > > share their make.conf for making a ~minimal install? > (I deploy on > > Soekris and PC Engines boards). > > Hi i asked this a while ago, > But no clear anwsers came, > > I willing to put some effort in this and document it in public place. > > This what use now: > http://bsd.wifisoft.org/svn/projects/nek/node/nanobsd/ > http://bsd.wifisoft.org/svn/projects/nek/node/nanobsd-8.0/node_ap_64M/ change NANO_TOOLS to your working dir. it had a 40Mb base and some packages. if some has a "cust_crunchgen" example for bin sbin usrbin and usr/sbin example, I would like to add it Marten > > > > > for this project: > > http://bsd.wifisoft.org/nek/ > > > > kind regards, > Marten > > -- http://martenvijn.nl Marten Vijn http://martenvijn.nl/trac/wiki/soas Sugar on a Stick http://bsd.wifisoft.org/nek/ The Network Event Kit http://har2009.org 13th-16th August http://opencommunitycamp.org 26th Jul - 2nd August From jhb at freebsd.org Tue May 12 15:48:11 2009 From: jhb at freebsd.org (John Baldwin) Date: Tue May 12 15:48:19 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <20090512075254.GA88230@psconsult.nl> References: <200904201535.21191.nick@van-laarhoven.org> <200905110940.31187.jhb@freebsd.org> <20090512075254.GA88230@psconsult.nl> Message-ID: <200905121008.19196.jhb@freebsd.org> On Tuesday 12 May 2009 3:52:54 am Paul Schenkeveld wrote: > On Mon, May 11, 2009 at 09:40:31AM -0400, John Baldwin wrote: > > On Tuesday 05 May 2009 10:49:38 am Paul Schenkeveld wrote: > > > On Mon, Apr 20, 2009 at 03:55:23PM +0200, Matthias Teege wrote: > > > > Moin, > > > > > > > > > I've seen this problem as well, but can't for the life of me remember > > what I > > > > > > > > I'm relieved to hear that. > > > > > > Ok, a bit late (interrupt storm generated by device $WORK) but I just > > > tested with a clean 7.2-RELEASE source tree. I too can report this > > > regression in boot0 which now looks at the active flag in a MBR table > > > entry instead of its own default partition byte when not choosing the > > > partition by pressing 1 or 2 at the prompt. This is a regression. > > > > > > The boot0 source code appears to have had a complete overhaul between > > > 7.1 and 7.2. > > > > > > As a workaround, use the 7.1 boot0 source (or even use 7.1 completely > > > if you care about the anticipated eol of the release). > > > > > > I hope Luigi will have some time to look at the default drive delection > > > algorithm again zome time soon. > > > > I think you can simply re-enable the 'update' flag using boot0cfg in 7.2 to > > fix this? > > The update flag is on, besides it controls whether the first sector is > written back or not after selecting another slice than the default using > the keyboard. The problem above shows that the 'default' slice variable > in sector 0 is not read anymore but the MBR records are searched for > an active flag. Using the (M$DOS-compatible) active flag only slices > 1-4 can be set as default, the boot0 default variable also allows for > selection 5 (next disk) and probably also 6 (pxe boot) to be saved as > default. Err, so one of the things you need to keep in mind, is that boot1 re-reads the MBR and uses the "active" flag to determine where to load boot2 from (and where boot2 loads /boot/loader from and /boot/loader loads the kernel and /etc/fstab from). boot1 prefers an active slice to a non-active slice, so if boot0 doesn't write back an updated MBR with the active slice changed, then even if you load the boot1 from slice 2, it will still boot slice 1 if the active flag is set on slice 1. Note that this is not in boot0, but in boot1. However, having 'update' enabled should fix this. -- John Baldwin From fb-embedded at psconsult.nl Tue May 12 17:16:03 2009 From: fb-embedded at psconsult.nl (Paul Schenkeveld) Date: Tue May 12 17:16:09 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <200905121008.19196.jhb@freebsd.org> References: <200904201535.21191.nick@van-laarhoven.org> <200905110940.31187.jhb@freebsd.org> <20090512075254.GA88230@psconsult.nl> <200905121008.19196.jhb@freebsd.org> Message-ID: <20090512171555.GA4985@psconsult.nl> On Tue, May 12, 2009 at 10:08:18AM -0400, John Baldwin wrote: > On Tuesday 12 May 2009 3:52:54 am Paul Schenkeveld wrote: > > On Mon, May 11, 2009 at 09:40:31AM -0400, John Baldwin wrote: > > > On Tuesday 05 May 2009 10:49:38 am Paul Schenkeveld wrote: > > > > On Mon, Apr 20, 2009 at 03:55:23PM +0200, Matthias Teege wrote: > > > > > Moin, > > > > > > > > > > > I've seen this problem as well, but can't for the life of me > remember > > > what I > > > > > > > > > > I'm relieved to hear that. > > > > > > > > Ok, a bit late (interrupt storm generated by device $WORK) but I just > > > > tested with a clean 7.2-RELEASE source tree. I too can report this > > > > regression in boot0 which now looks at the active flag in a MBR table > > > > entry instead of its own default partition byte when not choosing the > > > > partition by pressing 1 or 2 at the prompt. This is a regression. > > > > > > > > The boot0 source code appears to have had a complete overhaul between > > > > 7.1 and 7.2. > > > > > > > > As a workaround, use the 7.1 boot0 source (or even use 7.1 completely > > > > if you care about the anticipated eol of the release). > > > > > > > > I hope Luigi will have some time to look at the default drive delection > > > > algorithm again zome time soon. > > > > > > I think you can simply re-enable the 'update' flag using boot0cfg in 7.2 > to > > > fix this? > > > > The update flag is on, besides it controls whether the first sector is > > written back or not after selecting another slice than the default using > > the keyboard. The problem above shows that the 'default' slice variable > > in sector 0 is not read anymore but the MBR records are searched for > > an active flag. Using the (M$DOS-compatible) active flag only slices > > 1-4 can be set as default, the boot0 default variable also allows for > > selection 5 (next disk) and probably also 6 (pxe boot) to be saved as > > default. > > Err, so one of the things you need to keep in mind, is that boot1 re-reads the > MBR and uses the "active" flag to determine where to load boot2 from (and > where boot2 loads /boot/loader from and /boot/loader loads the kernel > and /etc/fstab from). boot1 prefers an active slice to a non-active slice, > so if boot0 doesn't write back an updated MBR with the active slice changed, > then even if you load the boot1 from slice 2, it will still boot slice 1 if > the active flag is set on slice 1. Note that this is not in boot0, but in > boot1. However, having 'update' enabled should fix this. But on a FB7.1 (and 7.0, 6.[43210] and some 5.x and 4.x releases too) it used to work like this (just tried on a live 7.1p5 system): # boot0cfg -v ad0 # flag start chs type end chs offset size 1 0x80 0: 1: 1 0xa5 333: 14:48 48 240432 2 0x00 334: 1: 1 0xa5 667: 14:48 240528 240432 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 version=1.0 drive=0x80 mask=0x3 ticks=182 options=packet,update,nosetdrv default_selection=F1 (Slice 1) # boot0cfg -v -s 2 ad0 # flag start chs type end chs offset size 1 0x80 0: 1: 1 0xa5 333: 14:48 48 240432 2 0x00 334: 1: 1 0xa5 667: 14:48 240528 240432 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 version=1.0 drive=0x80 mask=0x3 ticks=182 options=packet,update,nosetdrv default_selection=F2 (Slice 2) # reboot Note that default_selection has changed, but slice 1 is still marked active in the MBR. After rebooting, the kernel in /dev/ad0s2a is loaded (verified by uname -a, both slices have a kernel with a different timestamp) and: # boot0cfg -v ad0 # flag start chs type end chs offset size 1 0x00 0: 1: 1 0xa5 333: 14:48 48 240432 2 0x80 334: 1: 1 0xa5 667: 14:48 240528 240432 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 version=1.0 drive=0x80 mask=0x3 ticks=182 options=packet,update,nosetdrv default_selection=F2 (Slice 2) # The active marker has moved from slice 1 to slice 2, most likely this was done by boot0 but I cannot verify this easily. Trying the same on FB7.2 will show that default_selection has changed and slice 1 still marked active in the MBR after 'boot0cfg -v -s 2 ad0' just like on FB7.1 but during the reboot the kernel from slice 1 gets loaded and ad0s1a becomes the root partition. I just cannot but conclude that this is a regression from 7.1 and before. Unfortunately my x86 assembly knowledge is not enough to completely understaand boot0.S (I tried to compare the 7.1 and 7.2 source but had to give up) but boot0.S appears to have changed quite a lot in 7.2 so I'll keep pointing my finger at the boot0.S changes until proven wrong. > -- > John Baldwin Paul Schenkeveld From jhb at freebsd.org Tue May 12 19:21:10 2009 From: jhb at freebsd.org (John Baldwin) Date: Tue May 12 19:21:17 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <20090512171555.GA4985@psconsult.nl> References: <200904201535.21191.nick@van-laarhoven.org> <200905121008.19196.jhb@freebsd.org> <20090512171555.GA4985@psconsult.nl> Message-ID: <200905121445.27090.jhb@freebsd.org> On Tuesday 12 May 2009 1:15:55 pm Paul Schenkeveld wrote: > After rebooting, the kernel in /dev/ad0s2a is loaded (verified by > uname -a, both slices have a kernel with a different timestamp) and: > > # boot0cfg -v ad0 > # flag start chs type end chs offset size > 1 0x00 0: 1: 1 0xa5 333: 14:48 48 240432 > 2 0x80 334: 1: 1 0xa5 667: 14:48 240528 240432 > 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 > 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 > > version=1.0 drive=0x80 mask=0x3 ticks=182 > options=packet,update,nosetdrv > default_selection=F2 (Slice 2) > # > > The active marker has moved from slice 1 to slice 2, most likely this > was done by boot0 but I cannot verify this easily. Yes, it is done by boot0. > Trying the same on FB7.2 will show that default_selection has changed > and slice 1 still marked active in the MBR after 'boot0cfg -v -s 2 ad0' > just like on FB7.1 but during the reboot the kernel from slice 1 gets > loaded and ad0s1a becomes the root partition. Ok, so can you verify if 'update' is enabled for boot0 in the 7.2 case? -- John Baldwin From fb-embedded at psconsult.nl Tue May 12 22:13:50 2009 From: fb-embedded at psconsult.nl (Paul Schenkeveld) Date: Tue May 12 22:13:57 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <200905121445.27090.jhb@freebsd.org> References: <200904201535.21191.nick@van-laarhoven.org> <200905121008.19196.jhb@freebsd.org> <20090512171555.GA4985@psconsult.nl> <200905121445.27090.jhb@freebsd.org> Message-ID: <20090512221342.GA9393@psconsult.nl> On Tue, May 12, 2009 at 02:45:26PM -0400, John Baldwin wrote: > On Tuesday 12 May 2009 1:15:55 pm Paul Schenkeveld wrote: > > After rebooting, the kernel in /dev/ad0s2a is loaded (verified by > > uname -a, both slices have a kernel with a different timestamp) and: > > > > # boot0cfg -v ad0 > > # flag start chs type end chs offset size > > 1 0x00 0: 1: 1 0xa5 333: 14:48 48 240432 > > 2 0x80 334: 1: 1 0xa5 667: 14:48 240528 240432 > > 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 > > 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 > > > > version=1.0 drive=0x80 mask=0x3 ticks=182 > > options=packet,update,nosetdrv > > default_selection=F2 (Slice 2) > > # > > > > The active marker has moved from slice 1 to slice 2, most likely this > > was done by boot0 but I cannot verify this easily. > > Yes, it is done by boot0. > > > Trying the same on FB7.2 will show that default_selection has changed > > and slice 1 still marked active in the MBR after 'boot0cfg -v -s 2 ad0' > > just like on FB7.1 but during the reboot the kernel from slice 1 gets > > loaded and ad0s1a becomes the root partition. > > Ok, so can you verify if 'update' is enabled for boot0 in the 7.2 case? Yes (although I'm sure this only influences boot selection thru keyboard input when booting, not switching thru boot0cfg). Another strange observation, after a fresh nanobsd build using 7.2R, this is the output of boot0cfg: # boot0cfg -v ad0 # flag start chs type end chs offset size 1 0x00 0: 1: 1 0xa5 333: 14:48 48 240432 2 0x00 334: 1: 1 0xa5 667: 14:48 240528 240432 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 version=1.0 drive=0x80 mask=0x3 ticks=182 bell=# (0x23) options=packet,update,nosetdrv default_selection=F1 (Slice 1) Note that none of the slices is marked active. Switching using boot0cfg yields: # boot0cfg -v -s 2 ad0 # flag start chs type end chs offset size 1 0x00 0: 1: 1 0xa5 333: 14:48 48 240432 2 0x00 334: 1: 1 0xa5 667: 14:48 240528 240432 3 0x00 668: 0: 1 0xa5 670: 14:48 480960 2160 4 0x00 671: 0: 1 0xa5 693: 14:48 483120 16560 version=1.0 drive=0x80 mask=0x3 ticks=182 bell=# (0x23) options=packet,update,nosetdrv default_selection=F2 (Slice 2) # During reboot, boot0 suggests that slice 2 is default: 1 Seconds to automatic boot. Press Ctrl-P for entering Monitor. 1 FreeBSD 2 FreeBSD 5 Drive 1 Boot: 2 It looks like the kernel on ad0s1a gets loaded however. To be sure I upgraded the kernel on ad0s2a with a newer one, still the same behaviour. To summarize 7.2 boot0 behaviour: - Pressing [F]1 or [F]2 at the boot0 prompt selects slice 1 or 2 and boots off that slice. If the update option is on, default_selection is set in sector0, the active flage is set on the requested slice and cleared from the other slice. - Boot0cfg -s N sets default_selection to N and does not affect the active flag in MBR record. - Boot0 does not look at default_selection at all, the slice marked active is booted, if no slice is marked active, slice 1 is booted. Pressing a key during boot0 is kind of hard if the box is thousends of kilometers away, boot0 not looking at default_selection seems wrong because it exists to allow more control than just the active flags can achive (like defaulting to boor from the second disk. -- Paul Schenkeveld From jhb at freebsd.org Wed May 13 14:27:31 2009 From: jhb at freebsd.org (John Baldwin) Date: Wed May 13 14:27:51 2009 Subject: nanobsd boot slice selection does not work In-Reply-To: <20090512221342.GA9393@psconsult.nl> References: <200904201535.21191.nick@van-laarhoven.org> <200905121445.27090.jhb@freebsd.org> <20090512221342.GA9393@psconsult.nl> Message-ID: <200905131003.16938.jhb@freebsd.org> On Tuesday 12 May 2009 6:13:42 pm Paul Schenkeveld wrote: > During reboot, boot0 suggests that slice 2 is default: > > 1 Seconds to automatic boot. Press Ctrl-P for entering Monitor. > > 1 FreeBSD > 2 FreeBSD > 5 Drive 1 > > Boot: 2 > > It looks like the kernel on ad0s1a gets loaded however. To be sure I > upgraded the kernel on ad0s2a with a newer one, still the same behaviour. Can you do boot0cfg -v after you have rebooted in this case? I want to see if the active flag is set to slice 2. > To summarize 7.2 boot0 behaviour: > > - Pressing [F]1 or [F]2 at the boot0 prompt selects slice 1 or 2 and > boots off that slice. If the update option is on, default_selection > is set in sector0, the active flage is set on the requested slice > and cleared from the other slice. Ok, so pressing the key always works? > - Boot0cfg -s N sets default_selection to N and does not affect the > active flag in MBR record. Right, the way this works at least in <= 7.1 is that boot0 changes the active flag based on 'default_selection' and then writes the new MBR back out to disk. > - Boot0 does not look at default_selection at all, the slice marked > active is booted, if no slice is marked active, slice 1 is booted. Well, boot1 does not look at default_selection at all. I think boot0 is still honoring it, but what happens is that boot0 loads boot1 from slice 2, but that boot1 doesn't find the active flag set, so it uses the first FreeBSD slice (slice 1) to load boot2, the loader, and the kernel. -- John Baldwin From bugmaster at FreeBSD.org Mon May 18 11:06:50 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 18 11:07:41 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200905181106.n4IB6n1T075604@freefall.freebsd.org> 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 kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub 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 o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From support at dropshippertoday.info Wed May 20 21:12:21 2009 From: support at dropshippertoday.info (Drop Ship Access) Date: Wed May 20 21:12:27 2009 Subject: Become a DSA Affiliate Message-ID: <3e4001c9d98c$c9ef1eb0$2301000a@shiny> Hello, I was looking at your website, and I thought it might be a good candidate for our affiliate program . We pay you $30 for each paying customer you send our way or $70 if they signup for a full year. You also receive a 5 dollar commission on sales made by any affiliates you've referred through your link. You can learn more about our service on our website . Click here to see the details of our affiliate program . If you don't think this is a good fit, just click here and I won't contact you again. Best Regards, Amber Flynn Affiliate Manager Drop Ship Access 210 Front St Ste 524 Monroe, MI 48161 From bugmaster at FreeBSD.org Mon May 25 11:06:49 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 25 11:07:41 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200905251106.n4PB6m7G092739@freefall.freebsd.org> 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 kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub 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 o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total.