archives technorata gallery music

Setup a backup server with FreeNAS

February 3rd, 2008
freenas.jpg

A few years ago my data added up to a few Gig and backups were a simple matter of adding another mirrored hard drive to my one trusty Dell 700XPS. However, as my home network has expanded with music, image and video data and several computers and laptops, I found the need for a dedicated backup box essential.

My requirements were simple. It needed to be free, easy to configure, scaleable, somewhat well documented and have miserly system requirements. There are many open source solutions out there but I decided to implement FreeNAS.


The box I used for this had the following specs:

  • System: Dell PowerEdge 400SC
  • Proc: Intel Pentium 4 Northwood 2.8Ghz
  • Memory: 2Gb - 4 x 512Mb
  • Video: Rage XL
  • OS drive: 40Gb Seagate Barracuda 7200.7 UltraATA
  • Data drive: 200Gb Western Digital WD2000JB
  • Optical drive: LG Superdrive DVD/CD-RW

Just a quick note on the above system specs. While a 2.8Ghz Northwood and 2Gig of RAM is by no means bleeding edge performance, I also realize it’s not exactly miserly. However, it’s the only spare system I had and I’m not going out to buy a weak Celeron system with 256Megs of RAM to demonstrate how efficiently FreeNAS uses system resources. With that said, let’s go on to the installation.

INSTALLATION

  1. Download the lastest stable image from the FreeNAS site and burn image to CD
  2. Boot up your system with FreeNAS LiveCD (not the embedded *.img)
  3. Hit Enter when the FreeNAS splashpage appears.
  4. Select 9 to install to your harddrive
  5. Select 3 to install full release
  6. FreeNAS setup will list the detected CDROM. Mine was acd0
  7. The next prompt was to enter the name of the CD-ROM drive, I entered acd0 that the install routine detected.
  8. A list of detected drives will be listed and a prompt Enter the name of the hard drive. This drive will be the FreeNAS installation drive not the data drive.
  9. My listed drives were:
    ad0: 38146MB
    ad1: 190783MB
  10. I typed the following for my OS drive - ad0
  11. At the next prompt, type in the size of your OS partition. I’m utilizing the entire disk so I typed the following: 38146
  12. The OS will install and then you are free to reboot the system
  13. The next step is to assign the LAN interfaces.
  14. After entering back into the setup menu, select 1 - Assign Interfaces.
  15. My installation automatically detected the interface - in my case em0 and that is what I typed when prompted to enter my LAN interface.
  16. I don’t want to configure additional (Optional) interfaces, so in the next screen I just hit the Enter key and in the next screen applied any changes by typing y
  17. In the main menu I selected 2 - Set LAN IP Address
  18. I typed n when asked if I wanted to use DHCP for IPv4 and then entered my preferred static IP address
  19. My LAN subnet bit count was 24 and my IPv4 gateway was my router at 192.168.1.1
  20. I also added my DNS information, external Comcast but I’m not sure if I should have just pointed it to my internal Linksys router - not sure if it does forwarding automagically.
  21. I configured IPv6 to configure automatically and then sent a test ping to my router. Looks good so far.
  22. So you should get a message about the assigned address and that you can access the WebGUI there.
  23. I logged on to mine at 192.168.1.30 - w/username: admin and password freenas.
  24. Once logged in, I went ahead and modified some of my network settings. I changed to reflect my network name suffix and also added a DNS server address. I also went ahead and changed the WebGUI password.
  25. Go to Disks -> Management and click on the + sign.
  26. On the next page, select the disk you want to use as your Backup directory. In my case, ad1 as noted earlier in these instructions
  27. In the Preformated FS drop down, we will leave the value as Unformated, click Add and in the next windowApply
  28. Next we want to format the disks. I selected ad1 and UFS with soft updates
  29. Now to mount the disk we use Disks -> Mount Point, click the + sign and select the disk to mount. I used the following values:
    Partition: EFI GPT
    File System: UFS
  30. Click Save and Apply
  31. Now we need to start a few daemons, specifically enabling CIFS/Samba
  32. Click the Services -> CFS/SMB link and check the Enable box.
  33. Leave all the default values and click the Save button for now. We’ll go back and change things as needed.
  34. Apparently as of version 0.685b we need to assign shares. So click the Shares tab and enter the appropriate information. I used the browse button to select the right syntax for the file path and also unchecked the Hosts deny option.
  35. At this point, in a Windows system I am able to type \\192.168.1.30 in the Run command and access the share. On Gutsy I can open Nautilus, click Go -> Location and type in the ip address and access the share as well.
  36. Now that we’ve tested CFS/SMB access, we want to go ahead and allow our *nix systems native access with NFS. Locate and click Services -> NFS
  37. Check the enable check box. Enter the correct subnet that will have access, including the subnet mask which in my case was 192.168.1.0/24. Click Save and Restart and make sure that enable is checked. Let’s test now.
  38. Well, I see it but it’s not listed in my normal network because I haven’t edited those network settings. It shows up in Workgroup and the only place i can see to change that is in CFS/SMB.
  39. Change the workgroup name to whatever you network name is - in my case it is homenet.local Click Save and restart
  40. Checked it again and there it is. Easy.

RIAA website hacked

January 21st, 2008
glider.jpeg

Ah, this is sweet justice. What kind of crappy web team do they have that leaves such a high profile site open to SQL Injection attack? n00bz.

MacBook with Ubuntu Feisty Fawn 7.04

November 26th, 2007
ubuntulogo.png

The last few years I have really become a fan of the Linux distribution, Ubuntu. I’ve tried other distro’s and they each have their good points but what I liked about Ubuntu was the large community and expansive support. Not only that, but Ubuntu is a snap to get up and running. Yes, I’ve set up a Debian and a Slackware box but at this point I’m more impressed by a distro that I can start using immediately with minimum fuss.

That being said, I am also a fan of the latest Apple MacBook. It’s small, powerful and now that it’s powered by Intel processors, I don’t have to settle for a PPC version of Linux. So below is a down and dirty on the steps I took to set up my MacBook with Ubuntu 7.04. Your mileage may vary….

INSTALLATION

  1. Insert CD: Follow all default instructions, (US Keyboard, EST time zone, Partition entire disc, etc…)
  2. After installation is complete reboot and enter configuration phase

HOSTNAME

  1. Open System > Administration > Network and change hostname to nixbook.somenet.local. In addition, add correct DNS settings.
  2. In Hosts tab edit IP address with correct Alias information (192.168.1.x = nixbook.somenet.local, 127.0.1.1 = nixbook.somenet.local, 127.0.0.1 = localhost, nixbook.somenet.local)

REPOSITORIES

  1. Go to http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_add_extra_repositories to edit correct repositories.
  2. Run sudo apt-get update to acquire all updates

DISPLAY RESOLUTION

  1. sudo apt-get install 915resolution
  2. Ctrl + Alt + Del to restart GDM and then edit display settings.

COMPILE TOOLS

  1. sudo apt-get install build-essential or sudo aptitude install build-essential

TOUCHPAD

  1. see http://help.ubuntu.com/community/macbook
  2. For touchpad delay, this site has some good info….

FONT SMOOTHING

  1. add the following lines to /etc/apt/sources.list
    deb http://wwww.telemail.fi/mlind/ubuntu feisty fonts
    deb-src http://www.telemail.fl/mlind/ubuntu feisty fonts
  2. sudo aptitude install libfreetype6 libcairo2 libxft2

WINDOWS FONTS

  1. sudo apt-get install msttcorefonts

SPEED UP GNOME

  1. Open your text editor of choice and copy and paste in the following text:
    gtk-menu-popup-delay = 0"| tee -a .gtkrc-2.0
  2. Save the file into your home directory with the name .gtkrc-2.0 (don’t forget the period before the filename), and restart your session (CTRL+ALT+BACKSPACE). You’ll notice a nice speed boost when browsing within a category in your menu.
  3. 1. gtk-menu-popup-delay = "0" | tee -a gtkrc - 2.0
    2. Save into home directory

