28 March, 2009

Seagate FreeAgent External USB Disk

I should really learn; I had a moment of weakness and impulse purchased a Seagate FreeAgent 500Gb external usb disk drive. I needed an external drive to 'sneaker net' between work and home. I often do significant work at home to avoid the dreaded 'information technology' security policies that prevent any common person from performing their job. If I'm not careful, this will quickly work into a rant about IT.

Anyway, I walked into my neighborhood MicroCenter and debated between a few external usb drives of similar prices. I left with the Seagate not paying any attention to the supported operating systems...hell, they always identify flavors of Windows and an occasional Mac, few vendors recognize Linux but no worries....should work fine.

Well, Linux mounted it read-only because it encountered the following error (from dmesg):

scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
Vendor: Seagate Model: FreeAgent XTreme Rev: 4113
Type: Direct-Access ANSI SCSI revision: 04
scsi 1:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
sda: Write Protect is off
sda: Mode Sense: 1c 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
sda: Write Protect is off
sda: Mode Sense: 1c 00 00 00
sda: assuming drive cache: write through
sda: sda1
sd 1:0:0:0: Attached scsi disk sda
NTFS driver 2.1.27 [Flags: R/W MODULE].
NTFS-fs warning (device sda1): parse_options(): Option iocharset is deprecated. Please use option nls= in the future.
NTFS volume version 3.1.
NTFS-fs error (device sda1): load_system_files(): $LogFile is not clean. Mounting read-only. Mount in Windows.


I resolved by deleting the NTFS partition, create a new primary partition of FAT32 as follows:

# fdisk /dev/sda1
d 1
n p 1
w
q
# mkdosfs -vF 32 /dev/sda1


No longer NTFS, but at least I can mount it from Windows or Linux. Kept me from throwing it through the window.

Scripting System Beep

Sometimes you want to incorporate an audible cue in your script that something is happening, or an indication that a manual effort is required. Cue system beep:

in Bash,

echo -e "\007"

or

echo -e "\a"


will do the trick, just make sure the system beep is enabled and not set to a visual cue.