Subject: Updated boot(8) man page
To: None <port-dreamcast@netbsd.org>
From: Alex Kirk <alex@schnarff.com>
List: port-dreamcast
Date: 07/08/2003 04:55:08
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_www-11768-1057640138-0001-2
Content-Type: multipart/signed;
    boundary="=_mimegpg-www-18928-1057640138-0001";
    micalg=pgp-sha1; protocol="application/pgp-signature"

This is a mimegpg-signed message.  If you see this text, it means that
your E-mail software does not support MIME-formatted messages.

--=_mimegpg-www-18928-1057640138-0001
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello All, 

I've finished my first draft of the boot(8) man page, which is attached and 
available at http://www.kirknet.net/boot.8. Andy R was even kind enough to 
forward along a copy of that DiscJuggler image, which I've put up at 
http://www.kirknet.net/netbsd.cdi. 

I would appreciate any comments, positive or negative, on this revision. 
Hopefully we can get it to the point it's committ-able. 

Alex Kirk 


--=_mimegpg-www-18928-1057640138-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (OpenBSD)
Comment: For info see http://www.gnupg.org

iD8DBQA/Ck7KIvK3w1ai3WcRAqXsAJ9xVvETcNBcwyZ80Bq1m1r+VYLQngCgh7Dj
Z5s6Ukm0VwWo8feg2tprTUI=
=Gu+/
-----END PGP SIGNATURE-----

--=_mimegpg-www-18928-1057640138-0001--

--=_www-11768-1057640138-0001-2
Content-Type: multipart/signed;
    boundary="=_mimegpg-www-18928-1057640138-0002";
    micalg=pgp-sha1; protocol="application/pgp-signature"

This is a mimegpg-signed message.  If you see this text, it means that
your E-mail software does not support MIME-formatted messages.

--=_mimegpg-www-18928-1057640138-0002
Content-Type: text/plain; charset=iso-8859-1; name="boot.8"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="boot.8"

.\"	$NetBSD: boot.8,v 1.1 2003/07/04 17:25:59 marcus Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Marcus Comstedt.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"        This product includes software developed by the NetBSD
.\"        Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\"    contributors may be used to endorse or promote products derived
.\"    from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 8, 2003
.Dt BOOT 8 dreamcast
.Os
.Sh NAME
.Nm boot
.Nd
system bootstrapping procedures
.Sh DESCRIPTION
.Tn WARNING: Not all Dreamcast consoles are capable of booting from a CD.
Only consoles made after July 2000 will work. You should probably
investigate the manufacture date of your Dreamcast (located on the bottom
of the unit for those lucky enough to see it first) before purchasing.
.Pp
.Tn Dreamcast
consoles can only boot from the built-in
.Tn GD-ROM
drive. You have options for both the kernel itself and your world files.
.Sh KERNEL OPTIONS
You may either prepare a CD with a kernel on it, or use the IP Upload
Slave <http://mc.pp.se/dc/ipslave.html> to push a kernel over the network 
to the Dreamcast. In either case, you may only use a CD-R; CD-RW disks
cannot be read by the Dreamcast.
.Ss Static Bootable CD
.Pp
The simplest way to boot from CD is to use the DiscJuggler image at 
<http://www.kirknet.net/netbsd.cdi>. Once the image is burned, using the
DiscJuggler software for Windows <http://www.padus.com/> (the demo version
from the web site works fine), simply put in that CD and let it run. See
the "Static Filesets" section below for how to load a filesystem from this
CD.
.pp
Alternatley, a pre-prepared kernel exists on Josh Tolbert's Dreamcast web site 
<http://members.wri.com/josht/dreamcast/dreamcast.html>.
.Pp
Once you have downloaded the kernel file, extract it to a convenient location;
you will have two files, audio.raw and kernel.raw. First, burn the audio track,
leaving the CD open. This can be done with 
.Xr cdrecord 1 as:
.Pp
.Dl # cdrecord dev=0,1,0 -multi -audio audio.raw 
.Pp
where 0,1,0 is your CD-RW device number.
.Pp
Next, you should burn the kernel.raw file as data. It is irrelevant whether or
not you close the CD. Again, the cdrecord example is:
.Pp
.Dl # cdrecord dev=0,1,0 -multi -xa1 kernel.raw
.Pp
You should be able to boot with this CD. Of course, you won't get very far
without a filesystem (setup described below), but if you get boot messages with
this disk, you know your Dreamcast is capable of booting from the GD-ROM.
.Ss IP Upload Slave
.Pp
Since the IP Upload Slave works by listening for a kernel that is being sent
across a LAN, a Broadband Adapter is required. They are extremely difficult to
find, as they are not currently in regular production; EBay is probably your
best option.
.Pp
You'll need to download this program from Marcus Comstedt's site at 
<http://mc.pp.se/dc/ipslave.html>. Once you have the files downloaded and 
extracted, you'll need to make a bootable CD.
.Pp
First, you should burn the same audio.raw file as for the Static CD, which is
really just 4 seconds of silence. This can be created with the following
command:
.Pp
.Dl # dd if=/dev/zero bs=2352 count=300 of=audio.raw
.Pp
Next, you must find out the offset on the CD, so that your ISO image will 
be written starting from that spot:
.Pp
.Dl # cdrecord dev=0,1,0 -msinfo
.Pp
Note that the above command must be run while the CD is still in the drive.
You'll want to write down the values returned by this command for use in the 
next step, making the ISO image with the IP Upload Slave on it. This is done
with the following command:
.Pp
.Dl # mkisofs -l -C x,y -o tmp.iso 1ST_READ.BIN
.Pp
where x,y are the values obtained from -msinfo.
.Pp
The final step in preparing the ISO image is adding the bootstrap:
.Pp
.Dl # ( cat IP.BIN ; dd if=tmp.iso bs=2048 skip=16 ) > data.raw
.Pp
Once this has been done, you should burn data.raw using the same procedure
as with kernel.raw for the Static CD.
.Pp
In order to upload a kernel using the IP slave, you need to use both
.Xr arp 8 and
.Xr nc 1 (netcat).
.Pp
First you need to create an arp entry on the machine sending the kernel; this
can be done with the following command:
.Pp
.Dl # arp -s dreamcast 00:D0:F1:02:AE:B1
.Pp
making sure to replace the MAC address with the one printed on your Broaband
Adapter.
.Pp
Once this is set up, the Dreamcast will be listening on port 4711 at the 
hostname specified above; thus, to send a kernel to it, use:
.Pp
.Dl # cat kernel | nc dreamcast 4711
.Pp
.Sh WORLD FILES
You can either burn your Dreamcast's world files onto a CD or host them on an
NFS server. The former is useful if you want to make your Dreamcast a firewall
or some other rarely updated appliance; the latter is useful if you wish to 
have your Dreamcast as a working system, i.e. a web server, etc.
.Pp
.Ss Obtaining Filesets
.Pp
Irrespective of whether you burn your world files to CD or put them on an NFS
server, you need to make sure the files are the same revision as your kernel.
For those who have downloaded Josh Tolbert's kernel, simply download his world
files from the same location. If you are using the IP upload slave, simply 
make sure that the kernel you are uploading and your world files match.
.Pp
In addition to Josh's tarball, filesets are available from ftp.netbsd.org in the 
/pub/NetBSD/NetBSD-1.6.1/dreamcast/binary/ directory. Note that if you are not
using Josh's sets, you must run
.Pp
.Dl # sh MAKEDEV ALL
.Pp
In the /dev directory that you unpack, in order to make all of the device 
drivers.
.Pp
.Ss Static Filesets
.Pp
Burning the fileset you've chosen to CD is a very simple process. First, an
image must be made to burn:
.Pp
.Dl # mkhybrid -o IMAGENAME.img -V VOLUME_LABEL -a -r /path/to/files
.Pp
where -a specifies all files in the directory, -r specifies Rock Ridge 
extensions (not strictly necessary, but not harmful), and /path/to/files is
the directory you unpacked your world into.
.Pp
Once a CD has been burned, you can simply put it in after your bootable
CD has loaded to the point of asking for a root filesystem. Once the world
CD is in the drive, type "gdrom" for the filesystem and hit Enter when
prompted for a dump device.
.Pp
It is possible to configure any kernel to prompt for a root filesystem.
.Pp
.Ss NFS Filesets
.Pp
You can use the same world files for both a static CD or NFS setup. For an
NFS setup, first unpack your world files to somewhere you can leave them 
comfortably. Then, configure
.Ar /etc/exports
(man 
.Xr exports 5 ) to export the directory via NFS. Make sure to set "-maproot=0"
for the exported directory; otherwise the Dreamcast will not have permissions
to mount it.  If you do not already have an NFS server running, refer to 
.Xr nfsd 8
for help setting one up. Note that 
.Xr mountd 8
must also be running in order for the Dreamcast to mount its filesystem.
.Pp
Additionally, you must configure DHCP, so that your Dreamcast can obtain an IP
address. Refer to 
.Xr dhcpd 8
for help setting up a DHCP server, and 
.Xr dhcpd.conf 5
for help configuring your 
.Ar /etc/dhcpd.conf
file.
.Pp
.Sh FILES
.Bl -tag -width /netbsd -compact
.It Pa /netbsd
system code,
.Pa /etc/exports,
.Pa /etc/dhcpd.conf
.El
.Sh SEE ALSO
.Xr nc 1 ,
.Xr cdrecord 1 ,
.Xr ddb 4 ,
.Xr userconf 4 ,
.Xr exports 5 ,
.Xr dhcpd.conf 5 ,
.Xr arp 8 ,
.Xr nfsd 8 ,
.Xr mountd 8 ,
.Xr dhcpd 8 ,
.Xr halt 8 ,
.Xr reboot 8 ,
.Xr shutdown 8
.Sh HISTORY
The
.Nm
man page appeared in
.Nx 1.6.1+ .

--=_mimegpg-www-18928-1057640138-0002
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (OpenBSD)
Comment: For info see http://www.gnupg.org

iD8DBQA/Ck7KIvK3w1ai3WcRAn4AAKDAjM1lNBjRNZ8f33YWHLuE897aTgCgs+NM
xVg8HQtRtrL7hwo6jsvmikI=
=adZu
-----END PGP SIGNATURE-----

--=_mimegpg-www-18928-1057640138-0002--

--=_www-11768-1057640138-0001-2--