WIRELESS

  1. Go to NDISWrapper home page http://ndiswrapper.sourceforge.net. Find the installation page and follow instructions
  2. Make sure before compiling that you have sudo apt-get install build-essential to compile programs
  3. Download latest NDISWRAPPER version; 1.4.9 as of Nov 2007.
  4. After downloading to your desktop, go to the source-directory and run make distclean and make. As root, run make install. This should compile and install both the kernel module and the userspace utilities.
  5. Go to the “List” page in the NDISWRAPPER web page to find your version of wireless card. First, identify the type of card you have with lspci.
  6. To identify the driver that you need from List, first identify the card you have with lspci and note the first column such as 0000:00:0c.0 and then find out the PCI ID of the card by running lspci -n and locating the entry corresponding to the first column of lspci output. The PCI ID is third column or fourth in some distributions and of the form 104c:8400. Now you need to get the Windows driver for this chipset.
    In the List, find out an entry for the same PCI ID, and download the driver corresponding to it. Unpack the Windows driver with unzip/cabextract/unshield tools, and find the INF file (.INF or .inf extension) and the SYS file (.SYS or .sys extension). If there are multiple INF/SYS files, you may look in the List if there are any hints about which of them should be used. Make sure the INF file, SYS file and any BIN files (For example, TI drivers use BIN firmware) files are all in one directory.
  7. In the list I looked under “A” for the Atheros card that is standard on the Mac Core Duo 2’s . The executable on my desktop was from the Lenovo site and was 7iwc28ww.exe. The command to cabextract was cabextract filename, easy as can be!!
  8. Now use ndiswrapper to install. ndiswrapper -i NET5416.INF
  9. This copies all necessary files to /etc/ndiswrapper and creates the config files for your card. After installing you can run ndiswrapper -l to see the status of your installed drivers. You should see something like:
    net5416 : driver installed
    device (168C:0024) present
  10. Then you have to load the interface with modprobe, type this before hand to ensure there are no errors. depmod -a then modprobe ndiswrapper. The drivers should be loaded, now just ensure that your wireless interface is configured correctly by going to System > Administration > Network and ensure that your wireless interface is active.

WICD

  1. These steps are optional…I got WICD working intermittently - maybe it’s more stable since this post?
  2. Go to WICD sourceforge download package.
  3. sudo apt-get remove network-manager even if a fresh install.
  4. …or simply use Synaptic Package manager > search for WICD and install. It will remove other possible conflicting pages but continue with installation.
  5. To install it in the task tray open System > Preferences > Sessions, click new > in the name field type WCID and in command type /opt/wicd/tray.py

MULTIMEDIA

  1. changed /etc/apt/sources.list and changed all entries "http://us.archive...." by omitting the “us” nation portion.
  2. then added "deb http://packages.medibuntu.org/" to my list or use this one "http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_add_extra_repositories"
  3. then do sudo apt-get install w32codecs
  4. then do sudo apt-get update and sudo apt-get install libdvdcss2
  5. Afterwards you can install mplayer and vlc.
  6. Ensure that you go into each players preferences section and edit the codecs being used. VLC was changed to the X11 codec and I think I set mplayer to OpenGL

VMWARE SERVER

  1. http://www.howtoforge.com/ubuntu_feisty_fawn_vmware_server_howto
  2. to find kernel version: sudo uname -r
  3. change old command sudo vmware-install.pl to sudo ./vmware-install.pl
  4. also run sudo apt-get install libx11-6 libxtst6 libice-dev libsm-dev libxt6
  5. continue with installation choosing defaults

VERSION CHECK

  1. in terminal lsb_release -a

FAN

  1. sudo sh -c "echo 6000 > /sys/devices/platform/applesmc/fan0_minimum_speed more than likely set for less, say 4500 (11.26.07)
  2. You must ensure you have the correct privileges assigned

