Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 24, 2012, 06:31 PM   #1
roboko
macrumors newbie
 
Join Date: Nov 2011
dd usb to partition

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)
roboko is offline   0 Reply With Quote
Old Feb 24, 2012, 08:46 PM   #2
ryalho
macrumors newbie
 
Join Date: Feb 2012
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 depends on what you really want but can be changed later on)
+Move iso files (copy) to partition (2gb)
          -dd if=/dev/disk1s0 of=/dev/disk0s3
               -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

+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 by ryalho; Feb 24, 2012 at 08:54 PM.
ryalho is offline   3 Reply With Quote
Old Feb 25, 2012, 07:03 AM   #3
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
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 by roboko; Feb 25, 2012 at 09:27 AM.
roboko is offline   0 Reply With Quote
Old Feb 25, 2012, 11:27 AM   #4
ryalho
macrumors newbie
 
Join Date: Feb 2012
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 by ryalho; Feb 25, 2012 at 11:43 AM.
ryalho is offline   0 Reply With Quote
Old Feb 25, 2012, 02:12 PM   #5
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
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...
roboko is offline   0 Reply With Quote
Old Feb 25, 2012, 05:37 PM   #6
ryalho
macrumors newbie
 
Join Date: Feb 2012
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."
ryalho is offline   0 Reply With Quote
Old Feb 25, 2012, 05:44 PM   #7
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
Yeah I used UNetbootin, the version is 11.10, and it's an imac, mid 2008

Nope, removed the usb, still the same thing
roboko is offline   0 Reply With Quote
Old Feb 25, 2012, 06:54 PM   #8
ryalho
macrumors newbie
 
Join Date: Feb 2012
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 is offline   0 Reply With Quote
Old Feb 26, 2012, 12:37 AM   #9
ryalho
macrumors newbie
 
Join Date: Feb 2012
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 is offline   0 Reply With Quote
Old Feb 26, 2012, 02:44 AM   #10
ryalho
macrumors newbie
 
Join Date: Feb 2012
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 by ryalho; Feb 26, 2012 at 03:27 AM.
ryalho is offline   0 Reply With Quote
Old Feb 26, 2012, 06:35 AM   #11
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
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?

Quote:
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 by roboko; Feb 26, 2012 at 06:59 AM.
roboko is offline   0 Reply With Quote
Old Feb 26, 2012, 11:02 AM   #12
ryalho
macrumors newbie
 
Join Date: Feb 2012
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
[to find name of 2gb partition volume]
# sudo umount -f /Volumes/[name of physical drive NOT Directory]
# dd if=/dev/disk1s1 of=/dev/disk0s3
Then mount partition again by going into the Disk Utility and right clicking the partition to mount
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 by ryalho; Feb 26, 2012 at 12:51 PM.
ryalho is offline   0 Reply With Quote
Old Feb 26, 2012, 02:26 PM   #13
ryalho
macrumors newbie
 
Join Date: Feb 2012
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 by ryalho; Feb 26, 2012 at 08:39 PM.
ryalho is offline   0 Reply With Quote
Old Feb 28, 2012, 02:59 PM   #14
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
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?
roboko is offline   0 Reply With Quote
Old Mar 1, 2012, 11:54 AM   #15
ryalho
macrumors newbie
 
Join Date: Feb 2012
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.
ryalho is offline   0 Reply With Quote
Old Mar 1, 2012, 05:11 PM   #16
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
I only see one, and I've been trying to install 64 bit versions, I'll try 32bit, thanks
roboko is offline   0 Reply With Quote
Old Mar 1, 2012, 06:43 PM   #17
ryalho
macrumors newbie
 
Join Date: Feb 2012
Great tell me how it goes! I hate putting you through all these hoops though.
ryalho is offline   0 Reply With Quote
Old Jun 14, 2012, 02:38 PM   #18
chogendorn
macrumors newbie
 
Join Date: Jun 2012
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)
chogendorn is offline   0 Reply With Quote
Old Jun 24, 2012, 09:35 AM   #19
drew b
macrumors newbie
 
Join Date: Jun 2012
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
drew b is offline   0 Reply With Quote
Old Jul 15, 2012, 08:58 AM   #20
roboko
Thread Starter
macrumors newbie
 
Join Date: Nov 2011
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
roboko is offline   0 Reply With Quote
Old Aug 12, 2012, 09:39 AM   #21
UserBae
macrumors newbie
 
Join Date: Aug 2012
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.)
UserBae is offline   0 Reply With Quote
Old Oct 18, 2012, 02:53 AM   #22
mkunkel
macrumors newbie
 
Join Date: Oct 2012
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.
mkunkel is offline   0 Reply With Quote
Old Apr 22, 2013, 03:45 AM   #23
Ubun
macrumors newbie
 
Join Date: Apr 2013
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.

Quote:
Originally Posted by ryalho View Post
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 depends on what you really want but can be changed later on)
+Move iso files (copy) to partition (2gb)
          -dd if=/dev/disk1s0 of=/dev/disk0s3
               -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

+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!
Ubun is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Partition size for windows 7, USB 3 gaming SirBuckinghamVI Windows, Linux & Others on the Mac 9 Aug 2, 2013 09:50 AM
Bootcamp not giving partition option(USB) adellachris Windows, Linux & Others on the Mac 4 Nov 5, 2012 05:14 AM
Deleted main partition with hopes of reinstall from USB iLikeToDrum OS X 10.8 Mountain Lion 1 Sep 14, 2012 11:32 AM
USB Install of ML and no recovery partition sevimli OS X 10.8 Mountain Lion 1 Aug 4, 2012 10:38 AM
Renaming ML install partition on USB disk parish OS X 10.8 Mountain Lion 3 Aug 2, 2012 10:40 AM

Forum Jump

All times are GMT -5. The time now is 06:12 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC