Skip to content

Instantly share code, notes, and snippets.

@pjobson
Last active March 14, 2024 01:56
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pjobson/9ec25f7fc991f28d132ca813ab1bd541 to your computer and use it in GitHub Desktop.
Save pjobson/9ec25f7fc991f28d132ca813ab1bd541 to your computer and use it in GitHub Desktop.
Asus Pike 2008 IT Mode Cross Flash

Flashing Asus 2008 PIKE to IT Mode

Used on an Asus Z8PE-D18 board with no EFI boot options. These instructions were written using Linux Mint to create the media, most distributions will work with little modification.

The PIKE 2008 is basically a LSI 9220-8i which you can flash with 9211-8i firmware. Flashing to IT mode allows you to have direct access to the disks to use btrfs or zfs or some kind of software RAID instead of the card's RAID.

Get Your SAS Address

There is a sticker on the back of your PIKE card which has 16 digits starting with 5000. Write this address down or take a picture of it. Note I put XXXXXXXXXXXX in this picture as these numbers are unique to the card. If your card does not have this sticker, instructions will be provided below.

SAS Address

Download FreeDOS

wget https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.3/official/FD13-FullUSB.zip

Unzip It

unzip FD13-FullUSB.zip

USB

Insert and Find Your USB Stick

This will show a list of your drives, be sure to use the correct one. I've put /dev/xxx in the instructions as the USB, yours will be different.

fdisk -l

It'll show something like this for your USB stick, note the drive size.

Disk /dev/xxx: 28.9 GiB, 30992891904 bytes, 60532992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd06a3fac

Unmount your USB

sudo umount /dev/xxx*

Write FreeDOS to USB

sudo dd if=FD13FULL.img of=/dev/xxx bs=128 status=progress

This should output status as it writes to usb followed by:

530006144 bytes (530 MB, 505 MiB) copied, 743 s, 713 kB/s
4194304+0 records in
4194304+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 757.612 s, 709 kB/s

Add Extended & Logical Partitions to Your USB

sudo fdisk /dev/xxx

Print your partition table.

Command (m for help): p

Should show something like this.

Disk /dev/xxx: 28.9 GiB, 30992891904 bytes, 60532992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd06a3fac

Device     Boot Start     End Sectors   Size Id Type
/dev/xxx1  *       63 1048319 1048257 511.9M  6 FAT16

Create an Extended Partition

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): e
Partition number (2-4, default 2): 2
First sector (1048320-60532991, default 1048576): 1048576
Last sector, +sectors or +size{K,M,G,T,P} (1048576-60532991, default 60532991): +512M

Add a Logical Partition

Command (m for help): n
Partition type
   p   primary (1 primary, 1 extended, 2 free)
   l   logical (numbered from 5)
Select (default p): l

Adding logical partition 5
First sector (1050624-2097151, default 1050624): 1050624
Last sector, +sectors or +size{K,M,G,T,P} (1050624-2097151, default 2097151): 2097151

Change The Partition Type to FAT16.

Command (m for help): t
Partition number (1,2,5, default 5): 5
Partition type (type L to list all types): 6

Print Your Table - Should display something like this:

Command (m for help): p
Disk /dev/xxx: 28.9 GiB, 30992891904 bytes, 60532992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd06a3fac

Device     Boot   Start     End Sectors   Size Id Type
/dev/xxx1  *         63 1048319 1048257 511.9M  6 FAT16
/dev/xxx2       1048576 2097151 1048576   512M  5 Extended
/dev/xxx5       1050624 2097151 1046528   511M  6 FAT16

Write Your Partition Table

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

This will drop you back to the bash shell.

Format The Partition

sudo mkfs.fat /dev/xxx5

Label Your Partition

sudo fatlabel /dev/xxx5 SAS

Re-Mount USB

The most convenient way to do this is unplug it and plug it back in.

SAS Flash

Download and Unzip SAS Flash Files

