BTX scripting help

Kelly Hall khall at stbernard.com
Thu Oct 7 11:00:10 PDT 2004


Hi Folks,
 
I'm trying to automate a sequence of BTX commands and I'm hitting some
snags.  I've got some minor forth experience, but it isn't enough.
 
My machine uses the standard bootloader and doesn't present a menu for
the user.  By default, the machine boots a standard kernel and fs-image
file and everything is happy.  Sometimes, though, I want my users to be
able to boot an alternate kernel and fs-image.  To do this, what they do
now is:
  - wait for the default kernel to start loading
  - hit the space bar
  - BTX breaks out and gives them a prompt
  - they type four commands:
    - unload
    - load /kernel
    - load -t md_image /altfs-image
    - boot
I'd like to replace those four commands with one command to make things
nicer for them.
 
So I tried to define the obvious forth word:
  : altboot   unload load /kernel load -t md_image /altfs-image boot ;
which fails to compile because /kernel isn't a word.

These all compile, but reboot when invoked
  : altboot  unload s" /kernel" load ;   \ reboots the box
  : altboot  unload load s" /kernel" ;   \ reboots the box
  : altboot  unload ." /kernel" load ;   \ reboots the box
  : altboot  unload load ." /kernel" ;   \ reboots the box
 
I'm stumped.  Any suggestions?
 
Kelly



More information about the freebsd-hackers mailing list