分类: BSD
2008-09-28 15:13:40
|
更多選項 2006年3月31日, 下午1時44分 |
prepare yourself to work on the command-line ;-)
- attach the usb-stick to the server
- boot the freebsd installation cd-rom
- go to the "fixit" shell
- CHECK YOUR DMESG WHAT DEVICE YOUR USB STICK ACTUALLY IS!!! (here /dev/da0)
create the future "/"-filesystem on your usb-drive:
wipe everything on the usb-drive:
# dd if=/dev/zero of=/dev/da0 bs=1m
create a new partition table on it with a default slice 1 and make it
bootable
# fdisk -BI /dev/da0
label it for booting freebsd:
# bsdlabel -wB /dev/da0s1
you'll have to edit the disklabel (sometimes you'll have to: # export
EDITOR=/mnt2/usr/bin/vi):
# bsdlabel -e /dev/da0s1
... and change partition a from "unused" to "4.2BSD" as partition type
create the future "/" a.k.a. root-filesystem on it:
# newfs -m 0 -o space /dev/da0s1a
mount the filesystem for installation:
# mount /dev/da0s1a /mnt
install freebsd on /mnt:
# export DESTDIR=/mnt
# cd /dist/
# for i in base manpages catpages
# do
# cd $i; echo y|./install.sh; cd ..;
# done
go to the kernels directory and install a kernel of your choice:
[default is GENERIC kernel; change to "smp" for smp-machines]
# rmdir /mnt/boot/kernel
# cd kernels;
# cat generic.??|tar --unlink -xpzf - -C /mnt/boot
# cd /mnt/boot && mv GENERIC kernel
now, tell freebsd to mount the right root-filesystem:
# echo "/dev/da0 / ufs rw,noatime 1 1" >/mnt/etc/fstab
create your rc.conf.local in /mnt/etc to redefine some settings:
# cat <
#!/bin/sh
tmpmfs="YES"
tmpsize="128m"
varmfs="YES"
varsize="128m"
populate_var="YES"
hostname="daisy.duck.home"
keyrate="fast"
EOFRCCONF
# chmod 0755 /mnt/etc/rc.conf.local
set a new root password manually, if you want (default="")
# chroot /mnt /usr/bin/passwd root
well, there are many other things you could do like configuring
hosts, networks, dns, users, add. filesystems, etc... but this
is another stuff!
cu & have fun!