Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
I'm in the process of installing ubuntu onto one of my drives, I've been given the instruction to "dd the whole USB stick to that partition", the usb stick containing a bootable copy of ubuntu

I already have a partition ready. So how do I go about this? Presumably with terminal? Thanks.

here are the original instructions (bottom of page)
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
Hello! I am new to this forum! But I'll try to help you out!

So you've decided to take the liveCD route eh? Well not to worry I did this just last week on my MacBook Air 3,1! To start, the instructions on Ubuntu are rubbish! Here's a full set of instructions that I have devised.

I put it in as code to make it easier to read for you and for others! (at least I hope it's easier to follow)
Code:
+Download Ubuntu iso
+Use UNetbootin to install the files to the root drive (usb)
+Create 3 new partitions
          -Mac Disk Utility:
               -2gb - for Ubuntu live cd files
               -4gb - for /home and linux swap
               -20gb - Actual Ubuntu [SIZE="1"](size depends on what you really want but can be changed later on)[/SIZE]
+Move iso files (copy) to partition (2gb)
          -dd if=/dev/disk1s0 of=/dev/disk0s3
               -[B][SIZE="1"]Note: /dev/disk1s0 is your usb. In terminal type: "diskutil list" to see what your usb name is. This is also a good time to make sure that the path to the 2gb partition is correct[/SIZE][/B]

+Install rEFIT
          -on restart rEFIT should load
          -go to "set up partitions" (or something similar to that)
               -answer yes to sync and activate FAT partition
+launch Ubuntu (from partition)
          -If you are experiencing graphical errors and no internet go to its terminal and type # Sudo -s and then # gedit /etc/default/grub
               -add nomodeset to GRUB_CMDLINE_LINUX="" nomodeset goes inside the ""
+If you have a macbook air or experience certain errors installing ubuntu later on especially around 15% than follow this next step:
+Dismount CDROM
          -Terminal: sudo gedit /etc/mtab
               -delete line specifying CDROM mount directory
                    -ie /dev/sda3/cdrom vfat
               -save
+++Now you are ready to install!

+Go through setup as usual until when it asks for you to partition hdd. Choose advanced!!!
          -at the partitioning list:
               -delete the 4gb partition to free space
                    -with the newly added 4gb free space click "ADD"
                         -choose these options:
                              -size: 3gb
                              -format: EXT4
                              -type: /home
                              -done
                    -Click "ADD" on the 1gb free space created
                         -choose these options:
                              -size: 1gb
                              -format: swap (something-swap or vice-versa, you'll see it)
                    -With the 20gb selected choose CHANGE
                         -format: EXT4
                         -Type: "/" (this is your root)
+++Cross your fingers and install!


----------

Please tell me if you need to help with wireless!
 
Last edited:

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
Thanks, this has cleared a lot up

This may seem like a silly question but I'm new to this, the partitions that I've made on the drive are all in mac osx journaled format, does it matter?

I've managed to do everything, synced the partitions (found no 'activate FAT partition' option), but when launching ubuntu all I get is the penguin image with no progress and no other options
 
Last edited:

ryalho

macrumors newbie
Feb 24, 2012
13
0
The 2gb partition, according to what I chose, was MS-DOS. But for the other two, this doesn't matter because Ubuntu will reformat them. We also went in there to change their formats to EXT4 in the installation.

No question is a stupid one. If you have any more questions please feel free to ask me. Ubuntu on a mac was one of the most tedious and time consuming endeavors I have ever pursued.

For instance, on a PC, it's practically inserting that UNetbootin liveCD into the computer and booting from it. Done. Haha, but you really do learn a lot from loading Ubuntu onto a mac.

Good Luck!
 
Last edited:

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
Thanks again for your help.

My 2 gig partition is ms-dos, but I still either get the penguin logo forever or a black screen which says "operating system missing" at the top left...
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
Hmm. Did you use UNetbootin to make a liveCD on your USB? What version of Ubuntu are you using? What is your computer model?

You obviously did "dd if=/dev/disk1s0 of=/dev/disk0s3" correctly because you can see the penguin on boot up as well as when you boot onto the 2gb partition. So it either freezes on the penguin or complete error all together. Hmm. Perhaps you are booting from the usb by accident? That would be the only other way you could get "operating system missing."
 

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
Yeah I used UNetbootin, the version is 11.10, and it's an imac, mid 2008

Nope, removed the usb, still the same thing
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
OK, on boot up you see the apple and the penguin. Below that there should be a hard drive with a pie chart above it. That is the "Start Partitioning Tool" have you already said yes (y) to its question and restarted the computer?
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
OK, here's another thing. When you unmount both drives before doing "dd if=/dev/disk1s0 of=/dev/disk0s3" did you unmount the 2gb partition as a volume?

before copying the files type this into the terminal:
/usr/sbin/disktool -p disk0s13 0
disk0s13 being YOUR partition.
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
Another way you can unmount the 2gb partition is by going into Disk Utility and right clicking that partition and unmounting it. After the files are copied you need to mount it again by just going into Disk Utility and with the 2gb partition simply mount it by pressing the blue button.

I decided to do this installation again with 11.10 to help you out. I had 10.04 LTS installed and compared to this, my way seemed much more archaic.
 
Last edited:

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
Yep, said yes to sync and restarted

I'm pretty sure I unmounted then mounted it again, but I'll have another go to rule it out as a cause. Thanks :)

on the ubuntu site itself it says to convert the iso into an img file before putting it on the usb, maybe that's why?

Note: this procedure requires an .img file that you will be required to create from the .iso file you download.



TIP: Drag and Drop a file from Finder to Terminal to 'paste' the full path without typing and risking type errors.



Download the desired file
Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
Convert the .iso file to .img using the convert option of hdiutil (e.g., hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso)
Note: OS X tends to put the .dmg ending on the output file automatically.
Run diskutil list to get the current list of devices
Insert your flash media
Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
Using /dev/rdisk instead of /dev/disk may be faster.
If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the 'Disk Utility.app' and unmount (don't eject) the drive.
Run diskutil eject /dev/diskN and remove your flash media when the command completes
Restart your Mac and press alt while the Mac is restarting to choose the USB-Stick
 
Last edited:

ryalho

macrumors newbie
Feb 24, 2012
13
0
As I said, the Ubuntu instructions are rubbish ;)
-(Also I got errors doing it their way)

UNetbootin takes care of this step by making a live image from the iso file.

Code:
# diskutil list
[find name of drives]
# diskutil umountDisk /dev/disk(usb)
# df
[SIZE="2"][B][to find name of 2gb partition volume][/B][/SIZE]
# sudo umount -f /Volumes/[name of physical drive NOT Directory]
# dd if=/dev/disk1s1 of=/dev/disk0s3
[SIZE="2"][B]Then mount partition again by going into the Disk Utility and right clicking the partition to mount[/B][/SIZE]

Once done, restart and run partitioning tool then restart again. You should now be able to run the liveCD partition.

(Sorry for the backtrack, I wanted to get rid of any discrepancies in the way we're both tackling this.)
 
Last edited:

ryalho

macrumors newbie
Feb 24, 2012
13
0
I'll have an update here soon. 11.10 on mac is proving to be much more difficult than what I had originally anticipated.

UPDATE:
OK, that was frustrating but I think I got it. (Just about finished installing 11.10)

I used the same instructions as the ones I posted previously (last post). The only difference was, when I was partitioning the hdd I reformatted all of them as ms-dos (except for the Mac partition of course). When restarting, to boot into Ubuntu, I made sure that the USB, with the liveCD, was ejected before I ran the rEFIT's partitioning tool (Don't forget to restart) as well as before I began installing Ubuntu.

I hope this helps!

Edit: Oh! Partly the reason for why I re-installed Ubuntu was because I wanted more space on that partition. I assumed it would be easy enough to move some free space to it but having the inability to load gparted as a bootable drive hindered this process. So please, make your Ubuntu partition size decision now!! :) Because I have a Macbook Air, I went 88gb for the Ubuntu partition.
 
