Jump to content
RESET Forums (homeservershow.com)

Booting from 5th SATA Port. Help installing Grub on USB


Recommended Posts

I'm trying to set up an SSD in the 5th drive bay. I have the SSD drive, the correct cables and a USB stick with Ubuntu on it. AHCI mode is enabled in the BIOS, the USB Key is set as the 1st boot device.

I installed Ubuntu on to the SSD with no drives in any bays. All boots up fine.

I put a stick in the internal USB slot and followed what I thought were the instructions to install grub on to it. (https://jarrodla.blogspot.com/2014/04/hp-microserver-gen8-boot-from-5th-sata.html)

I rebooted with the stick in place and the SSD in bay 5...successfully boots.

I put a drive in the cage. Reboot. No luck.


I'm wondering if the instructions I followed for installing Grub actually worked. How can I tell and what are the steps to follow to do it properly if the ones I followed haven't worked?

Link to comment
Share on other sites

OK, the instructions I followed were pretty poor help to someone who doesn't necessarily know exactly what they're doing. There were a few things that are critical to the process that were missed out. I've included the actual step by step needed to make this work.


1. Identify the name of your USB drive. For the purposes of these instructions we will work on sdb

2. If the drive is not already blank, zero it using:
dd if=/dev/zero of=/dev/sdb

3. Create a 128 mb partion at the start of the USB
sudo fdisk /dev/sdb
Press 'n' to create a partition at the prompt

select the defaults and enter 128M as the size

Press 'a' and select partition 1 to make it bootable

Press 'p' and ensure there is an asterisk in the boot column

press 'w' to write the changes to the disk

4. sudo mkfs -t ext2 /dev/sdb1
5. mkdir /tmp/myusb
6. sudo mount /dev/sdb1 /tmp/myusb
7. sudo mkdir /tmp/myusb/boot

8. Install grub to the USB:
 grub-install --boot-directory=/tmp/myusb/boot /dev/sdb
9. Update the grub config:
 update-grub --output=/tmp/myusb/boot/grub/grub.cfg
9b. (optional) you may wish to

sudo gedit /tmp/myusb/boot/grub/grub.cfg

and edit the 30 second delay down to something more to your preference. Save and exit gedit.
10. Reboot the system and ensure the USB Key entry is shown at the top of the boot order in the BIOS.

The drives can now be reinstalled in to the main drive bays. The boot procedure should run through normally and try to boot from c:.




Link to comment
Share on other sites

  • 9 months later...

Honestly.... the easiest way to do this is to just install a full version of Ubuntu Desktop with GRUB2 and let it be the default boot loader. You can easily make changes in the future and it's so simple and quick to set up.


  • Set your BIOS to AHCI
    • The first thing to do is install Windows or whichever OS you want on the 5th SATA port. The key to this is to have it be the only drive plugged into the system and it'll boot fine. Remove the front drives, all USB, etc
    • I just installed Windows Server 2022 this way and it ran perfectly in AHCI mode.
  • Once that Windows OS or other is setup and running, power the server down and unplug that SATA port.
    • Double check - Unplug all drives, SSD, front HDD etc
  • Install the target boot USB stick in the internal slot (32GB is plenty) this is where to install Ubuntu
  • Download Ubuntu Desktop ISO and flash to another USB stick.
  • Use Rufus to write the ISO to USB
  • Mount the Ubuntu stick in the front port with a keyboard
  • Get Ubuntu installed as GUI but a minimal install to the internal USB. It's a full desktop so it can be handy, but I've only installed the basics.
  • Install one new tool on the Ubuntu server called - Grub Customizer
  • Open a terminal and type
  • sudo apt install grub-customizer
  • Shutdown the server
    • Unplug the Ubuntu installer USB stick from the front.
    • Plug back in your SDD on the internal SATA port
    • Plug back in your front drives
    • Leave your newly installed Ubuntu in the internal USB port as we want to boot from this al the time.
  • Boot into BIOS and set the default boot to be USB. This is critical
  • The Ubuntu Desktop will still boot from the internal USB
  • Run the tool - Grub Customizer from within Ubuntu
  • It will scan and detect all of your drives looking for operating systems
  • It'll find your Windows install as "DOS" so move that to the very top of the list as the default entry
  • Rename it to something meaningful - Windows Server for example
  • Make the Ubuntu entry second
  • Delete all other entries in the list
  • Save
  • Reboot and the server will automatically boot from USB, then load your OS from the 5th SATA port automatically.





  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Way i booted from the sata port was to set the server BL120I onboard into raid mode.Then go into intelligent provisioning and create an array with the drive on the sata port and set it as the first bootable array.Then create your arrays with drives in drive cage and you should boot from your ssd.There are many ways to do this.I eventually put a p222 controller in the pcie slot and took the 8087 sas cable from the bl120i port on the board and plugged it into internal port on the sas card.I then used a 4 port sas to sata forward breakout cable and plugged that into mainboard sas with boot drive on port 1 as it will always try to boot from port 1 .Then got a bracket on side of psu and hung two hp 2.5 1tb sata from that on ports 2 and 3 from breakout cable.Temps are a wee bit high on passive cooling on lowest profile in bios but not crazy.Waiting on heatsinks for lom chip as it runs hot.Currently have server 2016 and debian 11 dual booting from 750gb wd blue spinner in a fake optical drive caddy on top of server and leaving it to boot as normal with grub bootloader on beginning of boot drive lets me choose between server 2016 or debian 11 at boot time.Though had to chop up drive into 2 partitions and install windows first and then debian on second partition to get grub installed the way i wanted then used grub configurator in debian to set up entries and their order so server 2016 boots by default.It is a work in progress and i may change config again.It is a great little box to tinker with though.It certainly helps having an EMEA model as you gain 50w on the power supply that way as the U.S. models only have a 150w psu and the EMEA models have 200w

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...