| Last Update: "2008/04/13 18:35:58 makoto" bootsel2
 boot selector (type 2)
http://www5.atwiki.jp/kuro-bsd/pages/69.html
download
http://kurobsd.ki.nu/download/boot/bootsel2/
 What for ?To boot the NetBSD on Kuro-box, LinkStation or 
TeraStation,
you may need to type following command at Linux Root Prompt,
eitherinsmod nbload_v3.o kernel=/boot/netbsd-KUROBOX_MD.binto invoke install kernel, 
or insmod nbload_v3.o kernel=/boot/netbsd-KUROBOX.binfor normal multi-user boot,
or do nothing to continue Linux operation. The boot selector 2 will do the same thing automatically.
 
It also unmounts the /boot and the re-mount by read-only, fsck won't happen
at another power on. AVR will be taken care too.
 
Unless you have serial console attached,
 the boot selector
is Essential. If you do have the serial console attached,
it is optional, although it is very handly and useful for automatic-boot etc.
  Normal OperationNormal Operation (with boot selector 2) at Power On will be:
If you do nothing after Power ON, the boot selector selects the pre-configured kernel
in /etc/kuro_boot.conf.Power On
LED lights RED for three seconds
While it is RED, push 
the Power Button TWICE (for example),
The box will repeat the count (you pushed) by ON/OFF of lights.
Depending on the counts (you pushed) the SELECTED kernel will be loaded and start.
 InstallationversionsThe version to be installed depens on the type of BOX.
Following table is as of 2008/04/10.
See bottom of 
page| Type of box | file | 
|---|
 | Kuro-box | kuro-bootsel2.20070207.tar.gz |  | LinkStation |  | TeraStation (Silver) | tera-bootsel2.20051119.tar.gz |  | TeraStation (Black) | N/A (alteratively, use 
bootsel version 1
)(*1) |  Root LoginAll the operation to install boot selector needs to be done with root privilege.
Say, 
you need to login Linux with root privilege to do following installation.
If you are installing to kuro-box without any hardware modification, you 
will login via telnet. In the case of Kuro-box, when after the really new box
is installed, it automatically start with EM-mode
(the link destination is in Japanese right now, sorry),
you may be able to set root passwd. If your box is not Kuro-box, but 
LinkStation,
or TeraStation, you may have some difficulty getting root privilege.OperationTo install boot selector2, you may do ftp, tar, make install at Linux root prompt.
The summary of actual operation may be as follows:
(the number shown to the left is history number, not for type-in).Detailed operation log follows:  503  ftp ftp.ki.nu
       cd pub/NetBSD/kurobsd/boot/bootsel2
       get  kuro-bootsel2.20070207.tar.bz2
       quit
  505  tar jxf kuro-bootsel2.20061028.tar.bz2 
  507  cd kuro-bootsel2
  509  make install
Get the tar stuff
(like kuro-bootsel2.20070207.tar.gz)
 from following by ftp:
http://kurobsd.ki.nu/download/boot/bootsel2/
 root@KURO-BOX:/home/makoto# ftp ftp.ki.nu
ftp> cd pub/NetBSD/kurobsd/boot/bootsel2
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 676
-rw-r--r--  1 2030  0     434 Jan 25  2006 MD5
-rw-r--r--  1 2030  0     362 Dec  3  2005 MD5.old
-rw-r--r--  1 2030  0     500 Jan 25  2006 RMD160
-rw-r--r--  1 2030  0     417 Dec  3  2005 RMD160.old
-rw-r--r--  1 2030  0    9682 Sep 16  2005 kuro-bootsel2.20050916a.tar.bz2
-rw-r--r--  1 2030  0   10788 Nov  9  2005 kuro-bootsel2.20051109.tar.bz2
-rw-r--r--  1 2030  0   10901 Dec  3  2005 kuro-bootsel2.20051203.tar.bz2
-rw-r--r--  1 2030  0  257509 Jan 25  2006 kuro-bootsel2.20060125.tar.bz2
-rw-r--r--  1 2030  0   11462 Nov 19  2005 tera-bootsel2.20051119.tar.bz2
-rw-r--r--  1 2030  0   11479 Nov 19  2005 tera-bootsel2.20051119a.tar.bz2
226 Transfer complete.
ftp> get  kuro-bootsel2.20061028.tar.bz2
ftp> quit
and then tar jxf, cd kuro-bootsel2 and make install 
                                          tar jxf kuro-bootsel2.20070207.tar.bz2
                                          cd kuro-bootsel2
root@KURO-BOX:/home/makoto/kuro-bootsel2# make install
mkdir -p /boot/tools
cp kuro_swread kuro_morse /boot/tools/
cp kuro_bootsel2.sh /etc/init.d/
chmod 755 /etc/init.d/kuro_bootsel2.sh
if [ -d /etc/rcS.d ]; then \
        (cd /etc/rcS.d; ln -s ../init.d/kuro_bootsel2.sh S15kuro_bootsel2.sh) \
fi
if [ -d /etc/rc.d/rcS.d ]; then \
        (cd /etc/rc.d/rcS.d; ln -s ../init.d/kuro_bootsel2.sh S15kuro_bootsel2.sh) \
fi
if [ -c /dev/ttyS1 ]; then \
        sed 's/AVR00/ttyS1/' < kuro_boot.conf > /etc/kuro_boot.conf \
else \
        cp kuro_boot.conf /etc/ \
fi
/bin/sh: -c: line 2: syntax error: unexpected end of file
make: *** [install] Error 2
root@KURO-BOX:/home/makoto/kuro-bootsel2# cat Ma
The problem shown the bottom of above operation has been fixed and
should not occur with the version 20061028 or later. setupThe setup of boot selector2 will be done at 
/etc/kuro_boot.confproblemftp not foundroot@TS-TGL2B8:~# ftp ftp.ki.nu
sh: ftp: command not founduse wget instead: 
root@TS-TGL2B8:~# cd /tmp
root@TS-TGL2B8:~# \
wget ftp://ftp.ki.nu/pub/NetBSD/kurobsd/boot/bootsel2/kuro-bootsel2.20070207.tar.bz2 
--07:12:37--  
     ftp://ftp.ki.nu/pub/NetBSD/kurobsd/boot/bootsel2/kuro-bootsel2.20070207.tar.bz2
           => `kuro-bootsel2.20070207.tar.bz2'
Resolving ftp.ki.nu... done.
Connecting to ftp.ki.nu[218.44.234.234]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/NetBSD/kurobsd/boot/bootsel2 ... done.
==> PORT ... done.    ==> RETR kuro-bootsel2.20070207.tar.bz2 ... done.
Length: 258,080 (unauthoritative)
100%[====================================>] 258,080        1.46M/s    ETA 00:00
07:12:37 (1.46 MB/s) - `kuro-bootsel2.20070207.tar.bz2' saved [258080]
root@TS-TGL2B8:/tmp#  make not foundroot@TS-TGL2B8:/tmp# tar jxf kuro-bootsel2.20070207.tar.bz2 
root@TS-TGL2B8:/tmp# cd kuro-bootsel2
root@TS-TGL2B8:/tmp/kuro-bootsel2# make install
sh: make: command not found
root@TS-TGL2B8:/tmp/kuro-bootsel2#
cat the Makefile and issue shell command by copy-paste line by line at install: target. root@TS-TGL2B8:/tmp/kuro-bootsel2# cat Makefile
all: kuro_swread kuro_morse
clean:
        rm -f kuro_swread kuro_morse
install: kuro_swread kuro_morse kuro_bootsel2.sh kuro_boot.conf
        mkdir -p /boot/tools
        cp kuro_swread kuro_morse /boot/tools/
        cp kuro_bootsel2.sh /etc/init.d/
        chmod 755 /etc/init.d/kuro_bootsel2.sh
        if [ -d /etc/rcS.d ]; then \
                (cd /etc/rcS.d; ln -s ../init.d/kuro_bootsel2.sh S15kuro_bootsel2.sh) \
        fi
        if [ -d /etc/rc.d/rcS.d ]; then \
                (cd /etc/rc.d/rcS.d; ln -s ../init.d/kuro_bootsel2.sh S15kuro_bootsel2.sh) \
        fi
        cp kuro_boot.conf /etc/
        ...  (omitted) ...
 root@TS-TGL2B8:/tmp/kuro-bootsel2# mkdir -p /boot/tools
root@TS-TGL2B8:/tmp/kuro-bootsel2# cp kuro_swread kuro_morse /boot/tools/
root@TS-TGL2B8:/tmp/kuro-bootsel2# cp kuro_bootsel2.sh /etc/init.d
root@TS-TGL2B8:/tmp/kuro-bootsel2# chmod 755 /etc/init.d/kuro_bootsel2.sh
root@TS-TGL2B8:/tmp/kuro-bootsel2# ls -ld /etc/rcS.d /etc/rc.d/rcS.d
ls: /etc/rcS.d: No such file or directory
drwxr-xr-x    2 root     root         4096 Apr  9 07:10 /etc/rc.d/rcS.d
root@TS-TGL2B8:/tmp/kuro-bootsel2# 
 (cd /etc/rc.d/rcS.d; ln -s ../init.d/kuro_bootsel2.sh S15kuro_bootsel2.sh) 
root@TS-TGL2B8:/tmp/kuro-bootsel2# cp kuro_boot.conf /etc/
 root@TS-TGL2B8:/tmp/kuro-bootsel2# grep kernel2 /etc/kuro_boot.conf*
/etc/kuro_boot.conf:kernel2=/boot/netbsd-KUROBOX.bin
/etc/kuro_boot.conf-orig:kernel2=/boot/netbsd.bin
root@TS-TGL2B8:/tmp/kuro-bootsel2# /sbin/reboot
 
...
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
/dev/ttyS1 detected.
************************************************
Select the OS in 3 secs: (default is 1)
1: Linux
2: NetBSD(HDD:wd0)
** Default **
** No.1 **
Checking all file systems...
fsck 1.27 (8-Mar-2002)
...
(will take a time to get login prompt)
...
BUFFALO INC. TeraStation series TS-TGL(IENARI)
TS-TGL2B8 login: 
 
System Error E04
Can't Load Krnl
 |