Last edited:

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
Nothing works I'm afraid, even with different versions of ubuntu and following your mount/unmount/sync then restart instructions. Still the same missing operating system error.

Is it worth getting an external cd drive and trying to install by burning a cd or will I get the same result?
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
Getting a superdrive might be your best option (if you want). I felt like I would be losing the fight if I got one for the MBA, so I spent many frustrating hours to get the OS working.

This doesn't make any sense to me at all! You are able to mount the partition back onto the computer which means your mac can read the files. So when booting up you should be able to boot from the linux icon. Tell me, do you see one or two linux icons at boot up?

I'm sorry for the late response, I was out of town for a science fair presentation. We'll get this figured out though.

Hmm, are you using the 64bit or the 32bit? On Ubuntu, the 64bit file is corrupt and intel-mac's work better with the 32bit.
 

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
I only see one, and I've been trying to install 64 bit versions, I'll try 32bit, thanks
 

ryalho

macrumors newbie
Feb 24, 2012
13
0
Great tell me how it goes! I hate putting you through all these hoops though.
 

chogendorn

macrumors newbie
Jun 14, 2012
1
0
it worked!!

Thanks so much, using these methods I was able to install Ubuntu 12.04 on my Macbook Air 1,1!! I had to do a couple tweaks, so below are the instructions from the first post modified with the additional stuff I did:

+Download Ubuntu.iso from ubuntu.com

+Download UNetbootin from sourceforge and use it to install the ubunto.iso file to a usb stick

+Use the Mac Disk Utility to create 2 new partitions
-2gb FAT for Ubuntu live cd files
-20gb FAT or more to be used later

+In Mac Terminal, type "diskutil list" to see what the names of your
partitions are. For me it was /dev/disk1s1 for my USB stick and
/dev/disk0s4 for my 2GB FAT partition.

+Move installation files from USB stick to 2GB partition:
-sudo dd if=/dev/disk1s1 of=/dev/disk0s4
-Note: the names of your disks could differ

+Install rEFIT
-on restart rEFIT should load
-go to "set up partitions" (or something similar to that)
-answer yes to sync and activate FAT partition
- restart computer

+launch Ubuntu (from partition)
- choose the option "Try Ubuntu without installing"

+Now you can play with your little Ubuntu system and see if you like it. If you do, it's time to install. But first, you have to open the Ubuntu terminal using ctrl-alt-t and then type the following commands:
$ sudo cp -r /cdrom /cdrom2
$ sudo umount -lfr /cdrom
$ sudo rmdir /cdrom
$ sudo mv /cdrom2 /cdrom

+Now double-click the Ubuntu installer. Choose "another setup" for your partitions.
-at the partitioning list:
-delete the 20GB+ FAT partition to create free space
-with the newly added 20GB+ free space click "ADD"
-add a 1GB EXT2 partition with mount point /boot
-add a 2GB partition of type swap
-add a 1GB partition of type BIOS
-add a 16+GB partion of type EXT4 with mount point /

+Click done hopefully it will install!!


(some of this extra info came from http://cweiske.de/tagebuch/ubuntu-on-macbook-air.htm)
 

drew b

macrumors newbie
Jun 24, 2012
1
0
permission denied

+In Mac Terminal, type "diskutil list" to see what the names of your
partitions are. For me it was /dev/disk1s1 for my USB stick and
/dev/disk0s4 for my 2GB FAT partition.

+Move installation files from USB stick to 2GB partition:
-sudo dd if=/dev/disk1s1 of=/dev/disk0s4
-Note: the names of your disks could differ





i did the sudo dd it asked for password then said permission denied please help
 

roboko

macrumors newbie
Original poster
Nov 1, 2011
13
0
I did get round to trying out the 32-bit versions, they didn't work, same problem, in the end I got a new superdrive and used it to install ubuntu. But I did end up learning quite a lot from your instructions, thanks :)
 

UserBae

macrumors newbie
Aug 12, 2012
1
0
Lost my Mac OS X Leopard

Hello,

I was following the tutorial and everything was going well. Until I arrived at the Ubuntu installer and decided to go rogue. Rogue meaning I clicked the Ubuntu option of deleting my Mac OS X and installing Ubuntu over it.

It was installing, then I got an error message cant recall what it said. I tried clicking cancel but it just remained frozen. After 5minutes of waiting, I decided to manually restart the computer by shutting it off (I know, really bad move).

In a nutshell I restarted my cpu only to see "Missing Operating System".

I still have the USB with Ubuntu over it and a computer that turns on and picks up the GNU GRUB if the USB is plugged.

Can I save my machine or am I done for?

To make matters worst my hard disk does not work, that is why I went the USB route in the first place.


(P.S. The advice the people gave on installing Ubuntu was superb, I just went rogue and bashed it all up. Moral of the story, do not go rogue.)
 

mkunkel

macrumors newbie
Oct 18, 2012
1
0
Missing operating system

Was the issue of missing operating system ever resolved?
When I follow this guide for a Mac OSX lion, when I try to load into ubunutu 12.4 32-bit it says missing operating system.
 

Ubun

macrumors newbie
Apr 22, 2013
1
0
dowloaded Unetbootin and Refit but how and where should I run it

Hi as per your instruction on the below link, I have downloaded iso, unetbootin and Refit/Refind but I am having issues running it, can you pls tell me where and how should I run Unetbootin is it from Mac or Windows ? What is the application to run unetbootin and Refit I have unzipped the files and waiting for it.

thanks for your help.

Hello! I am new to this forum! But I'll try to help you out!

So you've decided to take the liveCD route eh? Well not to worry I did this just last week on my MacBook Air 3,1! To start, the instructions on Ubuntu are rubbish! Here's a full set of instructions that I have devised.

I put it in as code to make it easier to read for you and for others! (at least I hope it's easier to follow)
Code:
+Download Ubuntu iso
+Use UNetbootin to install the files to the root drive (usb)
+Create 3 new partitions
          -Mac Disk Utility:
               -2gb - for Ubuntu live cd files
               -4gb - for /home and linux swap
               -20gb - Actual Ubuntu [SIZE="1"](size depends on what you really want but can be changed later on)[/SIZE]
+Move iso files (copy) to partition (2gb)
          -dd if=/dev/disk1s0 of=/dev/disk0s3
               -[B][SIZE="1"]Note: /dev/disk1s0 is your usb. In terminal type: "diskutil list" to see what your usb name is. This is also a good time to make sure that the path to the 2gb partition is correct[/SIZE][/B]

+Install rEFIT
          -on restart rEFIT should load
          -go to "set up partitions" (or something similar to that)
               -answer yes to sync and activate FAT partition
+launch Ubuntu (from partition)
          -If you are experiencing graphical errors and no internet go to its terminal and type # Sudo -s and then # gedit /etc/default/grub
               -add nomodeset to GRUB_CMDLINE_LINUX="" nomodeset goes inside the ""
+If you have a macbook air or experience certain errors installing ubuntu later on especially around 15% than follow this next step:
+Dismount CDROM
          -Terminal: sudo gedit /etc/mtab
               -delete line specifying CDROM mount directory
                    -ie /dev/sda3/cdrom vfat
               -save
+++Now you are ready to install!

+Go through setup as usual until when it asks for you to partition hdd. Choose advanced!!!
          -at the partitioning list:
               -delete the 4gb partition to free space
                    -with the newly added 4gb free space click "ADD"
                         -choose these options:
                              -size: 3gb
                              -format: EXT4
                              -type: /home
                              -done
                    -Click "ADD" on the 1gb free space created
                         -choose these options:
                              -size: 1gb
                              -format: swap (something-swap or vice-versa, you'll see it)
                    -With the 20gb selected choose CHANGE
                         -format: EXT4
                         -Type: "/" (this is your root)
+++Cross your fingers and install!


----------

Please tell me if you need to help with wireless!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.