Welcome to The Tech 
Web www.thetechguide.com
Geeks with attitude
  • Home
  • How-To's
  • Tweaks
  • Hardware
  • Software
  • Games
  • Our Picks
  • Downloads
  • FAQ's
  • Forum
  • Chat
  • Tech Deals
  • Links
  • Email

  • Site News
    Our Black Friday section is now online! Click here to check it out.

    Active Discussions
    [an error occurred while processing this directive]


    Install unRAID on your hard drive

    This is still a work in progress

    Download Slackware 12.0. Install it on your hard drive.

    When the CD boots, login as root. If your drive is not currently partitioned for linux, you need to run fdisk or cfdisk. If you only have one hard drive currently installed, you can probably run this without specifying the drive. If you have several drives, you need to specify the drive path, such as "cfdisk /dev/hda". I like to partition with 100MB for /boot, however large of a swap partition you want, and the rest on /. Make sure that you change the partition type of your swap to 82, so setup will recognize it as a swap partition.

    Now run setup. Setup your partitions, select reiserfs as the filesystem (you can probably also choose ext2, but reiserfs is the safer choice for our purposes). When you get to select packages, this is what you want the initial screen to show:

    Base Linux system - checked
    Various Applications that do not need X - checked
    Program Development (C, C++, Lisp, Perl, etc.) - checked
    GNU Emacs - unchecked (optional)
    FAQ lists, HOWTO documentation - unchecked (optional)
    Linux kernel source - unchecked (we need a newer version, don't bother with this one)
    QT and the K Desktop Environment for X - unchecked (unless you want to use this as your desktop)
    International language support for KDE - unchecked
    System Libraries - checked
    Networking (TCP/IP, UUCP, Mail, News) - checked
    TeX typesetting software - unchecked (optional)
    Tcl/Tk script languages - unchecked (optional)
    X Window System - unchecked (unless you want to use this as your desktop)
    X Applications - unchecked (unless you want to use this as your desktop)
    Games - unchecked (unless you want to use this as your desktop)

    Hit OK. You now have the option of fine-tuning the package selection. If you know what you're doing, choose menu or expert and choose the individual packages. Else choose full. Full will use up more disk space and install unecessary things, but at least you won't worry about missing something you need.

    You need to install developmental tools, and huge-kernel (no need to install smp or generic kernel).

    When it's done, it'll ask if you want to create a bootable usb stick. Might be a good thing to do, but don't overwrite your unRAID stick! I skipped since I don't have an extra usb stick that can be bootable. On the next screen, select "no modem".

    For lilo, choose simple. Next screen, choose the top selection which is standard (otherwise you may need to edit lilo.conf to choose vga mode to boot the unRAID kernel). Leave the OPTIONAL LILO append blank, and have it install to the MBR. If you get an error here, you won't be able to boot, so try to run it again after setup (sometimes I would get an error, but when I tried again at the main setup menu, it'd work fine, go figure).

    Select Yes to configure your network. For hostname, select what you want the hostname to be of your unRAID server (unRAID's default is Tower, feel free to set it to whatever you want). For domain, unless you plan on having this on the internet, just put your hostname again. Choose DHCP or static IP (unRAID's default is DHCP). I chose DHCP. For the DHCP hostname, you can leave that blank.

    The next menu is "Confirm Startup Services to Run", feel free to leave it at the defaults. For hardware clock, generally you want to set it to NO, which is the default. Then you need to select your timezone.

    Now it will ask you if you want to set a root password. Feel free to do so, you'll need one to be able to ssh in. Now you are done, you can exit setup and reboot (be sure to take out the CD-ROM). If you were like me and had problems installing LILO, select "Configure" from the main screen.

    Need to add: Re-running lilo from setup worked on VMWare but not on Abit AB9 on IDE port. Configuring manually worked. First mounted /dev/hda3 to /, nano /etc/lilo.conf, ran lilo -v

    Another note: Having all kinds of problems just getting Slackware to work on the Abit AB9 Pro. Cannot boot hard drive off the only ide port, lilo doesn't want to work on the Promise Ultra66, when I do get it to work the board doesn't want to boot the drive even when it's the first listed, I have to make sure no other drives are bootable, no bootable cdrom, no bootable usb flash drive, etc. Now that that's done, the realtek card won't work so I have to have another NIC to continue. Once this is finished, future users can burn the new kernel files to a cdrom, install, and it should work out of the box. Edit to above: The Abit ABo Pro works fine now, it did not like the Promise Ultra66 card. Once removed everything's working normally. Did have to use irqpoll option to old kernel, no need on new kernel.

    You no longer have to compile the kernel, I have prebuilt packages for you. Hopefully we will be able to redistribute the binaries in unRAID soon, then I can reduce this whole how-to to just installing some packages. If you want to just install the kernel and modules instead of compiling, then change to the /usr/src directory and download these packages: cd /usr/src

    wget http://downloads.thetechguide.com/unraid/kernel-unRAID-

    wget http://downloads.thetechguide.com/unraid/kernel-modules-

    If you want to compile any programs, you will also need the kernel-headers package:

    wget http://downloads.thetechguide.com/unraid/kernel-headers-

    Now install the packages:

    installpkg kernel-unRAID-*

    installpkg kernel-modules*

    And optionally:

    installpkg kernel-headers*

    If you'd rather compile your own kernel, here's the steps to take (otherwise, skip down to **End compile custom kernel**):

    **Begin compile custom kernel**

    Goto your /usr/src directory:

    cd /usr/src

    Now download the same kernel source that unRAID uses (currently for unRAID 4.3 beta 5 and beta 6):

    wget http://downloads.thetechguide.com/unraid/kernel-source-

    wget http://downloads.thetechguide.com/unraid/kernel-headers-

    wget http://downloads.thetechguide.com/unraid/linux-

    Now install:

    installpkg kernel-source*

    installpkg kernel-headers*

    You don't need to do anything with the linux- file unless you're using a kernel source other than what I provided above. In that case, after unpacking your kernel source to /usr/src and symlinking /usr/src/linux to it (i.e. if your kernel source is at /usr/src/linux-, you need to symlink /usr/src/linux to that directory), do this while in the /usr/src directory: tar xzf linux-

    Now we've copied over the unRAID drivers and the .config file we need to compile the kernel.

    Now we get to compile the kernel!

    cd /usr/src/linux

    make clean

    The next step is now optional, you only need to run make menuconfig if you want to compile in extra drivers or modules that unRAID doesn't provide out of the box.

    make menuconfig

    Now compile the kernel:

    make bzImage

    When it's done you'll get the message "Kernel: arch/x86/boot/bzImage is ready (#1)". Copy it and System.map to /boot:

    cp arch/x86/boot/bzImage /boot/vmlinuz-

    cp System.map /boot/System.map-

    Now you need to make and install the modules:

    make modules

    make modules_install

    Ok, we're close now. We need to edit your /etc/lilo.conf file. It's going to vary for each person but I'll try to help. Edit it in your favorite text editor. Look towards the bottom of the file, you'll see the current setup. You need to make an exact copy of what's there, except specify a different kernel. Here's the relevant part in my /etc/lilo.conf:

    # Linux bootable partition config begins
    image = /boot/vmlinuz
    root = /dev/hde3
    label = Linux
    # Linux bootable partition config ends

    Now we need to add this just below it:

    image = /boot/vmlinuz-
    root = /dev/hde3
    label = unRAID

    You've got to substitute /dev/hde3 with whatever it currently is in your lilo.conf file, else that kernel just won't boot.

    **End compile custom kernel**

    Now we need to update lilo:

    lilo -v

    Now we need to download unRAID and copy it to our Slackware install. While in the /usr/src directory download unRAID:

    wget http://lime-technology.com/dnlds/unRAID%20Server%204.3-beta6.zip

    We need to extract unRAID into its own directory. First make a directory for unRAID, then move the zip file, then unzip:

    mkdir unraid

    mv unRAID* unraid
    cd unraid

    unzip unRAID*

    Now we need to extract the bzroot:

    mkdir bz-mod

    cd bz-mod

    zcat ../bzroot | cpio -i -d -H newc --no-absolute-filenames

    Cross your fingers and reboot. Make sure to select the unRAID kernel in the lilo boot. Once we know it works we'll make the change permanent.

    Ok hopefully everything worked fine and you're now running the unRAID kernel. Let's copy over all the files that are unique to unRAID that aren't in a standard Slackware install. I like to play it safe, so I go into each directory that needs to be checked and run the cp command from there.

    cd /usr/src/unraid/bz-mod/bin

    cp -ri * /bin/

    cd ../etc

    cp -ri * /etc/ cd ../lib

    cp -ri * /lib/

    cd ../root

    cp -ri * /root/

    cd ../sbin

    cp -ri * /sbin/

    cd ../usr

    cp -ri * /usr/

    cd ../var

    cp -ri * /var

    Ok, now everything's copied over. There's one more tiny thing we need to do. We need to copy over the bzroot's version of the /etc/passwd file, emhttp freaks out if it sees shadow passwords.

    cp -rf /usr/src/unraid/bz-mod/etc/passwd /etc/passwd

    If you want to setup User-Shares, you MUST run fuse first. Do so like this:

    /etc/rc.d/rc.fuse start

    If you forget and enable User-Shares, then try to run fuse, it won't work (even after stopping and starting the array). If you accidentally did this, here's how to fix it. Stop the array, disable User-Shares. Remove the entire /mnt/user directory using the command rm -rf /mnt/user (note that if you copied anything to a User-Share when it was not working properly, this will completely delete it, you've been warned!). Start the array. Stop it again and enable User-Shares. Start it back up, and it should work. You will need to have fuse start up in your rc.local file before emhttp does.

    If this is a new install (you didn't already have a working unRAID setup on this server), you're ready to start emhttp!

    emhttp &

    If you have an existing config for this system, we need to copy over some important files from your usb drive. First we need to mount it. Now if you're just going to use a maximum of two data drives (and one parity), there's no need to keep the usb drive mounted. You can mount it wherever, or even just copy over files from another PC (i.e. put your usb key in your windows box and ftp them over to your new unRAID server). If you have a license, then you HAVE to have the usb drive mounted whenever emhttp is running. The next steps show you how to do that, then we'll show you where to copy the files.

    Make the /mnt/boot directory:

    mkdir /mnt/boot

    Edit your /etc/fstab and put this at the bottom (or anywhere really, has to be all on one line):

    /dev/disk/by-label/UNRAID /mnt/boot vfat defaults 0 0

    Make sure that the usb drive is inserted, wait 5-10 seconds to make sure it's had enough time to be configured, then type:

    mount -a

    You shouldn't get an error message about the usb drive, do note that this message is perfectly normal: "mount: devpts already mounted or /dev/pts busy". Now we need to copy everything from the config directory on your usb drive to your /boot partition. First, you probably have a file named /boot/config, so we'll need to rename it, then copy the files over.

    mv /boot/config /boot/config.bak

    cp -rf /mnt/boot/config /boot

    Now you can start up emhttp, and it will read your current config and license key.

    (This needs to be further explained) Add the stuff you need to run on every reboot to /etc/rc.d/rc.local

    Things to look into: Need a more elegant way to do the cp above. Make emhttp auto-start on boot. If anyone can debug kernel modules, find out why unraid.o crashes under an smp kernel. Convince WeeboTech that this whole endeavor only took ten minutes and each time a new unRAID version comes out, it'd only take Tom a couple minutes max to make this unRAID-max distro.

    Ultimate todo: Create Slackware packages so you can simply install a few packages and have unRAID on your system. We can even create a custom install CD that will install a system with unRAID ready to go. Packages are ready, currently waiting on permission from Tom to redistribute unRAID.

    Some notes (yes I'm probably repeating myself, this is still a work in progress):

    If you have a Realtek Gigabit NIC (which is included on the Abit AB9 Pro among many others), it most likely won't work after you've installed Slackware. It will be recognized and looks like it'd work, but won't (setup will configure it for you, it will say it's looking for a dhcp server but times out, trust me it's not really working). Once you've installed the newer kernel AND modules, it will work.

    The Abit AB9 Pro motherboard seems to not like the Promise Ultra66 card. When I had a drive installed, I was able to edit the bios once. Subsequent trips to the bios setup screen would result in the keyboard not working (tried both usb and ps/2 keyboards). I could clear the CMOS and try again, it would work for the first edit but not subsequent times. Had other issues with the Promise Ultra66 card (the one drive I had connected to it was corrupted within a day), so I just chucked it.

    Another issue with the Abit AB9 Pro, related to the JMicron IDE port. After the first boot I'd get tons of error messages about /dev/hda. Turns out to use the IDE port you need to append the "irqpoll" option to the kernel. We only need to do this temporarily. When you see the lilo boot screen (where you select the OS you want to boot), simply type "Linux irqpoll" without quotes, then enter. You can do this with other kernel options such as noapic. Once the new kernel is installed, you no longer need that, so no need to edit lilo.conf to permanently add it.

    Questions? Ask in the forum or email me.

    For the Privacy Policy, click here.
    Past Articles
  • Build your own Apple Clone
  • AllofMP3 Review
  • Tutorial to Basic Windows 2000 DOS
  • Extracting and joining MPG2 files from SVCD
  • Modifying your Windows XP Boot Logo
  • Unlocking WinXP's setupp.ini
  • Making a Full Screen Bios Logo
  • Making your WinMe CD bootable
  • Auto-insert your Win9x serial
  • Auto-insert your Office2kserial
  • Why FedEx Sucks