diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..f7e6777 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18.9.0 diff --git a/content/posts/2023/flashing-lsi-9211-with-efi/index.md b/content/posts/2023/flashing-lsi-9211-with-efi/index.md new file mode 100644 index 0000000..2630485 --- /dev/null +++ b/content/posts/2023/flashing-lsi-9211-with-efi/index.md @@ -0,0 +1,92 @@ +--- +title: Flashing the LSI-9211 to IT mode using an EFI shell +date: "2023-04-12" +template: "post" +category: "Homelab" +tags: + - "lsi" + - "lsi9211" + - "raid card" + - "storage" + - "SAS2000" + - "it mode" +description: "Flashing the LSI-9211 used to be way more difficult, luckily the EFI shell makes this task a lot simpler!" +socialImage: /media/flash-result.jpg +--- + + +I've been building a new storage-oriented server for a while now and have yet again decided to go with (3 +1 backup) LSI 9211 raid controllers. + +The reason I keep going for these specific raid controllers is quite simple. The card can theoretically support (8x500MB) 4GB/s in throughput divided over 8 drives (2x SFF-8087) which is near the maximum for consumer hard drives. + +Using 3 of these will allow me to use 24 drives in a single chassis without an expander whilst getting pretty good performance. +The fourth card that I got, and flashed, is simply used as a backup or debug card in case of any errors. + +## Downloading the files + +Before we can start flashing we will need to download some files. +The table below lists all the files with a brief description of what we'll use them for. + +| File | Description | +| --------------------------------------------------------------- | ------------------------------- | +| [EFI flashing utility](https://docs.broadcom.com/docs/12350820) | Flashing utility | +| [EFI ROM image](https://docs.broadcom.com/docs/12348628) | Card ROM file | +| [SAS2008 Firmware](https://docs.broadcom.com/docs/12350504) | IR and IT firmware for the 9211 | + +## Prepping the flash drive + +Make sure that you have a flash drive that is **32GB** or smaller and that it is formatted as **FAT32**. +Next, we'll add the following files to the **root** of the flash drive: + +- `Installer_P20_for_UEFI/sas2flash_efi_ebc_rel/sas2flash.efi` +- `UEFI_BSD_P20/uefi_bsd_rel/Signed/x64sas2.efi` +- `9210-8i_Package_P20_IR_IT_FW_BIOS_for_MSDOS_Windows/sasbios_rel/mptsas2.rom` +- `9210-8i_Package_P20_IR_IT_FW_BIOS_for_MSDOS_Windows/Firmware/HBA_9210_8i_IT/2108it.bin` + +## Flashing with EFI + +Because we are going to flash using EFI we don't really need anything besides the built-in EFI shell from our motherboard. Simply insert the flash drive and go into the BIOS or use the "select boot device" functionality to select the EFI shell: + +!["picture of the monitor showing boot options"](./media/boot-selector.jpg "selecting the EFI shell boot option") + +After the shell has booted successfully you can use the `map` command to see all available devices. In the image below you'll see that my flash drive is listed as `fs1`: + +![A list of devices in the EFI shell](./media/map-devices.jpg "a list of devices note that `fs1` is my flash drive") + +To switch into the drive simply enter the drive name on the command line followed by a semicolon: + +```efi +fs1: +``` + +Next, we'll determine that our adapters are available and we will simultaneously take note of their identifier, we can do so by issuing the following command: + +```efi +sas2flash.efi -listall +``` + +!["list of adapters"](./media/list-adapters.jpg "a list of adapters, I flash them one at a time so I only have card '0' available to me") + +Next, we can empty the current firmware with the following command: + +```efi +sas2flash.efi -o -e 6 +``` + +![Showing the result of the erasing action](./media/empty-firmware.jpg "bye, bye firmware 😢") + +Now we'll simply flash the new (IT-mode) firmware on it with the following command: + +```efi +sas2flash.efi -o -f 2108it.bin -b mptsas2.rom +``` + +![result of flashing in the EFI shell](./media/flash-result.jpg "1 card down, 3 more to go!") + +Wait patiently until the operations have completed. Note that it might seem like the steps repeat, just wait until it is completely done and exits back to the shell by itself. + +## Multiple cards and conclusion + +You can rerun the commands for different cards (by adding `-c x` where x is the card number from `listall`) or by simply physically switching the current one out for a different one. + +That's all there is too it, if you need any help feel free to hit me up! diff --git a/content/posts/2023/flashing-lsi-9211-with-efi/media/boot-selector.jpg b/content/posts/2023/flashing-lsi-9211-with-efi/media/boot-selector.jpg new file mode 100644 index 0000000..10e6914 Binary files /dev/null and b/content/posts/2023/flashing-lsi-9211-with-efi/media/boot-selector.jpg differ diff --git a/content/posts/2023/flashing-lsi-9211-with-efi/media/empty-firmware.jpg b/content/posts/2023/flashing-lsi-9211-with-efi/media/empty-firmware.jpg new file mode 100644 index 0000000..ba83c5d Binary files /dev/null and b/content/posts/2023/flashing-lsi-9211-with-efi/media/empty-firmware.jpg differ diff --git a/content/posts/2023/flashing-lsi-9211-with-efi/media/flash-result.jpg b/content/posts/2023/flashing-lsi-9211-with-efi/media/flash-result.jpg new file mode 100644 index 0000000..3ef9338 Binary files /dev/null and b/content/posts/2023/flashing-lsi-9211-with-efi/media/flash-result.jpg differ diff --git a/content/posts/2023/flashing-lsi-9211-with-efi/media/list-adapters.jpg b/content/posts/2023/flashing-lsi-9211-with-efi/media/list-adapters.jpg new file mode 100644 index 0000000..0c0a4c5 Binary files /dev/null and b/content/posts/2023/flashing-lsi-9211-with-efi/media/list-adapters.jpg differ diff --git a/content/posts/2023/flashing-lsi-9211-with-efi/media/map-devices.jpg b/content/posts/2023/flashing-lsi-9211-with-efi/media/map-devices.jpg new file mode 100644 index 0000000..09c92c4 Binary files /dev/null and b/content/posts/2023/flashing-lsi-9211-with-efi/media/map-devices.jpg differ diff --git a/gatsby-config.ts b/gatsby-config.ts index 10a75af..8e77013 100644 --- a/gatsby-config.ts +++ b/gatsby-config.ts @@ -108,7 +108,7 @@ export default { }, { resolve: "gatsby-remark-images-medium-zoom", - options: { background: "rgb(0, 0, 0,50%)" }, + options: { background: "rgb(0, 0, 0,70%)" }, }, "gatsby-remark-autolink-headers", "gatsby-remark-prismjs", diff --git a/package-lock.json b/package-lock.json index c487677..17866bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,7 +66,6 @@ "@types/react-helmet": "^6.1.6", "@types/react-test-renderer": "^18.0.0", "@types/react-toggle": "^4.0.3", - "@types/sass": "^1.45.0", "@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/parser": "^5.56.0", "autoprefixer": "^10.4.14", @@ -6907,16 +6906,6 @@ "@types/node": "*" } }, - "node_modules/@types/sass": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.45.0.tgz", - "integrity": "sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==", - "deprecated": "This is a stub types definition. sass provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "sass": "*" - } - }, "node_modules/@types/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.4.tgz", @@ -39029,15 +39018,6 @@ "@types/node": "*" } }, - "@types/sass": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.45.0.tgz", - "integrity": "sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==", - "dev": true, - "requires": { - "sass": "*" - } - }, "@types/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.4.tgz", diff --git a/static/.htaccess b/static/.htaccess index 049d66c..351de2b 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -66,6 +66,14 @@ RewriteRule ^(.*)$ http://www.mastermindzh.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f + +FileETag None +Header unset ETag +Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" +Header set Pragma "no-cache" +Header set Expires "Thu, 1 Jan 1970 00:00:00 UTC" + + # redirect old blog pages Redirect /home / Redirect /cookies /pages/legal/cookies