3

I just got a Raspberry Pi 4 4gb and I've been trying to get Ubuntu 64-bit running on it, but I can't get past flashing it to the card. I've been following this tutorial:l https://ubuntu.com/tutorials/create-an-ubuntu-image-for-a-raspberry-pi-on-macos#2-on-your-macos-machine In step 5, when I type "diskutil unmountDisk < drive address >" in the terminal, instead of showing "Unmount of all volumes on < drive address > was successful", it says"-bash: syntax error near unexpected token `newline' " So how do I fix this and successfully get Ubuntu on a microSD card? Thanks!

milesvw
  • 53
  • 5

1 Answers1

3

The reason you were getting the error you were getting is because in the terminal < and > have special meaning. < means to send command on the right into application or commands to the left - and the same is said about > but in reverse.

If you are typing in diskutil unmountDisk < drive address > into the terminal, this could be your problem. You should instead be replacing < drive address > with an actual drive address e.g.

/Volumes/flashdrivename.

You will need to find out what the volume is called. You can do this by either using the Finder app or you can do this in a terminal by doing:

cd /Volumes

Then:

ls -l

You will then get a list of volumes (aka drives). I would recommend doing this before the SD card is inserted and then after since you will be able to spot instantly which one is the drive that's new and will contain your SD card. Please be super careful about which one you choose because you will be wiping it with your boot image.

Another way is to do:

df -H

This will list all the mounted volumes. Again, useful if you do a before and after the SD card is inserted.

Once you've found your volume that contains the SD card the next step is to try the command again but with the volume name (again don't forget you need to replace the bolded part):

/Volumes/flashdrivename

So:

diskutil unmountDisk /Volumes/flashdrivename

Let me know if this helps, and if it doesn't I can refine the answer for you.

hazrpg
  • 936
  • 8
  • 27