| 1. sysid 7 | (NTFS) | 10GB resized from original NTFS partition |
| 2. sysid 15 | (Extended DOS, LBA) | 10GB DOS Entended partition for DOS/Data/Linux |
| 3. sysid 165 | (FreeBSD/NetBSD/386BSD) | 10 GB FreeBSD 4.x |
| 4. sysid 165 | (FreeBSD/NetBSD/386BSD) | 10 GB FreeBSD 5.x |
The command "dd if=/dev/ad0s1 bs=512 | gzip -c > ad0s1_backup.gz" is fine
for this work. To get better compression ratio,
this tip from g4u ("ghost for unix") is
helpful.
| Effectively, you just fill up the disk's unused blocks with zero-bytes. Open file for writing, stuff in 0-bytes until the disk is full, then close the file and remove it. The result is that all unused blocks were used by the file, and filled with data that g4u can then compress easily. Usually the operating system will just mark the blocks as unused, without changing the actual data content. |
"gunzip -dc ads1_backup.gz | dd of=/dev/ad0s1 bs=512".
| 1. / | 512 MB |
| 2. swap | 512 MB |
| 3. /var | 128 MB |
| 4. /tmp | 64 MB |
| 5. /usr | 7 GB |
| 5. /home | the rest ~ 1 GB |
*default host=cvsup13.FreeBSD.org *default base=/usr *default prefix=/usr *default release=cvs *default delete use-rel-suffix #*default tag=RELENG_4_8 *default tag=RELENG_5_2 *default compress src-all ports-all tag=. doc-allHint: If you don't know which cvsup host to use, try the port /usr/ports/sysutils/fastest_cvsup.
doc/es* doc/ja* doc/ru* doc/zh* doc/fr* doc/de* doc/it* doc/pl* doc/pt* doc/el* doc/sr* doc/nl* doc/no* ports/chinese* ports/german* ports/japanese* ports/korean* ports/russian* ports/vietnamese* ports/portuguese* src/share/doc/es* src/share/doc/ja* src/share/doc/ru* src/share/doc/zh* src/share/doc/fr*
"find /var/tmp/tmproot -type f" may be helpful. Select the one that
you want to replace your old version. You can remove unused files later ( you may
need to run "chflags noschg temproot/var/empty/" to remove
the system immutable flag on "empty" folder before you can delete it).
FreeBSD 4.8
CPUTYPE=i686 CFLAGS= -O -pipe CFLAGS+=-malign-loops=4 -malign-jumps=4 -malign-functions=4 # To avoid building various parts of the base system: NO_FORTRAN= true # do not build g77 and related libraries NO_I4B= true # do not build isdn4bsd package NO_LPR= true # do not build lpr and related programs NO_OBJC= true # do not build Objective C support NOUUCP= true # do not build uucp related programs IPFW2=yes # Use IPFW2
FreeBSD 5.2
CPUTYPE=p4
CFLAGS=-O -pipe
CXXFLAGS+= -fmemoize-lookups -fsave-memoized
PERL_VER=5.6.1
PERL_VERSION=5.6.1
PERL_ARCH=mach
NOPERL=yo
NO_PERL=yo
NO_PERL_WRAPPER=yo
#NO_FORTRAN= true #Need by ImageMagic
NO_I4B= true
NO_IPFILTER= true
NO_LPR= true
NO_OBJC= true
NO_KERBEROS= true
#Port specific parameters
A4= true
WITHOUT_CUPS= yes
WITH_GHOSTSCRIPT_AFPL= yes
WITH_GTK2= yes
WITH_LIBMAP=yes
cpu I686_CPU ident SATELLITE maxusers 0 options CPU_ENABLE_SSE options CPU_FASTER_5X86_FPU options NO_F00F_HACK options USER_LDT options VESA pseudo-device splash #Need for slash screen options SC_PIXEL_MODE #Need for 100x37 text mode options IPFIREWALL options IPDIVERT options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=100 options DUMMYNET #options IPFW2 #Don't need for FreeBSD 5.xDon't worry about the device that you comment out. FreeBSD compiles those device drivers as modules and you can later load them with kldload or put their name in /boot/loader.conf to load at boot time.
make buildkernel KERNCONF="SATELLITE"
make installkernel
mergemaster -ar
make -j4 buildworld
shutdown now
make installworld
"find dir \! \( -newer /kernel \) -print" where dir are
/usr/bin,/usr/sbin,/bin,/sbin ,/usr/lib ,/usr/libexec and /etc may help you to locate these files.FreeBSD 4.x
(1) Edit /usr/ports/x11/nvidia-drive/Makefile, change the lines
PORTVERSION=1.0.4365
MASTER_SITES= http://download.nvidia.com/freebsd/1.0-4365/ \
DISTNAME=NVIDIA-FreeBSD-x86-${PORTVERSION:S/0./0-/}
-->
PORTVERSION=1.0.3203
MASTER_SITES= http://download.nvidia.com/freebsd/1.0-3203/ \
DISTNAME=NVIDIA_FreeBSD-${PORTVERSION:S/0./0-/}
(2) Edit /usr/ports/x11/nvidia-driver/distfile, change
MD5 (NVIDIA-FreeBSD-x86-1.0-4365.tar.gz) = e14d9f2668746ee4d8b47e1c9dbc78af
-->
MD5 (NVIDIA_FreeBSD-1.0-3203.tar.gz) = b982db9e898a0f3a46c2bf9d15c320d2
FreeBSD 5.x
You need patch files to make 3203 compilable in 5.x. The last nvidia-driver version of 3203 that I found is the version that distribute with FreeBSD 5.1.#ports-all tag=. ports-x11 tag=RELEASE_5_1_0Don't forget to update your ports tree after install the nvidia-driver port to the current version.
"operator" group.Only root and
operator are allow to access cdrom without mount command.
Want to see my entire packages list as of 2004/02/14 ?. Click here.
Note:portupgrade -iRf nautilus2, help you to find and recompile those
ports.
PreferredAuthentications password,publickey,keyboard-interactive,hostbasedNote: when you use scp or ssh to remote host , don't forget -C option to compress the data.
#!/bin/sh
case "$1" in
start)
/usr/sbin/moused -3 -p /dev/psm0 -I /var/run/moused_psm.pid
vidcontrol -m on
;;
stop)
kill -9 `cat /var/run/moused_psm.pid`
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac
SOUND_DRV=ich
case "$1" in
start)
echo ""
/sbin/kldload snd_$SOUND_DRV
;;
stop)
/sbin/kldunload snd_$SOUND_DRV
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac
#!/bin/sh
# start
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
ROUTE=/sbin/route
NTPDATE=/usr/sbin/ntpdate
GREP=/usr/bin/grep
AWK=/usr/bin/awk
PING=/sbin/ping
ntpd="192.5.41.41 132.163.4.102 129.6.15.28"
#ntpd="132.163.4.102 129.6.15.28 128.138.140.44 137.189.6.18 165.21.110.7 63.149.208.50 216.200.93.8 205.188.185.33"
gateway=`$ROUTE -n get default | $GREP gateway | $AWK -F":" '{print $2}' `;
if [ "X$gateway" = "X" ]
then
echo "No gateway found"
exit 1
fi
#Ping gateway
$PING -c 1 -t 1 -q $gateway 2>&1 > /dev/null
if [ $? -ne 0 ]
then
echo "Can not reach gateway [$gateway]"
exit 2
fi
$NTPDATE -s $ntpd
fi
allscreens_flags="-g 100x37 VESA_800x600" apm_enable="YES" apmd_enable="YES" check_quotas="NO" defaultrouter="192.168.0.254" hostname="satellite.net0.intranet" ifconfig_fxp0="inet 192.168.0.11 netmask 255.255.255.0" inetd_enable="NO" kern_securelevel_enable="NO" pccard_ifconfig="NO" sendmail_enable="NO" sshd_enable="YES" usbd_enable="YES" linux_enable="YES" syslogd_flags="-s -s"
kern.ipc.shmmax=67108864 kern.ipc.shmall=32768 hw.snd.pcm0.vchans=4 hw.snd.maxautovchans=4 kern.coredump=0 #USB Floppy #kern.cam.da.no_6_byte=1 #Remove for FreeBSD 5.x #NVIDIA hw.nvidia.registry.SoftEDIDs=0 hw.nvidia.registry.EnableAGPFW=1 hw.nvidia.registry.Mobile=2The kern.cam.da.no_6_byte allow me to read from USB Floppy but not write. DO NOT mount your USB Floppy disk with rw, it can break your system.
, is
my favorite one taken from FreeBSD Splash Screens
userconfig_script_load="YES" autoboot_delay="3" # Delay in seconds before autobooting splash_bmp_load="YES" bitmap_load="YES" # Set this to YES if you want splash screen! bitmap_name="/boot/obi_chuck.bmp" # Set this to the name of the bmp or pcx file
FreeBSD 5.x
# Device Mountpoint FStype Options Dump Pass# /dev/ad0s3b none swap sw 0 0 /dev/ad0s4b none swap sw 0 0 proc /proc procfs rw 0 0 /dev/ad0s4a / ufs rw,noatime 1 1 /dev/ad0s4g /home ufs rw,noatime 2 2 /dev/ad0s4e /tmp ufs rw,noatime 2 2 /dev/ad0s4f /usr ufs rw,noatime 2 2 /dev/ad0s4d /var ufs rw,noatime 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 /dev/ad0s3a /fbsd4 ufs rw,noatime 3 3 /dev/ad0s3h /fbsd4/home ufs rw,noatime 4 4 /dev/ad0s3f /fbsd4/tmp ufs rw,noatime 4 4 /dev/ad0s3g /fbsd4/usr ufs rw,noatime 4 4 /dev/ad0s3e /fbsd4/var ufs rw,noatime 4 4 linproc /linproc linprocfs rw 0 0 /dev/ad0s1 /dos_c ntfs ro,noauto 0 0 #Extended DOS partition ( 2 logical drives ) /dev/da0s5 /dos_d msdos rw,noauto 0 0 /dev/da0s6 /dos_e ntfs ro,noauto 0 0
FreeBSD 4.x
# Device Mountpoint FStype Options Dump Pass# /dev/ad0s3b none swap sw 0 0 /dev/ad0s4b none swap sw 0 0 proc /proc procfs rw 0 0 /dev/ad0s3a / ufs rw,noatime 1 1 /dev/ad0s3g /home ufs rw,noatime 2 2 /dev/ad0s3e /tmp ufs rw,noatime 2 2 /dev/ad0s3f /usr ufs rw,noatime 2 2 /dev/ad0s3d /var ufs rw,noatime 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 linproc /linproc linprocfs rw 0 0 /dev/ad0s1 /dos_c ntfs ro,noauto 0 0 #Extended DOS partition ( 2 logical drives ) /dev/da0s5 /dos_d msdos rw,noauto 0 0 /dev/da0s6 /dos_e ntfs ro,noauto 0 0
.
The Background image
was taken from
NASA Astronomy Picture of the Day.
GTK theme is standard Metal theme. meta-city theme is My own theme.
I don't like gnome 2.2 splash screen, so I change it to the obi_chuck as in FreeBSD splash screen. To install new splash screen, just replace /usr/X11R6/share/gnome/pixmaps/splash/gnome-splash.png with a new splash image.
Option "XkbRules" "xfree86"
Option "XkbModel" "pc101"
Option "XkbLayout" "th"
Option "XkbOptions" "grp:ctrl_shift_toggle,grp_led:scroll"
The problem with xkb is that, you need to run the application in Thai locale (which is not exists in FreeBSD).
Otherwise, X11 keyboard to string such as XLookupString will not return Thai string, so some applications
such as xedit,terminal emulator will ignore Thai input.
Section "Files"
...
FontPath "/usr/local/thai/fonts/iso8859-11/"
FontPath "/usr/local/thai/fonts/x11-fonts/"
FontPath "/usr/local/thai/fonts/TTF/"
EndSection
<fontconfig> <dir>/usr/local/thai/fonts/TTF</dir> </fontconfig>If you already has <fontconfig> tag , just insert the <dir> tag. Make sure that the dir name match the name in the XF86Config.
The document theme copy from
FreeBSD Handbook
For questions about this documentation, e-mail <cws@miraclenet.co.th>
Last update : $Id: setup.html,v 1.24 2004/12/02 00:32:17 cws Exp $
Chatchawan Wongsiriprasert