After doing a default install I need to mirror my root hard drive. In the past I would have used ATA or CCD (Concatenated Disk Driver). I also have used Vinum which is a logical volume manager similar to Varitas Volume Manager or LVM in AIX. Reading though the notes and documentation I see that Vinum has been re-implemented as GEOM based and they have add a very easy subset called GEOM Mirror. That is what I went with.
All information and procedures was gleam from the always excellent FreeBSD Docs. There usually is no need to go else where, I find it convenient to distill the essential material down to these post purely for ease and convenience. These are instruction that while generally true are geared towards what I am doing.
Mirroring Whole Disks
- Before building the mirror, enable additional debugging information and opening access to the device by setting the kern.geom.debugflags.
- Begin the process by storing meta-data information on the primary disk device.
gmirror label -vb round-robin gm0 /dev/da0
Warning: Creating a mirror out of the boot drive may result in data loss if any data has been stored on the last sector of the disk.
- load the /boot/kernel/geom_mirror.ko kernel module
- Enable loading of the geom_mirror.ko kernel module during system initialization
echo 'geom_mirror_load="YES"' >> /boot/loader.conf
- Edit the /etc/fstab file, replacing references to the old da0 with the new device nodes of the gm0 mirror device.
- Reboot the system
- Using the
mount command check the gm0 is being used.
- Add your second disk
gmirror insert gm0 /dev/da1
- Check status with
After the box that was hosting the old FreeBSD box (version 6.x) finally gave up the ghost and knowing that I wanted to skip 7.x, I just finished a fresh install of 8.1. After setting up my accounts the next step is updating and patching. All material comes from the FreeBSD Handbook.
This updates source, world and kernel.
- I choose to use the defaults in
- Fetch the updates
- Apply the updates
- Reboot the systems
shutdown -r now
If a rollback is needed the
Updating Ports Collections
- Download updated ports
- The first time
portsnap is executed, you have to use extract to install the downloaded files.
- Rest of the time
portsnap update is OK.
Updating Documentation Sources
cvsup -h cvsup1.us.FreeBSD.org -g -L 2 /usr/share/examples/cvsup/doc-supfile
Cleaning up Obsolete files, Directories and Libraries
- check for obsolete files and libraries
- If any obsolete files are found, deleted
portsclean -D will purge old distfiles.
portsclean -C will clean all ‘work’ directories.
portsclean -L will clean up unused libraries in /usr/local/lib/compat/pkg.
portsclean -P will clean up outdated packages.
I am playing around with my RSS feeds and see what items that can be added to them.
Posted in Personal
This is a test of rss injection, for another project.
To add a line break in an excel cell:
Alt + Enter
Control + Option + Return
I have been slack about keeping my BSD server up to date. I have a replacement box ready to install FreeBSD 7, but I noticed that 7.1 is about ready to move to RELEASE and 8 should be out shortly. Until the I decide which way I want to move, I have decided to update to the latest version of 6.x.
- Find the version you are currently on
# uname -a
FreeBSD xxx.xxx.org 6.2-RELEASE-p11 FreeBSD 6.2-RELEASE-p11 #0: Wed Feb 13 06:44:57 UTC 2008 firstname.lastname@example.org:/usr/obj/usr/src/sys/GENERIC i386
- Create a cvsup file with the following information:
*default delete use-rel-suffix compress
This will update source, ports and docs.
- Clean your source tree
cd /usr/src && make cleanworld
- Update your sources, ports and docs.
cvsup -L 2 ./cvsupfile
Go get a cup of coffee and relax for awhile. This step takes some time.
- Make world & kernal, then install kernel
# cd /usr/src
# make buildworld
# make buildkernel
# make installkernel
# nextboot -o "-s" -k kernel
- The system will come up in single user mode, check and mount the file system.
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
- Finish updating system
# cd /usr/src
# mergemaster -p
# make installworld
# mergemaster â€“Ui
- Check that update worked
# uname -a
# FreeBSD leon.agitators.org 6.4-RELEASE-p1 FreeBSD 6.4-RELEASE-p1 #0: Sat Jan 3 15:31:37 EST 2009 email@example.com:/usr/obj/usr/src/sys/GENERIC i386
Open Disk Utility and use the New Image from Folder menu item to create an image. Use uncompressed and use the CD/DVD master option.
Use hdiutil to convert cdr to iso
hdiutil makehybrid -iso -joliet -o Master.iso Master.cdr
This will create an ISO/Joliet .iso file.