Technical Fixes
RSS icon Email icon Home icon
  • DL120 and Adaptec 2405 Grub Loader Problems

    Posted on October 21st, 2010 Matt Parkinson No comments

    Yesterday I was working on a new HP DL120 G6 with an Adaptec 2405 RAID controller and I had quite a serious problem with the Grub Boot Loader in that it would always ask me to select the option to boot as though a key had been pressed rather than automatically booting the default kernel. While this is not a problem if there was someone there to press enter when it rebooted as the server was in a datacentre it was not very easy.

    Another key note on this is that as Grub started to load it was slow and while showing “Loading Grub Stage 2″ the Adaptec card would have a constant beep for around 10 seconds until Grub had loaded. This initially is strange as usually it loads so fast I never see the text on screen. The second thing was that after selecting the kernel to boot it would then start to beep constantly for about a minute while it perform the initial kernel loading which was also very slow.

    I spent a few hours trying to fix this (which is why I am writing about it) changing all sorts of options in the BIOS and on the card itself to no luck. Eventually I went to the Adaptec site and started to read through the new firmware release notes and found that while there was not a specific fix related to the DL120 there were some other fixes related to HP and specifically the ML110 so it looks like Adaptec actively work with HP on problems.

    Because of this I decided to download the latest firmware (which at this point is build 17911) and proceeded to flash the Adaptec BIOS. Upon this completing and rebooting the server the Grub Boot Loader started to work correctly and automatically boot the default kernel option.

  • Find Text Inside A File In Linux

    Posted on May 6th, 2010 Matt Parkinson No comments

    Recently I had the need to find all files on a Linux system containing a particular string of text. To do this you can use the following command adjusting it for your specific needs. This command is very useful in cases where websites have been comrpomised to search for a common string that may have been replaced in all of the files on the website.

    find ./ -type f -print0 | xargs -0 grep -l “text to search for”

    The above command will search the current directory for the text “text to search for”. You can change the directory you want to search in by modifying the “./” to the full directory path.

  • Creating VSFTP Users

    Posted on May 18th, 2008 Matt Parkinson No comments

    First create a FTP user group. eg: ftpusers

    /usr/sbin/groupadd ftpusers

    Add new user to this group, and set the default path of that user to /var/www/.

    /usr/sbin/adduser -g ftpusers -d /var/www user1

    Set a password for the newley created user.

    passwd user1

    Set ownership of /var/www/ to the user1 and ftpusers.

    /bin/chown user1:ftpusers

    Give Read/Write access to user1 and all members in ftpusers

    /bin/chmod 775 /var/www


    Edit /etc/vsftpd/vsftpd.conf file and make sure ‘local_enable=YES’ is uncommented.

    Then restart the vsftpd service.

    /sbin/service vsftpd restart

  • Adding a default gateway

    Posted on May 18th, 2008 Matt Parkinson No comments

    To add a default gateway to a linux server run the following command replacing the IP address with the gateway IP and the eth0 with the correct network adapter of the server.

    route add default gw eth0

  • Finding large files on Linux

    Posted on May 18th, 2008 Matt Parkinson No comments
    The following command will find all files over roughly 20MB on a Linux system.
    find / -type f -size +20000k -exec ls -lh {} ; | awk { print $9 “: ” $5 }
  • Using NTPDATE to sync time

    Posted on May 18th, 2008 Matt Parkinson No comments

    To sync the time with a server use the ntpdate command as follows:

     ntpdate -u xx.xx.xx.xx

    Replacing the x’s with a server address of course. You can also put this in a cronjob to run every so often or you can set up the NTP deamon instead as a more permanent option.

  • Resetting Root Password

    Posted on May 18th, 2008 Matt Parkinson No comments

    To recover the root password at the GRUB boot loader press a key to allow you to access the boot options. Then press ‘e’ on the boot kernel you wish to edit. Select the kernel line and at the end of the line add ’single’ as a separate word and then press enter to exit the edit mode. Then press ‘b’ to boot the system into single user mode where no password will be required.

    Once booted type in ‘passwd’ and enter the new password you wish to set the root user to and then restart the system into the normal operating kernel and you should be able to login as root usng the new password.