Last Update: "2008/04/27 23:03:40 makoto"

mklivecd

pkgsrc の中に mklivecd というものがあります。これを使うと簡単に livecd が作れます。
sysutils/mklivecd
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/pkgsrc/sysutils/mklivecd/
2004/09/02 の日記
http://www.ki.nu/~makoto/diary/2004/09/02/#200409021
PLIST: (pkg で入るもの)
man/man8/mklivecd.8
sbin/mklivecd
share/mklivecd/KERN-LIVECD
share/mklivecd/mfs_rcd
share/mklivecd/personal_config
@dirrm share/mklivecd
help:
21:16:53/040829(...sysutils/mklivecd)> /usr/pkg/sbin/mklivecd

        mklivecd: [-v] [-c config_file] [target]

        Target operations:

        kernel      Build and install the Boot kernel image
        iso         Build the ISO 9660 image
        burn        Burn the ISO image via cdrecord
        base        Install the base/x11 sets into ISODIR
        chroot      chroot into the livecd
        clean       Clean the work directory
        config      Create the default configuration file
config:
21:19:20/040829(/export/mklivecd)> /usr/pkg/sbin/mklivecd config
=> Configuration file created, now please edit it.
=> Path: /home/makoto/.mklivecd/mklivecd.conf
ttyp0:makoto@celeron  23:37:57/040902(~)> wc .mklivecd/mklivecd.conf
      41      97    1149 .mklivecd/mklivecd.conf
config
(before edit)
# --*-sh-*--    
#               
# mklivecd - configuration file
# See mklivecd(8) for a detailed description of each variable.
#
# Generated automatically on Sun Aug 29 21:19:24 JST 2004.

# Base directories/options
SOURCEDIR="/usr/src"
PKGSRCDIR="/usr/pkgsrc"
SHAREDIR="/usr/pkg/share/mklivecd"
BASEDIR="/home/makoto/livecd"
WORKDIR="/home/makoto/livecd/work"
ISODIR="/home/makoto/livecd/iso"
BASE_SETS_DIR="/home/makoto/release/binary/sets"
X11_SETS_DIR="/home/makoto/release/binary/sets"
BASE_SETS="etc.tgz base.tgz comp.tgz text.tgz"
X11_SETS="xbase.tgz xcomp.tgz xfont.tgz xserver.tgz"

# Miscellaneous options
ENABLE_X11="no"
MKISOFS_ARGS="-J -R -nobak -v"
CDRECORD_ARGS="-v"
BLANK_BEFORE_BURN="no"
CDROM_DEVICE="15,1,0"
PERSONAL_CONFIG="no"
BOOTKERN="KERN-LIVECD"
KERNEL_NAME="MKLIVECD"
IMAGE_NAME="NetBSD-LiveCD"
PKG_SYSCONFDIR="usr/pkg/etc"
REMOVE_DIRS="altroot usr/share/info"

# Mount arguments
MNT_DEV_ARGS="-o noatime -s 5m"
MNT_ETC_ARGS="-o noatime -s 2m"
MNT_VAR_ARGS="-o noatime -s 10m"
MNT_ROOT_ARGS="-o noatime -s 5m"
MNT_TMP_ARGS="-o noatime -s 10m"
MNT_HOME_ARGS="-o noatime -s 50m"
MNT_PKG_SYSCONFDIR_ARGS="-o noatime -s 1m"
From the man page: TARGETS

A target specifies what mklivecd should do (as in make). The following list describes all supported targets, in the logical order in which you should call them.
config Create a sample mklivecd.conf file. You should edit it after the creation as you will probably want to change the default configuration, espe- cially paths.
kernel Builds the specified kernel $BOOTKERN into the $ISODIR directory.
base Install the $BASE_SETS and $X11_SETS into the $ISODIR directory and prepare the base system for the next target, which is the most important: chroot.
chroot Enters the chroot environment. Uses ksh(1) as default shell.
iso Builds the ISO image $IMAGE_NAME into $BASEDIR and removes all directories specified in $REMOVE_DIRS before it, to save some space.
burn Burns the ISO image $IMAGE_NAME on the CD-ROM with cdrecord(1). Use the $CDROM_DEVICE variable to specify the default device.
clean Cleans the $WORKDIR directory and the base NetBSD tree in $ISODIR, except the CD-ROM boot image /stand/cdlive-boot.fs and the NetBSD kernel /netbsd.