Subject: Re: How to make bootable cd
To: None <>
From: Ayamura KIKUCHI <>
List: port-sgimips
Date: 06/29/2003 01:51:42
> > As I understand, the downloadable cd image is ISO format and not bootable. 
> > The actual bootable image is on the CD called diskimage.gz.  But nowhere 
> > there is a documentation tell you how to burn this image to cd and make it 
> > bootable for SGI machine.

> I had made a bootable NetBSD/sgimips CD-ROM on NetBSD/sgimips not IRIX.
> The document <URL:> does
> not explain how to make it.


It is assumed the directory /cdsources exists on your NetBSD/sgimips
system and contains all the files and the directory structure from the
<> distribution.
For example:


The exact contents depend on what you want on your CD. To create the
CD image use the following command:

# This CD image must have both ELF and ECOFF version kernel which
# includes an embedded ramdisk with the installation tools in its root 
# directory.
cd /cdsources
cp -p sgimips/binary/kernel/netbsd-INDY_INSTALL.gz sgimips/binary/kernel/netbsd-INDY_INSTALL.ecoff.gz .
gunzip netbsd-INDY_INSTALL.gz netbsd-INDY_INSTALL.ecoff.gz
mv netbsd-INDY_INSTALL netbsd
mv netbsd-INDY_INSTALL.ecoff netbsd.ecoff
chmod 555 netbsd netbsd.ecoff

# cosmetic :-)
find . -type d -exec chmod 755 {} \;
find sgimips -type f -exec chmod 444 {} \;
chown -R root:wheel .

# You may need to increase the number of input blocks.
dd if=/dev/zero of=/var/tmp/sgimipscd.iso bs=512 count=220k

# Configure the vnode pseudo disk device to allow the regular file to
# be accessed as though it were a disk.
vnconfig vnd0 /var/tmp/sgimipscd.iso

# Create the disk description file /var/tmp/sgimipscd-disktab as
# follows. You must modify it if the number of input blocks is not
# 220k.

# Install the label mentioned above on the vnode disk.
disklabel -w -f /var/tmp/sgimipscd-disktab vnd0 sgimipscd.iso

# Copy various boot programs to the volume header of the vnode disk.
/usr/mdec/sgivol -w boot /usr/mdec/boot.elf vnd0
/usr/mdec/sgivol -w boot.ecoff /usr/mdec/boot vnd0
/usr/mdec/sgivol -w boot.ip32 /usr/mdec/boot.ip32 vnd0

# Build a file system on the partition `a' of the vnode disk.
newfs vnd0a

# Mount vnd0a on the desirable mount point such as /mnt.
mount /dev/vnd0a /mnt

# Copy the whole content under the directory /cdsources to /mnt.
cp -pr /path/to/cdsources/* /mnt

# Burn the complete CD image sgimipscd.iso to a CD. An example of the
# use of cdrecord is the following:
cdrecord -v speed=12 dev=1,6,0 /var/tmp/sgimipscd.iso

# make distclean
umount /mnt
vnconfig -u vnd0
rm -rf /cdsources /var/tmp/sgimipscd-disktab /var/tmp/sgimipscd.iso

I have uploaded this CD image to the following URL.
MD5 (sgimipscd-1.6.1.iso.gz) = 20b3c6b905659db0fcdd77d03866bab3

To install from a NetBSD/sgimips CD-ROM, follow the procedure above
for setting the PROM environment for SystemPartition, OSLoadPartition,
OSLoader and OSLoadFilename. The SCSI and DISK values used should be
for your attached CD-ROM drive, where X is the SCSI controller number
and Y is the SCSI-ID of the CD-ROM. Using the PROM command-line
interface, you can boot the CD-ROM installation kernel as follows:

For ELF version:
>> setenv SystemPartition scsi(X)disk(Y)rdisk(0)partition(8)
>> setenv OSLoadPartition scsi(X)disk(Y)rdisk(0)partition(0)
>> setenv OSLoader boot
>> setenv OSLoadFilename netbsd
>> setenv OSLoadOptions auto
>> boot

For ECOFF version:
>> setenv SystemPartition scsi(X)disk(Y)rdisk(0)partition(8)
>> setenv OSLoadPartition scsi(X)disk(Y)rdisk(0)partition(0)
>> setenv OSLoader boot.ecoff
>> setenv OSLoadFilename netbsd.ecoff
>> setenv OSLoadOptions auto
>> boot

To boot NetBSD/sgimips from internal or external HDD after the initial
installation, modify the PROM environment for SystemPartition,
OSLoadPartition and so on. For example:

>> setenv SystemPartition scsi(0)disk(1)rdisk(0)partition(8)
>> setenv OSLoadPartition scsi(0)disk(1)rdisk(0)partition(0)

If the PROM environment for console is set to d, the console is
assumed to be a terminal connected to the first serial port. In
addition, some systems also accept d2 for a terminal connected to
second serial port.

>> setenv console d

To set all of the PROM nonvolatile environment variables to their
factory defaults (this does not affect the PROM password):

>> resetenv

-- ayamura