* Re: [9fans] bootup menus...
2005-08-06 15:29 [9fans] bootup menus John Floren
@ 2005-08-06 15:19 ` Christoph Lohmann
2005-08-06 16:52 ` jmk
2005-08-06 18:32 ` Tim Newsham
2 siblings, 0 replies; 5+ messages in thread
From: Christoph Lohmann @ 2005-08-06 15:19 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Good day.
On Sat, 06 Aug 2005 08:29:13 -0700
John Floren <jfloren@moseslake-wa.com> wrote:
> needed to. To accomplish this, I would like to set up my boot menu to
> give an option of kernels, but to time out and boot the cpu/authserver
> kernel after about 10 seconds. How do I do this?
> Thank you
plan9.ini(8) [page 10 and 11]
Sincerely,
Christoph
^ permalink raw reply [flat|nested] 5+ messages in thread
* [9fans] bootup menus...
@ 2005-08-06 15:29 John Floren
2005-08-06 15:19 ` Christoph Lohmann
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: John Floren @ 2005-08-06 15:29 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi again.
I'd like to run my Plan 9 cpu server without any peripherals, but I
would like to have the option of booting it with the default kernel if I
needed to. To accomplish this, I would like to set up my boot menu to
give an option of kernels, but to time out and boot the cpu/authserver
kernel after about 10 seconds. How do I do this?
Thank you
John
--
http://nuwen.net/~digi/cluster
"Whatever the missing mass of the universe is, I hope it's not cockroaches!"
-- Mom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] bootup menus...
2005-08-06 15:29 [9fans] bootup menus John Floren
2005-08-06 15:19 ` Christoph Lohmann
@ 2005-08-06 16:52 ` jmk
2005-08-07 1:48 ` John Floren
2005-08-06 18:32 ` Tim Newsham
2 siblings, 1 reply; 5+ messages in thread
From: jmk @ 2005-08-06 16:52 UTC (permalink / raw)
To: 9fans
Others have pointed out boot(8), init(8) for documentation.
A plan9.ini file to do what you want with a 5 second timeout
and serial console might look something like this:
[menu]
menuitem=9pccpu, 9pccpu
menuitem=manual, manual
menuconsole=0, 9600
menudefault=9pccpu, 5
[9pccpu]
bootfile=ether0!/386/9pccpu
[manual]
[common]
ether0=type=i82557
console=0
Locally we run a different cpurc which calls out to local files:
#!/bin/rc
boottime=`{date}
boottime=$"boottime
# parallelism for mk
NPROC=`{wc -l /dev/sysstat}
NPROC=`{echo $NPROC|sed 's/ .*//'}
# get rid of need for dirs in /n
mntgen -s slashn && chmod 666 /srv/slashn
# cs sets /dev/sysname
ndb/cs
sysname=`{cat /dev/sysname}
prompt=($sysname^'# ' ' ')
# site specific startup
if(test -e /rc/bin/cpurc.local)
. /rc/bin/cpurc.local
# cpu specific startup
if(test -e /cfg/$sysname/cpurc)
. /cfg/$sysname/cpurc
# if we're not a server, start a dns resolver
if(! test -e /srv/dns)
ndb/dns -r
# reboot if we lose the file server
aux/reboot
# turn on dong's tcp port hog defense
if( test -e /net/tcp/clone)
echo -n tcpporthogdefense on > /net/tcp/0/ctl
# keep other bootes processes from creating capabilities
rm '#¤/caphash' > /dev/null >[2=1]
# start up internet if we don't already have an address
if(! grep u /net/ipselftab | grep -sv 127.0.0.1)
ip/ipconfig
if(! grep -s 127.0.0.1 /net/ipselftab)
ip/ipconfig loopback /dev/null 127.1
# start listeners if it hasn't already been done (dicey check)
if(! netstat -n | grep -s 'tcp.*Listen.* (7|9|21|22|23|25|110|113|565|993|17007|17009|17010) .*')
aux/listen -q tcp
if(! netstat -n | grep -v 17008 | grep -s il.*Listen)
aux/listen -q il
if(! ps|grep -s timesync)
aux/timesync -s /net -nl -d /sys/log/timesync.d oncore achille
# cpu specific startup
if(test -e /cfg/$sysname/cpustart)
. /cfg/$sysname/cpustart
exit 0
/rc/bin/cpurc.local contains things like setting the
site, fileserver, facedom and default cpu variables and
anything else which is global to our site.
/cfg/$sysname/cpurc contains things specific to a
particular cpu server, such as starting daemons and
cron.
/cfg/$sysname/cpustart seems to be something added
since last I looked to give people another hook for
playing around. Some of the local instances seem to
be of dubious value...
We also use /cfg/$sysname to keep other machine-specific
files such as namespace, consoledb, copies of config
files like plan9.ini, venti.conf, etc. Sometimes there's
also a file of notes about the machine to aid in
recovery or replication if something bad happens.
--jim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] bootup menus...
2005-08-06 15:29 [9fans] bootup menus John Floren
2005-08-06 15:19 ` Christoph Lohmann
2005-08-06 16:52 ` jmk
@ 2005-08-06 18:32 ` Tim Newsham
2 siblings, 0 replies; 5+ messages in thread
From: Tim Newsham @ 2005-08-06 18:32 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> To accomplish this, I would like to set up my boot menu to give an option of
> kernels, but to time out and boot the cpu/authserver kernel after about 10
> seconds. How do I do this?
In addition to what others have said, 9fat: (dossrv(4)) and pc/setup.9fat
(no man page?) might also prove useful.
I think you can edit plan9.ini in place so you probably don't need
setup.9fat.
> John
Tim Newsham
http://www.lava.net/~newsham/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] bootup menus...
2005-08-06 16:52 ` jmk
@ 2005-08-07 1:48 ` John Floren
0 siblings, 0 replies; 5+ messages in thread
From: John Floren @ 2005-08-07 1:48 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
jmk@plan9.bell-labs.com wrote:
> Others have pointed out boot(8), init(8) for documentation.
> A plan9.ini file to do what you want with a 5 second timeout
> and serial console might look something like this:
>
> [menu]
> menuitem=9pccpu, 9pccpu
> menuitem=manual, manual
> menuconsole=0, 9600
> menudefault=9pccpu, 5
>
> [9pccpu]
> bootfile=ether0!/386/9pccpu
>
> [manual]
>
> [common]
> ether0=type=i82557
> console=0
>
>
I used a variation on this; works great. Thanks a lot!
John
--
http://nuwen.net/~digi/cluster
Nobody ever forgets where he buried the hatchet.
-- Kin Hubbard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-08-07 1:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-06 15:29 [9fans] bootup menus John Floren
2005-08-06 15:19 ` Christoph Lohmann
2005-08-06 16:52 ` jmk
2005-08-07 1:48 ` John Floren
2005-08-06 18:32 ` Tim Newsham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).