Monday, July 09, 2012

Running WDIDLE3 and WDTLER from USB stick

I wanted to re-use few old WD disk on RAID. Since these were "green" versions and old enough I could fix their RAID incompatibility issues with WDIDLE3 and WDTLER.


Since both WD tools are DOS only I had to create bootable USB stick. Pretty much all existing FreeDOS based docs are out of date as latest FreeDOS 1.1 is only provided in ISO image that installs it to local disk rather than individual files one could use to create own bootable media. Very bad decision by FreeDOS devs in my opinion.

Luckily Derek has created USB boot image and made it available for all. http://derek.chezmarcotte.ca/?p=340
You'll need 32MB or bigger usb stick for this. Also remember that AMI BIOS treats 512MB and smaller USB sticks as huge floppy drivers by default. Larger sticks are treated as HDDs. So if you're having boot issues with AMI BIOS try toggling that setting, it's hidden somewhere deep in BIOS menus assuming your motherboard vendor didn't hide it.
# Below assumes your USB stick is /dev/sdf. DOUBLE CHECK THIS!
# Unmount any partitions OS might have automounted first.
mkdir -p /usr/src/wdidle
cd /usr/src/wdidle
# Get FreeDOS image, unpack, write to USB
wget http://derek.chezmarcotte.ca/wp-content/uploads/2012/01/FreeDOS-1.1-USB-Boot.img.bz2
bunzip2 FreeDOS-1.1-USB-Boot.img.bz2
dd if=FreeDOS-1.1-USB-Boot.img of=/dev/sdf bs=4k

# Refresh Linux partition table list and mount USB
partprobe
mkdir mnt
mount /dev/sdf1 mnt

# Download WDIDLE3 and WDTLER
wget -O wdidle3_1_05.zip \
 'http://files.hddguru.com/index.php?action=downloadfile&filename=wdidle3_1_05.zip&directory=Software/Western%20Digital&'

wget -O wdtler_1_03.zip \
 'http://files.hddguru.com/index.php?action=downloadfile&filename=WDTLER.zip&directory=Software/Western%20Digital&'

# Unpack to USB
unzip wdidle3_1_05.zip -d mnt
unzip wdtler_1_03.zip -d mnt

# Create empty AUTOEXEC.BAT to skip data / time prompts on bootup
touch mnt/AUTOEXEC.BAT

# Create WDFIX.BAT to fix settings with minimal user intervention
echo "WDIDLE3 /D" >mnt/WDFIX.BAT
echo "HDACCESS" >>mnt/WDFIX.BAT
echo "WDTLER -r7 -w7" >>mnt/WDFIX.BAT

# Convert line feeds from Unix to DOS
sed -i 's/$/\r/' mnt/WDFIX.BAT

# Add HDAT2 in case you want to run some tests too
# Two versions, two different sets of features
wget http://www.hdat2.com/files/hdat2_481.exe
wget http://www.hdat2.com/files/hdat2_453.exe

# HDAT2 is packed with RAR so we need unrar
apt-get -y install unrar

# Unpack HDAT2 to USB and rename exes
unrar x hdat2_453.exe mnt/
mv mnt/HDAT2.EXE mnt/HDAT2453.EXE
unrar x hdat2_481.exe mnt/
mv mnt/HDAT2.EXE mnt/HDAT2481.EXE

# Add tools to change ASUS DMI information. Optional, obviously.
# Download required programs from Lenovo
wget http://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkcentre_bios/5ojt33usa.zip

# Unpack to USB
unzip 5ojt33usa.zip AMIDEDOS.exe -d mnt/

# Usage for AMIDEDOS
# AMIDEDOS /SM "ASUS"
# AMIDEDOS /SP "KFSN4-DRE/SAS"

# Add Fujitsu IPMI tools. Even more optional stuff.
# Search for "IPMIVIEW" on http://support.ts.fujitsu.com/
# Unpack DOS version, it's double zipped
unzip FTS_IPMIVIEWTooltoaccessanIPMIcompliantBaseboa_V203_1072370.zip IPMIView.zip
unzip IPMIView.zip IPMIVIEW.EXE IPMIVIEW.INI -d mnt/

# Unmount USB as we're done
umount mnt

No comments: