[Soekris] NanoBSD Reboot failure

2011-09-17 Thread Jed Clear
I'm running NanoBSD (FreeBSD 8.2R) on a net5501.  It generally runs great, but 
every time I go to reboot it, I get an error and it doesn't reboot.  Same error 
for halt, reboot, and shutdown.

net5501# uname -a
FreeBSD net5501 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2 #0: Sat Jul 16 12:26:17 
EDT 2011 
r...@fbsdam3.my.domain:/usr/obj/nanobsd.custom/i386/usr/src/sys/JEDWALL  i386
net5501# halt
/sbin/halt: Input/output error.
net5501# shutdown now
/sbin/shutdown: Input/output error.
net5501# reboot
/sbin/reboot: Input/output error.
net5501# 

On the console there is a bit more info:
login: vnode_pager_getpages: I/O read error
vnode_pager_getpages: I/O read error
vnode_pager_getpages: I/O read error

Fortunately I can reach out and touch it and give it a hard boot when necessary 
(new builds, generally), but I'd like to fix it.  The NanoBSD configuration 
file I use is included below.  

-Jed


NANO_NAME=custom
NANO_SRC=/usr/src
NANO_KERNEL=JEDWALL
NANO_ARCH=i386
NANO_IMAGES=2
JEDWALL_DIR=/home/clear/jedwall

CONF_BUILD='
NO_KLDLOAD=YES
NO_NETGRAPH=YES
NO_PAM=YES
'

CONF_INSTALL='
NO_ACPI=YES
NO_BLUETOOTH=YES
NO_CVS=YES
NO_FORTRAN=YES
NO_HTML=YES
NO_LPR=YES
NO_SENDMAIL=YES
NO_SHAREDOCS=YES
NO_EXAMPLES=YES
NO_CALENDAR=YES
NO_MISC=YES
'
#NO_INSTALLLIB=YES
#NO_MAN=YES
#NO_SHARE=YES

CONF_WORLD='
NO_MODULES=YES
NO_KERBEROS=YES
NO_GAMES=YES
NO_RESCUE=YES
NO_LOCALES=YES
NO_SYSCONS=YES
NO_INFO=YES
'
#

FlashDevice SanDisk 1G

cust_nobeastie() (
touch ${NANO_WORLDDIR}/boot/loader.conf
echo beastie_disable=\YES\  ${NANO_WORLDDIR}/boot/loader.conf
)

install_packages () (
mkdir -p ${NANO_WORLDDIR}/packages
cp ${JEDWALL_DIR}/pkg/* ${NANO_WORLDDIR}/packages
chroot ${NANO_WORLDDIR} sh -c 'cd packages; pkg_add -v *;cd ..;'
rm -rf ${NANO_WORLDDIR}/packages
rm -f ${NANO_WORLDDIR}/usr/local/etc/thttpd.conf
ln -s /etc/www/thttpd.conf ${NANO_WORLDDIR}/usr/local/etc/thttpd.conf
)

install_jedwall_files () (
cp -Rp ${JEDWALL_DIR}/Files/etc/ssh ${NANO_WORLDDIR}/etc/ssh
cp -RL ${JEDWALL_DIR}/Files/* ${NANO_WORLDDIR}
cp /etc/master.passwd ${NANO_WORLDDIR}/etc
pwd_mkdb -p -d ${NANO_WORLDDIR}/etc ${NANO_WORLDDIR}/etc/master.passwd
ln -s /var/named/etc/namedb ${NANO_WORLDDIR}/etc/namedb
)
customize_cmd cust_comconsole
customize_cmd cust_install_files
#customize_cmd cust_allow_ssh_root
customize_cmd cust_nobeastie
customize_cmd install_packages
customize_cmd install_jedwall_files


___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] Building an OpenBSD router

2011-09-17 Thread Nix
On 26 Aug 2011, Ralph Becker-Szendy stated:
 One problem is upgrades.  If your whole household and family rely on the 
 server, you can't take it out of service for a weekend to upgrade the 
 OS.  And OBSD wants to be upgraded every 6 months, otherwise you are 
 looking at a reinstall.  Right now, I'm doing a leapfrog technique: 
 About once a year, I rsync my Soekris to a whitebox server, quickly (2-3 
 hours) swap them, then have a week to do a thorough install/ improve 
 cycle.  But if you get busy, that week turns into a month and then a 
 year; right now I'm in that year, and going to restart with a 2GB 6501.

An alternative approach is to maintain the primary OS image (everything
but variable parts of /var and any network-mounted filesystems) in a
chroot or other jail on another (bigger) machine, and rsync it over
nightly in a cron job (or on demand, if you've just done a security
upgrade or something). It takes a little work to autorestart affected
services after the rsync, but not very much (if you even want to bother
with that, as most daemons don't care if their binary image is replaced
underneath them).

This makes it completely trivial to recover on flash failure: just slam
the image onto it. You *know* it's up to date -- it can never get out of
date.

This is really easy with one of the BSDs or a source-based Linux distro
and much more unpleasant with a Linux-based binary package manager.

-- 
NULL  (void)
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] NanoBSD Reboot failure

2011-09-17 Thread Poul-Henning Kamp
In message bafeb7c0-933b-4297-b870-a42181ee9...@speakeasy.net, Jed Clear writ
es:

I'm running NanoBSD (FreeBSD 8.2R) on a net5501.  It generally
runs great, but every time I go to reboot it, I get an error and
it doesn't reboot.  Same error for halt, reboot, and shutdown.

That looks like you have lost contact with your disk.

8.X switched to the gpart(8) module, and if you use fdisk(8) to
change the active partition, something screws up and you loose
contact with the disk.

Not sure if boot0cfg(8) also suffers this problem.

The solution is to use gpart to set the active partition and
the nanobsd.sh and assorted files have been updated to do this
as far as I'm aware.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] Building an OpenBSD router

2011-09-17 Thread Jordan Share
On 9/17/2011 7:10 AM, Nix wrote:

 This is really easy with one of the BSDs or a source-based Linux distro
 and much more unpleasant with a Linux-based binary package manager.


What are the caveats with a binary package manager (vs. source-based)? 
It seems like it ought to work fine/as-well.

Jordan
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] Building an OpenBSD router

2011-09-17 Thread Mouse
 This is really easy with one of the BSDs or a source-based Linux
 distro and much more unpleasant with a Linux-based binary package
 manager.
 What are the caveats with a binary package manager (vs.
 source-based)?  It seems like it ought to work fine/as-well.

Well, I'm not Nix, but my usual answer to that is that binary packages
are usually very dogmatic about where they have to be installed.  This
is fine if that matches up well with what Nix's scheme wants, but only
rarely do binary packages' built-in paths match up well enough to deal
well with unusual filesystem-layout hackery.

/~\ The ASCII Mouse
\ / Ribbon Campaign
 X  Against HTMLmo...@rodents-montreal.org
/ \ Email!   7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech