FreeBSDonUSBFreeBSD を USBメモリにインストールするメモ以下の2箇所よりコピペしただけ. まだ未確認. http://typo.submonkey.net/articles/2006/4/13/installing-freebsd-on-usb-stick-episode-2 Installing FreeBSD on a USB stick, episode II Posted by Ceri Davies on 4/14/2006 I previously wrote about putting a 6.1-BETA4 FreeBSD installation on a USB stick. Since the bugs that were in the 6.1-BETA4 installation have been fixed, plus to get 6.1-RC1 tested, here are updated instructions (which should work with 6.1-RELEASE as well). These instructions result in a downloadable image suitable for dding direct to a USB stick of 512MB or larger. arved pointed out that it's good to minimize the amount of writes done to USB sticks (and flash memory in general), and I've got some pointers in these instructions, but I haven't really looked at this point. If you are looking to install FreeBSD from a USB stick, you should check out Dario Freni's script. Note I assume that, like me, you don't have any SCSI disks and so your USB stick will show up on da0, at least while you're preparing it; we're using GEOM disk labels in the image so we don't care so much where the disk appears in the device tree. I'm also assuming that you don't care much for the data on your USB stick. The installation You'll need to grab the disc1 ISO --- get the latest one.
That's it for now. http://www.karashi.org/~poppen/d/20071214.html#p01 ただ、上記サイトのやり方だと、/homeがUSBメモリ上にあるので、/homeでばんばん作業をする必要がある時には、メディアの寿命が心配ということで、/homeもMFSにすることにした。 以下は作業内容。すべてUSBにインストールしたFreeBSDに対して行なう。
populate-homeスクリプトの内容は下記の通り。 #!/bin/sh # PROVIDE: populate_home # REQUIRE: mountcritremote # BEFORE: DAEMON . /etc/rc.subr populate_home_enable=${populate_home_enable-"NO"} populate_home_data=${populate_home_data-"/etc/home"} name="populate_home" rcvar=`set_rcvar` stop_cmd=":" start_cmd="populate_home_start" populate_home_start() { if [ -d ${populate_home_data} ]; then cd ${populate_home_data} /usr/bin/find . -print | /usr/bin/cpio -dump --quiet /home fi echo '.' } load_rc_config "$name" run_rc_command "$1" 上記の作業で、MFSの/home(容量は16MB)が起動時にmountされ、/etc/homeの内容が/homeにコピーされる。 populate-homeのPROVIDEやREQUIRE、BEFOREあたりはちと自信がないんだけど、 とりあえず、手元の環境では動いている。 | サイト移動/改修中 More ... |