I did a custom install using only the base system and GENERIC kernel, later I installed the man pages rather then swap around. Partitioned the drive [ad0] into one large slice [ad0s1] with a 256MB partition for /var, a 256MB swap partition giving me 7.1GB for a root partition. I didn’t see a need to split /usr off of / on such a small system. It was cool not to have many packages installed after using PC-BSD and FreeBSD on my desktop. I quickly setup a text based web browser and cvsup tools via pkg_add.

pkg_add -r lynx
pkg_add -r cvsup_without_gui
pkg_add -r fastest_cvsup && rehash

I used fastest_cvsup to check what the best mirrors would be for getting a current copy of the system sources. Usually I’d just zip it over on a USB stick but my local tree was out of date.

fastest_cvsup -c us

tested all the US mirrors and showed me the fastest ones, I copied the example supvile over to my root directory and set the mirror. [#cp /usr/share/examples/cvsup/standard-supfile /root/]. A quick cvsup [cvsup -g -L 1 /root/standard-supfile] later and I was ready to update the machine. I checked out the make files, the FreeBSD handbook and the text files in /usr/src. I issued the make buildworld command and let her compile for about 5 hours. I then did a make buildkernel and it failed, I removed /usr/src and did a freash cvsup, tried again and failed again. Built a kernel using an alternate method discribed in compiling a custom kernel. Installed the kernel, dropped to single user mode and ran a make installworld. Life was good but the system still showed the wrong patch level, probably because the un updated kernel was running in memory 🙂
A reboot fixed that, tested things to make sure the system was working and no problems with commands not working right. The kernel was made /w sources downloaded a day after world. All was fine

rstf@.launchmodem.com-%uname -a
FreeBSD .launchmodem.com 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #0: Mon Sep 4 22:48:50 EDT 2006 root@.launchmodem.com:/usr/src/sys/i386/compile/GENERIC i386

I’ll setup hostname/custom kernel later and keep tabs of the security mailing list. Since then I have installed porteasy and the ports tree. I checked this link for some advice and isntalled gnu ghostscript via package, I checked on the ftp server to make sure I could get it without X11 support.

pkg_add -r ghostscript-gnu-nox11
I then built cups via porteasy -fb print/cups and took the night off.

I’ve still got to get back to setting up the printer but I’ve all ready begun on the configuration files. My primary goals for right now is to get the printer working and a custom kernel ready. Then I play with packet filter [pf the openbsd firewall] and tighting security. I’ll post more of my changes later since I have them logged.

Vectra II

Today I post a history and a log of my oldest computer here.

When one of my employers (who works in IT) found out I wanted to run FreeBSD but my mom wouldn’t let me repartition her computer (which we shared). He gave me an old office computer, keyboard, and monitor and I bought a Microsoft Basic Optical mouse for it. It gave me my first expirences with FreeBSD 6.0 and PC-BSD 1.0RC1-2. After PC-BSD made it’s 1.0 release, breaking upgradeability (via easy install patches) with the beta releases. After I got a new computer which runs XP and BSD, the machine sat more or less just for a way to quickly check system files or man pages when I needed to look some thing up.

After some time I tried installing NetBSD 3.0 on it, nice system but it just felt wrong after using FreeBSD/PC-BSD so much. So I overwrote it with a large install of FreeBSD. Just incase I might need to fall back to it I setup Xorg and Windowmaker. I wanted to set it up with Samba/CUPS so I could print form it and store some files on it. I never got a chance to finish samba config and the install burned most of the HDD. A few weeks ago I reformated with a bare bone install of FreeBSD 6.1-Release with the intention of learning more about system administration and security. System Specifications:

Model: Hewlett Packared Vectra Vli8 500
Processor: Katmai core, 500Mhz Pentium 3
Memory: 384MB DDR RAM
Storage: 8GB Maxtor IDE drive
Extra: 1 x CD-ROM drive, 1 x 3.5 1.44MB Floppy drive

Source madness

I’ve been working on a logging program, it’s nothing much but it’s good learning fun, usually…

She basically deals with command line options like so:

while ((ch = getopt(argc, argv, "rchtf")) != -1)

        switch
(ch) {

        case 'r':

      
     rflag = 1;  
       
     /* read log, like tail */

      
     break;

      
     case 't':

      
     tflag = 1;  
       
     /* read top of log like head */

      
     break;

        case 'f':

      
     fflag = 1;  
       
     /* log to a diffrent file */

      
     break;

When ever a switch is “On” or “1” we perform an action. When no switches are given we fscanf stdin into a str[256] char array. This is more then enough space and shouldn’t be to memory hungry for right now. Input is taken until a new line is given then we store it in the char array and fprintf it into our logfile + a newline. I toyed around with trying to resize str to match stdin should str be to small, so we could avoid a segfault when trying to write huge entries. Yet allow no major limit on entry size. That nett’d me a good junk pointer warning I’m sure not able to find out all the details of.

Right now I’m working on trying to get the t switch working using the source for the head command as a reference. So far no real luck, we never get any output from it. It seems to break apart in the line of execuition so I know I’ve got to change things around.

I know I could just pass things along to head and tail via sh, but what is the fun in that? I’ll figure this out later must sleeeeeeeeeeeeppp!!!!

/* I don’t do HTML ! */

Day one

So far LJ seems a nice site, maybe I should replace my logging files with it. I’ll try to keep my blog orderly but I’m not the most structured person hehehehe.

Primary subjects: Computers, Programming, BSD and Unix like operating systems, trials and tribulations in my studies and learning of computers and technology. And life as a working schmuck and JNCO of one of the best Coop teams to ever play SWAT/R6.