1. 'Tip of the Day for Every Linux or Unix User: Brace Expantion'

    Sat 02 May 2009

    Searching the web I discovered some really nice feature of the unix shell, which I didn't know about.

    Try this:

    touch foobar.conf

    Now try this:

    cp foobar.conf{,.bak}

    It is equivalent to:

    cp foobar.conf foobar.conf.bak

    This is also the easiest way to create sequences. Do not use 'seq' since you cannot rely on it being installed.

    bash-3.2$ echo {1..10}

    1 2 3 4 5 6 7 8 9 10

    Please visit this location for additional examples.

    Tagged as : Uncategorized
  2. Compatibility Highpoint RocketRAID 2320 and Samsung Spinpoint F1

    Sun 26 April 2009

    There are some reports about incompatibility between RAID controllers and Samsung Spinpoint F1 drives. I have no troubles with my 0.5 and 1.0 TB drives from Samsung using mentioned controller. See below:

    Controller 1: RocketRAID 232x SATA Controller

    1/1/1 SAMSUNG HD103UJ 1000123MB, Normal

    1/2/1 SAMSUNG HD103UJ 1000123MB, Normal

    1/3/1 SAMSUNG HD103UJ 1000123MB, Normal

    1/4/1 SAMSUNG HD103UJ 1000123MB, Normal

    1/5/1 SAMSUNG HD501LJ 500028MB, Normal

    1/6/1 SAMSUNG HD501LJ 500028MB, Normal

    1/7/1 SAMSUNG HD501LJ 500028MB, Normal

    1/8/1 SAMSUNG HD501LJ 500028MB, Normal

    Tagged as : Uncategorized
  3. Automated Install of Debian Linux Based on PXE Net Booting

    Sat 25 April 2009

    Every honest and good system administrator is continue bussy with automating his work. For two reasons:

    1. Repeating the same task over and over again is friggin boring. A system administrator has better things to do, such as drinking coffee.
    2. Humans make mistakes, especially if boring. Computers do not.

    If a computer can do a certain job, it wil do it always faster and better than a human. Automating system installation is both more time efficient and allows you to deliver a constant quality.

    Netbooting or PXE booting

    Regarding the installation of hosts, the holy grail of automated installation is netbooting or PXE booting. Almost every system today contains a network interface card that supports booting over the network. A system obtains instructions from the local DHCP server where to obtain an operating system kernel. This kernel is obtained using TFTP and then loaded. From then on, the operating system takes over and the installation continues, for example based on Debian preseeding and/or FAI.

    How to prepare for netbooting

    The following requirements must be met:

    1. a DHCP server must be available
    2. a TFTP server must be avaialble
    3. the correct files for netbooting must be in place

    Configuring the DHCP server

    The following two lines must be added to the 'subnet' section of your DHCP server configuration.

    filename "pxelinux.0";
    next-server 10.0.0.1;
    

    The 'next-server' section specifies the IP-address of the system that is running the TFTP server, so change it based on your configuration, this is just an example.

    Don't forget to restart the DHCP server daemon.

    Configuring the TFTP server

    First, make sure you install "tftpd-hpa" since the standard "tftpd" server does not seem to support the "tsize" option. Then, edit /etc/defaults/tftpd- hpa like this:

    RUN_DAEMON="yes"
    OPTIONS="-l -a -R 30000:30100 -s /var/lib/tftpboot"
    

    Do not run the TFTP server from inetd because the above lines provide more control over how the server behaves, especially in regard to firewalls.

    The -R option specifies the port-range used for data transfers. This port range should also be configured within your firewall configuration. Watch out! Do not allow TFTP access from the Internet. TFTP requires NO authentication and is very insecure.

    Start the TFTPD server with:

    /etc/init.d/tftpd-hpa start
    

    Install the files required for netbooting

    The fun thing is that Debian provides a complete package for netbooting. So cd to /var/lib/tftpboot and enter:

    wget http://ftp.debian.org/debian/dists/lenny/main/installer-i386/current
         /imag es/netboot/netboot.tar.gz
    

    Then extract the contents of netboot.tar.tz like:

    tar xzf netboot.tar.gz
    

    That is all there is to it. If you start a host and make it boot using PXE, it will show you the regular installation menu that is also shown when a system is booted from a regular Debian installation CD-ROM.

    However, if you want automated installation and not use this boot menu, first cd to:

    /var/lib/tftpboot/debian-installer/i386/boot-screens
    

    Then edit syslinux.cfg and comment this rule out:

    default debian-installer/i386/boot-screens/vesamenu.c32
    

    If you want to use preseeding, first edit adtxt.cfg and goto label auto. Edit label auto like this:

    label auto
    menu label ^Automated install
    kernel debian-installer/i386/linux
    append auto=true priority=critical vga=normal 
        initrd=debian-installer/i386/initrd.gz url=http://(IP-address)/preseed/preseed.cfg -- quiet
    

    The IP-address section should point towards the preseed server that is hosting the preseed configuration file.

    Last, edit txt.cfg. Change 'default install' to:

    default auto
    

    I always though that PXE booting was a pain to setup. However, I got it working within 60 minutes using this howto.

    Tagged as : Uncategorized

Page 17 / 23