current 1st boot ― 2006年04月04日 09時21分45秒
# cd /usr/src
# make installworld DESTDIR=/mnt/current
# cd etc
# make distribution DESTDIR=/mnt/current
# cd ..
# make installkernel DESTDIR=/mnt/current
とやれば良さそうだ。今までの作業としては、6.1-BETA4 Release を使い、/usr/src と /usr/obj に mdconfig で作ったファイルを割り当て、build{world,kernel} が終ったところ。/mnt/current にまた、別の md-vnodeファイルを割り当てて、インストールし、qemu で 7-current を起動しようとしているところである。
作業を続けることにする。ところが、make distribution の所で、
# make distribution DESTDIR=/mnt/current
"/usr/src/etc/Makefile", line 6: Malformed conditional (${MK_SENDMAIL} != "no")
"/usr/src/etc/Makefile", line 8: if-less endif
"/usr/src/etc/Makefile", line 34: Malformed conditional (${MK_LPR} != "no")
"/usr/src/etc/Makefile", line 36: if-less endif
"/usr/src/etc/Makefile", line 38: Malformed conditional (${MK_OPENSSH} != "no")
"/usr/src/etc/Makefile", line 42: if-less endif
"/usr/src/etc/Makefile", line 43: Malformed conditional (${MK_OPENSSL} != "no")
"/usr/src/etc/Makefile", line 45: if-less endif
...
の様に止まってしまう。すこし、ソースを見てみたがどこで定義されているか、すぐに判らなかった。全部、作りたいので、コマンドラインから定義する。
# make distribution DESTDIR=/mnt/currnet \
MK_SENDMAIL=yes MK_BIND_MTREE=yes MK_BIND_LIBS=yes \
MK_BIND_ETC=yes MK_KERBEROS=yes MK_OPENSSL=yes \
MK_OPENSSH=yes MK_I4B=yes MK_MAN=yes MK_BIND=yes \
MK_LPR=yes
crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf
dhclient.conf disktab fbtab ftpusers gettytab group hosts
hosts.allow hosts.equiv hosts.lpd inetd.conf login.access
login.conf mac.conf motd netconfig network.subr networks
newsyslog.conf portsnap.conf pf.conf pf.os phones profile
protocols rc rc.bsdextended rc.firewall rc.firewall6
rc.initdiskless rc.sendmail rc.shutdown rc.subr
remote
rpc services shells snmpd.config sysctl.conf syslog.conf
etc.i386/ttys /usr/src/etc/../gnu/usr.bin/man/manpath/manpath.config
/usr/src/etc/../usr.bin/mail/misc/mail.rc
/usr/src/etc/../usr.bin/locate/locate/locate.rc
printcap /mnt/currnet/etc; cap_mkdb -l /mnt/currnet/etc/login.conf;
install -o root -g wheel -m 755 netstart pccard_ether
rc.suspend rc.resume /mnt/currnet/etc; install -o root -g
wheel -m 600 master.passwd nsmb.conf opieaccess /mnt/currnet/etc;
pwd_mkdb -L -i -p -d /mnt/currnet/etc /mnt/currnet/etc/master.passwd
install: wrong number or types of arguments
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make に -n を付けて、実行されるコマンドを見ると、コマンド自体には誤りが無いように見える。どこかの、ディレクトリが抜けているといったところか。
そこで、FreeBSD には man release があったのを思いだし、見ることに。release.2 のところに、「Installs the system into the distribution directories.」とあるので、何か参考になるかと、Makefile を一度見ることにする。
# cd /usr/local/release
# less Makefile
# Install the system into the various distributions.
release.2:
cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
cd ${.CURDIR}/.. && ${CROSSMAKE} ${WORLD_FLAGS} distributeworld \
DISTDIR=${RD}/trees
touch ${.TARGET}
# Make and install the generic kernel(s).
release.3:
とあるので、make distrib-dirs を試してみることに。
# cd /usr/src
# make installworld DESTDIR=/mnt/current
# cd etc
# make distrib-dirs DESTDIR=/mnt/current MK_...
# make distribution DESTDIR=/mnt/current MK_,..
# cd ..
# make installkernel DESTDIR=/mnt/current
...
kldxref: file isn't dynamically-linked
kldxref: file isn't dynamically-linked
# echo "/dev/ad0s1a / ufs rw 1 1" > /mnt/current/etc/fstab
今回はうまくいったと思う。最後に何かでていたが。なお、MK_... の上で指定した全ての make の定義である。
最後の kldxref はあまり気にしなくても良いと思う。細かいことは後々調べる。
/mnt/current を umount し、qemu で起動してみたところ、いつもの起動画面で 7-CURRENT。最初に fstab を作るのを忘れて、起動しなかったのは内緒。
% qemu current -hdb current-src.md -hdc current-obj.md
最近のコメント