wget https://gist.github.com/pjobson/9ec25f7fc991f28d132ca813ab1bd541/raw/4468546bfaa499d05a9f244cbcce6a200b1b62e0/sas_flash_files.zip
unzip sas_flash_files.zip

Copy Flash Files to USB

cp megarec.exe /media/$USER/SAS/
cp sas2flsh.exe /media/$USER/SAS/
cp 2118it.bin /media/$USER/SAS/
cp mptsas2.rom /media/$USER/SAS/
cp dos4gw.exe /media/$USER/SAS/
cp sbrempty.bin /media/$USER/SAS/

Disconnect All Drives and Reboot from the USB

You'll want to unplug all of your SAS and SATA drives and reboot with the USB only. Remove any additional SAS cards if you have any.

BIOS

  • Open the BIOS.
  • Disable Secure Boot
  • Enable Legacy Boot - Note: You may need to enable Compatibility Support Module (CSM) to enable Legacy.
  • Set the default boot device to the USB stick.

FreeDOS Shell

Let FreeDOS boot. Then Select:

  • Language: whatever you like
  • Install: No - Return to DOS

Go To Your D: Drive

D:
dir

You should see the exe files and rom files.

Get Your SAS Address

If you do not have the sticker as shown in Step 1, you can use sas2flsh to get the address. Otherwise, you can skip this step.

sas2flsh.exe -c 0 -list

Should display something like this:

Adapter Selected is a LSI SAS: SAS2008(B2)

Controller Number  : 0
Controller  : SAS2008(B2)
PCI Address  : 00:01:00:00
SAS Address  : 5000xxx-x-xxxx-xxxx
NVDATA Version (Default)  : 14.01.00.08
NVDATA Version (Persistent)  : 14.01.00.08
Firmware Product ID  : 0x2213 (IT)
Firmware Version  : 20.00.07.00
NVDATA Vendor  : LSI
NVDATA Product ID  : SAS9211-8i
BIOS Version  : N/A
UEFI BSD Version  : N/A
FCODE Version  : N/A
Board Name  : SAS9211-8i
Board Assembly  : N/A
Board Tracer Number  : N/A

Finished Processing Commands Successfully.
Exiting SAS2Flash.

Note the SAS Address this is what you need without the dashes, don't loose it.

Back-Up Your Card

megarec.exe -readsbr 0 pike2008.sbr

Wipe Your Card

megarec.exe -writesbr 0 sbrempty.bin
megarec.exe -cleanflash 0

Reboot

You will need to reboot here.

Back to D:

As shown above.

Flash IT Mode

sas2flsh.exe -o -f 2118it.bin -b mptsas2.rom

Restore Your SAS Address

Replace 5000xxxxxxxxxxxx with the one you hopefully wrote down.

 sas2flsh.exe -o -sasadd 5000xxxxxxxxxxxx

List Card

sas2flsh.exe -listall

This should show your card and the firmware which you just flashed.

Additional Info: PIKE Card Chipset and Motherboard Reference

Here is a reference for chipsets and motherboard support for various PIKE cards. Check out the LSI RAID Controller and HBA Complete Listing Plus OEM Models thread on ServeTheHome for more on RAID cards and flashing options.

@fasheng
Copy link

fasheng commented May 25, 2020

Good tutorial, how ever missing dos4gw.exe and sbrempty.bin in your archive.

@pjobson
Copy link
Author

pjobson commented May 25, 2020

Not sure why it didn't decompress for you, tar lists them and I can extract them via linux and osx.

$ tar -ztvf  sas_flash_files.tar.gz
-rw-r--r-- pjobson/pjobson 722708 2019-03-12 01:50 2118it.bin
-rwxr-xr-x pjobson/pjobson  28232 2019-03-13 21:56 dos4gw.exe
-rwxr-xr-x pjobson/pjobson  95576 2019-03-12 01:50 megarec.exe
-rw-r--r-- pjobson/pjobson 202240 2019-03-12 01:51 mptsas2.rom
-rwxr-xr-x pjobson/pjobson 181232 2019-03-12 01:50 sas2flsh.exe
-rw-r--r-- pjobson/pjobson    256 2019-03-13 22:02 sbrempty.bin