JAVA

  1. Firefox plugin: sudo apt-get install sun-java6-plugin
  2. JAVA JDK: sudo apt-get install sun-java6-jdk
  3. Check version: java -version

That was easy!

Installing Windows Server 2003 Standard Edition

November 19th, 2007
winserv2003web1.png

Possibly I’m bored or I am actually being responsible and documenting a successful Server 2k3 install. I attempted something similar last year using a wiki when I was studying for an MSCE exam (I passed thanks much). Since then I’ve been busy with web development projects and haven’t had much reason to mess with Windows server’s aside from basic administration tasks. However, I’m getting the itch to get back on track and finish my MSCE and where better to start than by documenting a Windows Server 2003 installation.

Note: This is all being done in VMWare Server on a Linux host OS - Ubuntu Gutsy to be specific.

Windows Server 2003 Requirements

Let’s do away with all the obvious stuff.

  1. Computer and processor: 133-MHz processor required; 550-MHz or faster processor recommended; support for up to four processors on one server.
  2. Memory: 128 MB of RAM required; 256 MB or more recommended; 4 GB maximum.
  3. Hard disk: 1.2 GB for network install; 2.9 GB for CD install.
  4. Drive: CD-ROM or DVD-ROM drive.
  5. Display: VGA or hardware that supports console redirection required; Super VGA supporting 800 x 600 or higher-resolution monitor recommended.

On with the installation…

So before I continue, I’ll just add the obvious fact that we’ll need the space formatted for NTFS. So next…

  1. Insert the CD, boot up the system, install in the desired partition using NTFS (NTFS Quick is fine too) and let the setup finish.
  2. When prompted for licensing scheme, I selected the option that clients would have licenses. It’s a guess and what made me decide to do this write up in the first place.
  3. After setup is complete, login. There is no domain to log into yet, we’ll create the domain shortly.
  4. After logging in, a large window will appear labeled ManageYour Server. Locate and click the add or remove a role link. This is where we’ll begin to create our domain controller.
  5. On the Configuration Options page, since this is our first server in the domain, we will select Typical configuration for a first server.
  6. In the Active Directory Domain Name page we will give our domain a name. Mine is TestNet.local. I used the default .local extension but Microsoft allows others as well.
  7. On the NetBIOS Name page I used the default provided given my AD Domain name; TESTNET.
  8. You should be presented with a summary of configuration options at this point. Mine was:
    Install DHCP server (if required)
    Install Active Directory and DNS server (sets up this server as a domain controller)
    Create the following full domain name: TestNet.local
  9. Click Next and the configuration will be applied and the system will restart.
  10. Log back in (you’ll see the domain name listed now) and a page presents you with all the configuration changes.
  11. Okay, now let’s do all our Windows updates. This will take some time. So fire up IE, start the updates and go grab some coffee or stimulant of choice.

That’s enough for now…I’ll cover finishing the install in Part 2

DNS Configuration

So now we’ll configure our DNS, specifically I want to check that reverse lookups are have been installed.

  1. Open DNS Management, then expand your server node
  2. Locate and right click the folder Reverse Lookup Zones selecting New Zone
  3. Click Next and in the next window select Primary Zone
  4. Click Next and select To all DNS servers in the Active Directory forest…
  5. Click Next and input your network number in the area labeled Network ID. So for a refresher, if your network range was 192.168.1.1 - 254 your Network ID would be 192.168.1. Click Next
  6. If prompted to configure Dynamic Updates, select Allow only secure… just to be safe. This will only allow AD clients to alter DNS records so remember if you’ll need to manually update entries for non-AD members.
  7. Click Finish

So that’s it, pretty easy. Something to note, you won’t see your DNS clients immediately creating their PTR or reverse lookup records, it can take some time. As long as you followed the instructions in Step 6 above, your AD clients will update dynamically. However, if you can’t wait, you can create the resource record by right clicking in the Reverse Zone node and selecting New Pointer (PTR).