Monday, July 28, 2008

HowTo: Add a new disk to FreeBSD

I needed to add a 120GB IDE drive to my FreeBSD 7.0 install on the old Celeron 266.

Here are the steps:
  1. become superuser
  2. # mkdir /mnt/data
  3. # sysinstall
  4. Choose Configure -> Fdisk
  5. If there are existing partitions press D to delete them
  6. To create a slice press C. To use the entire disk press A
  7. To commit changes press W. A warning pops up, choose YES.
  8. When asked to install a boot manager choose STANDARD
  9. Leave Fdisk by pressing Q
  10. Choose Configure -> Label
  11. Create a new partition by press C. Choose FS.
  12. Type in the mountpoint, e.g. /mnt/data. Take note of the drive device node, e.g. /dev/ad4s1d
  13. Commit changes by pressing W
  14. Exist the sysinstall.
  15. # vi /etc/fstab accordingly, e.g. /dev/sda4s1d /mnt/data ufs rw 2 2 in my case
I essentially used my 120GB drive to be entirely by FreeBSD and mounted under /mnt/data.

Take a look on section 18.3 "Adding disks" of the official FreeBSD Handbook for finner details.

Saturday, July 12, 2008

Tip: Fix GCC upgrade problems on Gentoo

Here's a typical problem on gcc upgrades:
configure:error: installation or configuration problem: C complier cannot create executables.
To solve the problem perform the following:
  1. become superuser
  2. gcc-config -l
  3. gcc-config 1
  4. source /etc/profile
Step 2 lists the available gcc versions. On step 3 select one from the list by number or typing the full name (in my case I only had one available).

Problem fixed. Happy emerging ;)

HowTo: Changing default mouse cursor in Debian

Having just finished installing XFCE4 on Debian Lenny I've came across with X11's default cursor: an ugly jagged black cursor.

Here's the procedure on installing my favourite mouse cursor theme (DMZ-white) and how to change the cursor in Debian with update-alternatives:
  1. become superuser
  2. apt-get install dmz-cursor-theme
  3. update-alternatives --config x-cursor-theme
  4. enter selection number for DMZ-White
Under XFCE4, browse to Settings -> Mouse Preferences -> Cursor and select DMZ-White.

Logout from XFCE4 to commit the changes, Quit -> Logout.

That's it.