@fasheng
Copy link

fasheng commented May 26, 2020

Well, I just use the download command in tutorial:

$ wget https://gist.github.com/pjobson/9ec25f7fc991f28d132ca813ab1bd541/raw/dda4b8baabccacb636615a2345dda4808850a7e4/sas_flash_files.tar.gz
$ tar tvf sas_flash_files.tar.gz
-rw-r--r-- pjobson/staff 722708 2019-03-12 13:50 2118it.bin
-rwxr-xr-x pjobson/staff  95576 2019-03-12 13:50 megarec.exe
-rw-r--r-- pjobson/staff 202240 2019-03-12 13:51 mptsas2.rom
-rwxr-xr-x pjobson/staff 181232 2019-03-12 13:50 sas2flsh.exe

@CoreyVidal
Copy link

Can confirm. Following the instructions and only getting 4 files, not 6. Tested in Windows 10, and Ubuntu 20.04 in Terminal.

@pjobson
Copy link
Author

pjobson commented Jun 19, 2020

That's so weird, I'll try to figure it out thanks.

@pjobson
Copy link
Author

pjobson commented Jun 19, 2020

I got rid of the gzip file and re-created the archive using a regular zip file. Tested it on two systems and at least for me there's 6 files.

Happy to get any feedback, thanks folks!!

@amtux
Copy link

amtux commented Jul 23, 2020

Thanks @pjobson! Successfully flashed PIKE 2008 to IT mode on Z9PA-D8.

I got rid of the gzip file and re-created the archive using a regular zip file. Tested it on two systems and at least for me there's 6 files.

Happy to get any feedback, thanks folks!!

The zip file had all 6 files.
To avoid any confusion in the future, I think it would also make sense to add the two missing files under Copy Flash Files to USB so they get copied to the flash drive.

@pjobson
Copy link
Author

pjobson commented Jul 23, 2020

To avoid any confusion in the future, I think it would also make sense to add the two missing files under Copy Flash Files to USB so they get copied to the flash drive.

Good catch @amtux ! I'll update shortly.

@welpher
Copy link

welpher commented Aug 11, 2020

Thanks, Successfully flashed Pike 2008 to IT mode on Z9PA-U8

@pjobson
Copy link
Author

pjobson commented Aug 11, 2020

@welpher thanks for posting your success! Good to see someone up and running with a more modern board than mine!

@jackcctse
Copy link

Thanks for the detailed guide. I just want to report my success of flashing pike 2008 / z9na-d6.

@ethnh
Copy link

ethnh commented Aug 17, 2021

I'm thinking about buying a PIKE 2008 / 2108 card, if I buy the 2108 would I be able to make a zfs / btrfs / software RAID as I would with this setup?

@zsxzsxzsx120
Copy link

thx for your help

@10JePoy28
Copy link

10JePoy28 commented Feb 15, 2023

will this work on PIKE 1078? I have an old system and want to make it in IT mode, or are there any new options now to make PIKE cards run on IT mode?
sas2flsh.exe -c 0 -list is not working for me and sticker of SAS address is also missing. Is there any other way to get the SAS Address?

@pjobson
Copy link
Author

pjobson commented Mar 14, 2024

@10JePoy28 - Sorry about the delay.

The PIKE 1078 is a LSI SAS 1078. According to this thread it is not IT flashable.

Plus the 1078 supports maximum of 2TB disks.

The PIKE 1078 has the same form factor as the PIKE 2008, you could probably install a PIKE 2008 in your MB and it would work fine.

The 2008 cards are currently $20ish shipped on eBay.

@pjobson
Copy link
Author

pjobson commented Mar 14, 2024

  • Updated instructions for FreeDOS 13
  • Cleaned up PIKE card details:
    • Chipset
    • Drive Size
    • SAS Version
    • IR Mode RAID levels
    • IT Mode links
  • Added eBay Buy it Now links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment