Sunday, June 2, 2013

Seagate Barracuda 3tb not recognized

Last week i bought a new Hard Drive, a 3 TB Seagate. After connecting the Sata and power cables, I Powered On my computer and realized that my new drive was not being recognized during the BIOS POST message. So, I rebooted and this second time my drive was recognized, showing this message:

4th Master: ST3000... S.M.A.R.T Capable and status OK  

But when I logged in (Windows xp), the drive was not listed. Going through a web search, I find the Seatools DiskWizard Utility. Using this program I could manage to format the drive and use the extended capacity (some system can only recognize up to 2 TB). I Powered off the computer and the next day, I realized that it was not being recognized again. It was only visible after rebooting the machine. Doing more research on the web, I stepped into this page on the Seagate website. It turns out that, in certain machines, the drive is not detected after cold boot, but is after warm boot or reset. The reason for this is that motherboard boots quickly before a hard drive has spun up and is ready. Because of my BIOS settings, my solution was to disable Quick Boot so that the motherboard will wait a little bit for the hard drive to become ready.

I hope this will help someone the way it helped me...

Saturday, August 6, 2011

make a back up of the bash history

This function backup your bash history in a file named history.back when it reaches 900 lines. It reads the hidden file .bash_history in the $HOME directory counting the lines. If the count is greater than 900, appends the content of .bash_history into history.back and removes the file .bash_history. To run the script at boot (I'm using Fedora) I put the path of the script in /etc/rc.d/rc.local.

#!/bin/bash
#backup .bash_history

#Created by solde9
#on 2011-08-06

FILENAME=$HOME/.bash_history
count=0
HISTORY_BACK=$HOME/history.back

while read LINE
do
    let count++
done < $FILENAME

if [[ count -gt 900 ]]; then
    echo '===============================' >> $HISTORY_BACK
    cat $FILENAME >> $HISTORY_BACK
    rm $FILENAME
fi