Matt Penfold
Posts: 9
Joined: Thu Mar 09, 2017 4:18 pm

Ubuntu Server on HDD

Fri May 31, 2019 8:17 am

It is great to see an official ARM64 Ubuntu Server release.

I have no problems getting it working using an SD card, but it fails when I install the image to an HDD (It tries to boot from an SD card, and of course, there isn't one!). Does anyone have some pointers as to how I can get it booting from the HDD? I suspect I will need to edit some files after I have written the image to the hard drive.

Andyroo
Posts: 3376
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Ubuntu Server on HDD

Fri May 31, 2019 8:52 am

Is your Pi capable of booting from a HDD?

To get it up and running you could try creating an SD card (FAT32 format) just with bootcode.bin only on it and boot from that with the HDD connected.

That may be easier than swapping the HDD between machines to edit files :lol:
Need Pi spray - these things are breeding in my house...

Matt Penfold
Posts: 9
Joined: Thu Mar 09, 2017 4:18 pm

Re: Ubuntu Server on HDD

Fri May 31, 2019 12:49 pm

Andyroo wrote:
Fri May 31, 2019 8:52 am
Is your Pi capable of booting from a HDD?

To get it up and running you could try creating an SD card (FAT32 format) just with bootcode.bin only on it and boot from that with the HDD connected.

That may be easier than swapping the HDD between machines to edit files :lol:
Yes, it will boot from the HDD if I put a Raspbian on the drive. Good thinking on using a minimal SD card!

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Ubuntu Server on HDD

Fri May 31, 2019 1:10 pm

Hey Matt Penfold

Is your HDD connected to Pi via USB?. If it is you can't boot unless you enable usb booting on it.
Did you properly flash Ubuntu to HDD ? Try setting the boot bit
https://www.raspberrypi.org/documentati ... des/msd.md

Matt Penfold
Posts: 9
Joined: Thu Mar 09, 2017 4:18 pm

Re: Ubuntu Server on HDD

Fri May 31, 2019 1:15 pm

Icosagon wrote:
Fri May 31, 2019 1:10 pm
Hey Matt Penfold

Is your HDD connected to Pi via USB?. If it is you can't boot unless you enable usb booting on it.
Did you properly flash Ubuntu to HDD ? Try setting the boot bit
https://www.raspberrypi.org/documentati ... des/msd.md
Yes, the boot bit is set, and I have had the PI booting Raspbian from the HDD, but now I am trying the official Ubuntu server image and it is not working. Almost certainly because there is something wrong with the config files. I am just not sure what!

Andyroo
Posts: 3376
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Ubuntu Server on HDD

Fri May 31, 2019 1:59 pm

Looking at the images https://www.ubuntu.com/download/iot/raspberry-pi-2-3 it only mentions 2 and 3 - no 3B+

Firmware and drivers changed at 3B+ so could that be the reason?
Need Pi spray - these things are breeding in my house...

Matt Penfold
Posts: 9
Joined: Thu Mar 09, 2017 4:18 pm

Re: Ubuntu Server on HDD

Fri May 31, 2019 2:36 pm

Andyroo wrote:
Fri May 31, 2019 1:59 pm
Looking at the images https://www.ubuntu.com/download/iot/raspberry-pi-2-3 it only mentions 2 and 3 - no 3B+

Firmware and drivers changed at 3B+ so could that be the reason?
It is just a Pi3B, not a plus model.

I have found some instructions here (https://wiki.ubuntu.com/ARM/RaspberryPi ... .2FAArch64) which I am in the process of testing. First though I need to setup a virtual Linux box.

User avatar
HawaiianPi
Posts: 4262
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Ubuntu Server on HDD

Fri May 31, 2019 5:00 pm

It looks like cmdline.txt needs to be edited to point to the USB drive (/etc/fstab seems to be using labels, so that's probably okay).

Code: Select all

net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Change the root=/dev/mmcblk0p2 statement to point to the second partition of the USB drive, preferably using something more robust than /dev/sda2.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Matt Penfold
Posts: 9
Joined: Thu Mar 09, 2017 4:18 pm

Re: Ubuntu Server on HDD

Fri May 31, 2019 6:51 pm

HawaiianPi wrote:
Fri May 31, 2019 5:00 pm
It looks like cmdline.txt needs to be edited to point to the USB drive (/etc/fstab seems to be using labels, so that's probably okay).

Code: Select all

net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Change the root=/dev/mmcblk0p2 statement to point to the second partition of the USB drive, preferably using something more robust than /dev/sda2.
Thanks, that is one of the places I was going wrong. I now Ubuntu server booting from the HDD with no SD card required. The instructions to do it are in that article I linked to, but a bit all over the place. I might write up a simplified version.

Return to “Other”