NetBSD Documentation:Bootable CD ROM How-To |
/cdsources/i386/..... /cdsources/sparc/.....
cd /cdsources/alpha/binary/sets tar -zxvf base.tgz ./usr/mdec/boot ./usr/mdec/bootxx_cd9660 mv -f ./usr/mdec/boot /cdsources/boot mkdir /tmp/mdec.alpha mv -f ./usr/mdec/bootxx_cd9660 /tmp/mdec.alpha/bootxx_cd9660 rmdir ./usr/mdec cd /cdsources/alpha/installation/instkernel cp -f netbsd.gz /cdsources/netbsd.gzNow create the ISO 9660 image.
mkhybrid -o output.iso -a -l -J -r -L /cdsourcesThe second step is to install NetBSD/alpha disk and CD-ROM bootstrap software using installboot(8). This is done with the following command:
installboot -v output.iso /tmp/mdec.alpha/bootxx_cd9660Note that this second step must either be performed on a NetBSD/alpha machine or you must compile the alpha installboot program for your machine. The alpha installboot program should compile and run correctly under NetBSD/i386.
mkhybrid -o output.iso -b i386/installation/floppy/boot-big.fs \ -c boot.catalog -a -l -J -r -L /cdsourcesThis will create a file, output.iso, which is the CD image. The options are:
boot cd:,/path/to/files/ofwboot.elf(or .xcf instead of .elf if you have an older machine) The path can be left off if the files are in the top level of the CD directory hierarchy so it is recommended to put them there:
cp -f /cdsources/macppc/binary/kernel/ofwboot.elf /cdsources cd /cdsources/macppc/binary/sets/ tar -zxvf kern.tgz mv -f netbsd /cdsources/netbsd.macppcNote that ofwboot can read compressed kernels, so the kernel can be gzipped if you're tight on space. The image is created by the following:
mkhybrid -o output.iso -a -l -J -r -L /cdsources
cd /cdsources/pmax/binary/sets tar -zxvf base.tgz ./usr/mdec/boot.pmax ./usr/mdec/bootxx_cd9660 mv -f ./usr/mdec/boot.pmax /cdsources/boot.pmax mkdir /tmp/mdec.pmax mv -f ./usr/mdec/bootxx_cd9660 /tmp/mdec.pmax/bootxx_cd9660 rmdir ./usr/mdec cd /cdsources/pmax/binary/kernel cp -f install.gz /cdsources/netbsd.pmax.gz gunzip /cdsources/netbsd.pmax.gzNow create the ISO 9660 image.
mkhybrid -o output.iso -a -l -J -r -L /cdsourcesThe second step is to install NetBSD/pmax disk and CD-ROM bootstrap software using installboot(8). The installboot(8) command is used in the following way:
/usr/mdec/installboot -v output.iso /usr/mdec/bootxx_cd9660Note that this second step must be performed on a NetBSD/pmax machine. However, it is acceptable for the ISO image to be NFS mounted on the NetBSD/pmax machine from a remote system if the image is not being built locally. Alternatively, starting with NetBSD-1.5.1, the NetBSD/pmax installboot program can be compiled on other NetBSD architectures. This allows the generation of a bootable image using a non-pmax machine.
mkhybrid -o output.iso -a -l -J -r -L /cdsourcesNow get a bootable floppy image. For NetBSD-1.5.1/sparc, this image may be found at ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.5.1/sparc/installation/bootfs/boot.fs.gz. The final step is to rewrite the ISO image with (a) a sun disklabel at the start, (b) the original image at the end, and (c) with the right offset/size values in the disklabel for the bootloader. The program mksunbootcd will perform this task. If mksunbootcd is not installed on your system, it can be installed from the mksunbootcd package. If you're creating the image on a non-NetBSD system, you can try compiling mksunbootcd on your system. The sources are available at ftp://ftp.netbsd.org/pub/NetBSD/misc/mksunbootcd/. To use mksunbootcd use the following:
mksunbootcd output.iso boot.fs boot.fs boot.fsThe bootable image is listed 3 times corresponding to what will get booted by a sun4, sun4c and sun4m system respectively. If you have different bootable images for the 3 machines, you can do something like:
mksunbootcd output.iso boot-sun4.fs boot-sun4c.fs boot-sun4m.fsNote that mksunbootcd rewrites the output.iso file, so don't run it multiple times. As a note, this step is fine to perform on a NFS mounted directory. Ie, if your ISO image is on a remote machine, it can be mounted on a NetBSD machine for running mksunbootcd without requiring extreme amounts of data to be transfered over the network.
cd /cdsources/vax/binary/sets tar -zxvf base.tgz ./usr/mdec/boot ./usr/mdec/xxboot mv -f ./usr/mdec/boot /cdsources/boot.vax mkdir /tmp/mdec.vax mv -f ./usr/mdec/xxboot /tmp/mdec.vax/xxboot rmdir ./usr/mdec cd /cdsources/vax/binary/kernel cp -f netbsd.INSTALL.gz /cdsources/netbsd.vax.gz gunzip -f /cdsources/netbsd.vax.gzNow create the ISO 9660 image.
mkhybrid -o output.iso -a -l -J -r -L /cdsourcesThe second step is to install NetBSD/vax disk and CD-ROM bootstrap software using installboot(8). The installboot(8) command is used in the following way:
/usr/mdec/installboot -v output.iso /usr/mdec/xxbootNote that this second step must be performed on a NetBSD/vax machine. However, it is acceptable for the ISO image to be NFS mounted on the NetBSD/vax machine from a remote system if the image is not being built locally. Alternatively, the vax installboot program can be compiled on a NetBSD machine of a different architecture.
sh mkhybrid -v -v -o output.iso -b i386/installation/floppy/boot-big.fs \ -c boot.catalog -a -l -J -r -L /cdsources 2>&1 | tee /tmp/mkhybrid.log exitNote that the appearance of the -v flag twice is required.
mksunbootcd output.iso syboot-143.fs syboot-143.fs syboot-143.fs
grep "usr/mdec.pmax/bootxx_cd9660" /tmp/mkhybrid.logYou should see something like:
148017 148020 cdsources/usr/mdec.pmax/bootxx_cd9660The first number (148017 in this particular case) is the ISO block you need to pass to the installboot program. Now run the installboot program:
installboot -i 148017 -v output.iso /tmp/mdec.pmax/bootxx_cd9660
grep "usr/mdec.vax/xxbootxx" /tmp/mkhybrid.logYou should see something like:
148017 148020 cdsources/usr/mdec.vax/xxbootThe first number (148017 in this particular case) is the ISO block you need to pass to the installboot program. Now run the installboot program:
installboot -i 148017 -v output.iso /tmp/mdec.vax/xxboot
installboot -vs output.iso /tmp/mdec.alpha/bootxx_cd9660
mkisofs -a -b i386/installation/floppy/boot-big.fs -c boot.catalog \ -f -l -r -J -L -o output.iso /cdsources/The options are:
vnconfig -c vnd0 output.iso mount -t cd9660 /dev/vnd0c /mntPlease note that on i386 systems, you should /dev/vnd0d instead of /dev/vnd0c. Now you can cd to /mnt and explore your newly created CD image. To unmount the image, do the following:
umount /mnt vnconfig -u vnd0
mount -t iso9660 -o ro,loop=/dev/loop0 output.iso /mntand to unmount the CD image:
umount /mnt
For older versions of Solaris, you might want to try the fbk driver written by Joerg Schilling. The fbk driver is available from ftp://ftp.fokus.gmd.de/pub/unix/kernel/fbk/ Please refer to the fbk documentation for installation instructions. Once the fbk driver is installed on your system, you can mount the ISO 9660 image with the following command:
mount -F fbk -o ro,type=hsfs /dev/fbk0:output.iso /mntand to unmount the CD image:
umount /mnt
cdrecord -v speed=4 dev=/dev/cd1c output.isoYou will need to substitute the correct speed for your CD writer and the correct device for your system (for i386 it would be /dev/cd1d).
|
|