be_informed_

#include <std$disclaimer.h>

I am a FreeBSD ports maintainer now!
evil_twin
[info]amunix
My first port, wcalc (a powerful arbritrary-precision, command-line calculator), got committed today. The PR (problem report) is here. Thanks Martin Wilke (miwi). I will be maintaining wcalc for FreeBSD henceforth. :-)

Restoring the MBR with FreeBSD boot manager (after Windows eats it!)
evil_twin
[info]amunix
I dual-boot with Windows XP and FreeBSD. Now, I had to re-install XP - which meant that my master boot record (MBR) would be overwritten by Windows XP, and I would lose the ability to dual-boot. Does not matter, as we can always restore the MBR back to the one FreeBSD installed, with the following steps:
1. boot the machine through FreeBSD installation CD 1 (the boot CD)
2. through sysinstall (the FreeBSD installer), go to the Fixit mode
3. start the "live" image, which gives you all the commands
4. issue the following command at the shell prompt:
boot0cfg -B -s [slice_num] [disk]
In my case, the slice_num was 2 (as 1 was for Windows XP), and the disk was ad0.
(boot0cfg -B [disk] will suffice if you don't care for the "default boot selection")
5. exit the Fixit mode, and exit the installer. Remember to remove the boot CD.

You will be again greeted with the famous:
F1 DOS
F2 FreeBSD

Reading this will also help.

Enjoy!

FreeBSD: where are the port configure options?
evil_twin
[info]amunix
/var/db/ports/[port_name]/options is the file which stores configuration options. You can re-configure by doing a "make config" for that particular port.
Tags: , ,

Adventures of printing under Debian GNU/Linux sarge
evil_twin
[info]amunix
For the last month or so, I have been trying to print from my Debian sarge installation - but with no results. I was on the verge of giving up, when I decided to dig more into the details of the CUPS printing system. Finally, I got the printing working - I was missing the `gs-esp' package (Ghostscript PostScript interpreter - ESP version), which was the root cause. I am summarizing below the agony that I went through while I got this thing working. Hope it helps you... :-)

1. Configured CUPS: http://localhost:631/ now shows the web-UI of CUPS. Configured a printer (HP LaserJet 4050 series, with jetdirect (socket://printername:9100/)
2. Tried printing through it, but failed. A simple text document failed. CUPS showed me the error `client-error-not-possible'. Bah!
3. CUPS configuration files generally sit under /etc/cups. Edited cupsd.conf, and changed the logging level to warn. The modified line looked like this
LogLevel warn
4. Tried printing the page again, while tailing /var/log/cups/error_log. The error logged there was
E [10/Mar/2006:12:06:19 +530] Unable to convert file 0 to printable format for job 13!
Aha! There, there. Seems like we are not able to convert the file to a proper printing format.
5. Okay, go and install the `gs-esp' package for Debian using `apt-get install gs-esp'
6. Reload the CUPS printing system using /etc/init.d/cupsys reload.

Try printing NOW! :-)

Though this thing seemed pretty simple, it took me a long time to debug and fix - as I was unaware of CUPS, and the overall printing mechanism. Oh, and to add insult to injury, I noticed that RHEL went away printing happily - guess they load this package by default! :-|

Oh, and as a sidenote, I am facing the same problem with my FreeBSD 6.0-RELEASE box too. I guess this is the same problem there to, so should not be much difficult to fix! :-)

Anyways, now I am happy.

The FreeBSD Handbook - best quality documentation seen till date.
cool
[info]amunix
The FreeBSD Handbook is the *best* documentation I've read till date - simple, clear, and precise.