Setup a backup server with FreeNAS
February 3rd, 2008
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
- Download the lastest stable image from the FreeNAS site and burn image to CD
- Boot up your system with FreeNAS LiveCD (not the embedded *.img)
- Hit Enter when the FreeNAS splashpage appears.
- Select
9to install to your harddrive - Select
3to install full release - FreeNAS setup will list the detected CDROM. Mine was
acd0 - The next prompt was to enter the name of the CD-ROM drive, I entered
acd0that the install routine detected. - 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. - My listed drives were:
ad0: 38146MB
ad1: 190783MB
- I typed the following for my OS drive -
ad0 - At the next prompt, type in the size of your OS partition. I’m utilizing the entire disk so I typed the following:
38146 - The OS will install and then you are free to reboot the system
- The next step is to assign the LAN interfaces.
- After entering back into the setup menu, select
1 - Assign Interfaces. - My installation automatically detected the interface - in my case
em0and that is what I typed when prompted to enter my LAN interface. - 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 - In the main menu I selected
2 - Set LAN IP Address - I typed
nwhen asked if I wanted to use DHCP for IPv4 and then entered my preferred static IP address - My LAN subnet bit count was 24 and my IPv4 gateway was my router at 192.168.1.1
- 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.
- I configured IPv6 to configure automatically and then sent a test ping to my router. Looks good so far.
- So you should get a message about the assigned address and that you can access the WebGUI there.
- I logged on to mine at 192.168.1.30 - w/username:
adminand passwordfreenas. - 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.
- Go to
Disks -> Managementand click on the + sign. - On the next page, select the disk you want to use as your Backup directory. In my case,
ad1as noted earlier in these instructions - In the Preformated FS drop down, we will leave the value as
Unformated, clickAddand in the next windowApply - Next we want to format the disks. I selected
ad1andUFS with soft updates - 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
- Click
SaveandApply - Now we need to start a few daemons, specifically enabling CIFS/Samba
- Click the
Services -> CFS/SMBlink and check theEnablebox. - Leave all the default values and click the
Savebutton for now. We’ll go back and change things as needed. - Apparently as of version 0.685b we need to assign shares. So click the
Sharestab and enter the appropriate information. I used the browse button to select the right syntax for the file path and also unchecked theHosts denyoption. - At this point, in a Windows system I am able to type
\\192.168.1.30in the Run command and access the share. On Gutsy I can open Nautilus, clickGo -> Locationand type in the ip address and access the share as well. - 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 - 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. - 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.
- Change the workgroup name to whatever you network name is - in my case it is
homenet.localClick Save and restart - Checked it again and there it is. Easy.
RIAA website hacked
January 21st, 2008
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
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
- Insert CD: Follow all default instructions, (US Keyboard, EST time zone, Partition entire disc, etc…)
- After installation is complete reboot and enter configuration phase
HOSTNAME
- Open System > Administration > Network and change hostname to nixbook.somenet.local. In addition, add correct DNS settings.
- 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
- Go to http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_add_extra_repositories to edit correct repositories.
- Run
sudo apt-get updateto acquire all updates
DISPLAY RESOLUTION
sudo apt-get install 915resolution- Ctrl + Alt + Del to restart GDM and then edit display settings.
COMPILE TOOLS
sudo apt-get install build-essential or sudo aptitude install build-essential
TOUCHPAD
- see http://help.ubuntu.com/community/macbook
- For touchpad delay, this site has some good info….
FONT SMOOTHING
- add the following lines to
/etc/apt/sources.listdeb http://wwww.telemail.fi/mlind/ubuntu feisty fonts
deb-src http://www.telemail.fl/mlind/ubuntu feisty fonts sudo aptitude install libfreetype6 libcairo2 libxft2
WINDOWS FONTS
sudo apt-get install msttcorefonts
SPEED UP GNOME
- Open your text editor of choice and copy and paste in the following text:
gtk-menu-popup-delay = 0"| tee -a .gtkrc-2.0 - 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.
1. gtk-menu-popup-delay = "0" | tee -a gtkrc - 2.0
2. Save into home directory
WIRELESS
- Go to NDISWrapper home page http://ndiswrapper.sourceforge.net. Find the installation page and follow instructions
- Make sure before compiling that you have
sudo apt-get install build-essentialto compile programs - Download latest NDISWRAPPER version; 1.4.9 as of Nov 2007.
- 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.
- 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. - To identify the driver that you need from List, first identify the card you have with
lspciand note the first column such as0000:00:0c.0and then find out the PCI ID of the card by runninglspci -nand 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 form104c: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. - 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!! - Now use ndiswrapper to install.
ndiswrapper -i NET5416.INF - This copies all necessary files to
/etc/ndiswrapperand creates the config files for your card. After installing you can runndiswrapper -lto see the status of your installed drivers. You should see something like:net5416 : driver installed
device (168C:0024) present - Then you have to load the interface with
modprobe, type this before hand to ensure there are no errors.depmod -athenmodprobe 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
- These steps are optional…I got WICD working intermittently - maybe it’s more stable since this post?
- Go to WICD sourceforge download package.
sudo apt-get remove network-managereven if a fresh install.- …or simply use Synaptic Package manager > search for WICD and install. It will remove other possible conflicting pages but continue with installation.
- 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
- changed
/etc/apt/sources.listand changed all entries"http://us.archive...."by omitting the “us” nation portion. - 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" - then do
sudo apt-get install w32codecs - then do
sudo apt-get updateandsudo apt-get install libdvdcss2 - Afterwards you can install mplayer and vlc.
- 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
- http://www.howtoforge.com/ubuntu_feisty_fawn_vmware_server_howto
- to find kernel version:
sudo uname -r - change old command
sudo vmware-install.pltosudo ./vmware-install.pl - also run
sudo apt-get install libx11-6 libxtst6 libice-dev libsm-dev libxt6 - continue with installation choosing defaults
VERSION CHECK
- in terminal
lsb_release -a
FAN
sudo sh -c "echo 6000 > /sys/devices/platform/applesmc/fan0_minimum_speedmore than likely set for less, say 4500 (11.26.07)- You must ensure you have the correct privileges assigned
JAVA
- Firefox plugin:
sudo apt-get install sun-java6-plugin - JAVA JDK:
sudo apt-get install sun-java6-jdk - Check version:
java -version
That was easy!
Installing Windows Server 2003 Standard Edition
November 19th, 2007
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.
- Computer and processor: 133-MHz processor required; 550-MHz or faster processor recommended; support for up to four processors on one server.
- Memory: 128 MB of RAM required; 256 MB or more recommended; 4 GB maximum.
- Hard disk: 1.2 GB for network install; 2.9 GB for CD install.
- Drive: CD-ROM or DVD-ROM drive.
- 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…
- Insert the CD, boot up the system, install in the desired partition using NTFS (NTFS Quick is fine too) and let the setup finish.
- 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.
- After setup is complete, login. There is no domain to log into yet, we’ll create the domain shortly.
- 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.
- On the Configuration Options page, since this is our first server in the domain, we will select Typical configuration for a first server.
- 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.
- On the NetBIOS Name page I used the default provided given my AD Domain name; TESTNET.
- 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 - Click Next and the configuration will be applied and the system will restart.
- Log back in (you’ll see the domain name listed now) and a page presents you with all the configuration changes.
- 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.
- Open DNS Management, then expand your server node
- Locate and right click the folder Reverse Lookup Zones selecting New Zone
- Click Next and in the next window select Primary Zone
- Click Next and select To all DNS servers in the Active Directory forest…
- 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. ClickNext - 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.
- 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).
archives
technorata
gallery
music