Subject: Re: bootable amd64 installation CD
To: Ray Phillips <>
From: Manuel Bouyer <>
List: port-amd64
Date: 07/12/2007 11:49:54
On Thu, Jul 12, 2007 at 09:56:22AM +1000, Ray Phillips wrote:
> Thanks Manuel and Blair.
> >We now have the 'makefs' tool which makes an iso image from a
> >directory tree.  What is it exactly that you'd like to change?
> I was curious to know how you might put some other files on the boot 
> CD, perhaps the NetBSD source, or whatever was convenient. 
> Admittedly that's a problem easily solved by putting the source onto 
> a second, normal CD.  A better example might be to make a CD from 
> which you can boot and install, say, port-alpha, port-sparc and 
> port-amd64.

Look at the stuff in src/distrib/cdrom/ :)

> By the way, I suppose it would be possible to make a CD which would 
> boot an i386 with an i386 install kernel and also an amd64 machine 
> with an amd64 install kernel?  Are the boot loaders the same for both 
> ports?

No, but they could I think. The amd64 boot loader can load an i386 kernel.

> If so, you could make it boot into the i386 install kernel by 
> default, but if you stopped it during the five second countdown 
> before the kernel had begun to load and told it to boot from an amd64 
> install kernel, e.g.:
> > boot cd0a:netbsd.amd64

This would work, expect that right now the bootable files are restrictecd to
8 characters in their name (it's a limitation of our libsa cd9660 support I

> you could proceed with an amd64 installation. Is that correct?
> Of course it would be much easier to use a different boot CD for each 
> port, I was just wondering how it worked.
> >Read the stuff in distrib/common/Makefile.bootcd :)
> >basically you use makefs -t cd9660 and installboot /usr/mdec/bootxx_cd9660
> >(don't forget to put a INSTALL kernel with populated ramdisk on the root
> >of the CD, and /usr/mdec/boot :)
> No doubt the kernel in amd64/installation/cdrom/boot.iso would be suitable?

Yes. It's the same as amd64/binary/kernel/netbsd-INSTALL.gz

> By the way, is it possible (or easy) to reassemble the single file 
> system image contained in 
> amd64/installation/floppy/{boot1.fs,boot2.fs,boot3.fs} which could be 
> mounted using:
> # vnconfig -c vnd0 boot.fs
> # mount_ffs /dev/vnd0d /mnt

I don't know how to do this; maybe with some trick using tar.
But you'll see only one file: the same as
amd64/binary/kernel/netbsd-INSTALL.gz :)

> There are instructions for making a kernel containing a ramdisk here:
> but they don't work in a source tree after building an amd64 release 
> (not in the sources I CVS updated on 21 June anyway):
> # pwd
> /usr/src/distrib/amd64/ramdisks/ramdisk
> # ls -l
> total 10
> drwxr-xr-x  2 root  wheel   512 Jan 18 13:01 CVS
> -rw-r--r--  1 root  wheel   343 Jun  3  2006 Makefile
> -rw-r--r--  1 root  wheel  1072 Jun  3  2006 disktab.preinstall
> -rw-r--r--  1 root  wheel  1562 Jan 18 13:01 list
> -rw-r--r--  1 root  wheel   140 Jun  3  2006 list.inet6
> # make
> #   compile  ramdisk/getcap.o
> /usr/src/obj/tooldir.NetBSD-3.99.20-i386/bin/i386--netbsdelf-gcc -Os 
> -fno-asynchronous-unwind-tables  -Werror     -DSMALL  -nostdinc 
> -isystem /usr/include -c 
> /usr/src/distrib/utils/libhack/../../../lib/libc/gen/getcap.c
> make: 
> exec(/usr/src/obj/tooldir.NetBSD-3.99.20-i386/bin/i386--netbsdelf-gcc) 
> failed (No such file or directory)
> *** Error code 1
> Stop.
> make: stopped in /usr/src/distrib/amd64/ramdisks/ramdisk
> #:
> Is it possible to tell make to use the amd64 tools instead of i386 
> ones?  I built the release using:

Yes, just use the nbmake-amd64 wrapper in $TOOLDIR/bin instead of the
system's make

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference