Writing disk images on OSX
Writing disk images on OSX
I realise that this is covered in the Wiki, and I have followed the instructions, but I can't seem to make a bootable image.
I have a USB/MicroSD adapter that I have used in the past to boot Ubuntu. I tried to use this to write Buzz's 10.10 Maverick
image but I can't get it to boot.
I know there are a number of options when writing the image using dd in the OSX the command line but could someone tell me exactly what I need to type to get the 10.10 image to work please?
I have a USB/MicroSD adapter that I have used in the past to boot Ubuntu. I tried to use this to write Buzz's 10.10 Maverick
image but I can't get it to boot.
I know there are a number of options when writing the image using dd in the OSX the command line but could someone tell me exactly what I need to type to get the 10.10 image to work please?
Re: Writing disk images on OSX
I seem to have the same issue writing Joli OS on my USB flashdrive on OS X. I write the image following these steps:
http://meinit.nl/writing-directly-to-a- ... omment-145
http://meinit.nl/writing-directly-to-a- ... omment-145
Re: Writing disk images on OSX
This should work:
Where diskX is the drive number reported by diskutil list. disk0 is likely your boot drive, so please don't point dd at that.
For some reason writing to /dev/diskX is slower than writing to /dev/rdiskX. I don't know why.
Code: Select all
gzip -dc <name of image file> | sudo dd of=/dev/diskX bs=10m
For some reason writing to /dev/diskX is slower than writing to /dev/rdiskX. I don't know why.
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 

Re: Writing disk images on OSX
There seem to be so many ways of doing this.
http://www.stephenford.org/joggler/ says:
http://www.jogglerwiki.com/index.php?ti ... USB_drives says:
http://joggler.exotica.org.uk/ubuntu/ says:
http://birdslikewires.co.uk/articles/jogglerflash/ says:
The important bit seems to the bs value but I don't know which to use for which image and I don't know if the count option is needed at all.
http://www.stephenford.org/joggler/ says:
Code: Select all
dd if=joggler_unr_9.10_v1.3a.bin of=<your_own_device> bs=10M count=365
Code: Select all
dd if=joggler_unr_9.10_v1.3a.bin of=/dev/disk1 bs=10485760
Code: Select all
gzip -dc IMAGENAME.img.gz | sudo dd of=/dev/YOUR_USB_DEVICE
Code: Select all
gzip -dc ubuntuserverlucid.img.gz | sudo dd of=/dev/rdiskX bs=1m
Re: Writing disk images on OSX
The bs (block size) value is not essential, but can speed up the copying dramatically. It just sets how large the chunks of data are that are written in one go, eg. "do I copy 1MB at a time, 1 byte at a time or 10MB at a time?". The count option shouldn't be used for recent images; this tells dd when to stop - setting an arbitrary value may mean you don't copy part of the image file. The images are usually designed for 4GB devices and smaller.marctwo wrote:There seem to be so many ways of doing this.
The important bit seems to the bs value but I don't know which to use for which image and I don't know if the count option is needed at all.
More recently images have been distributed compressed (very sensible). The gzip bit decompresses the file and sends the output to dd.
Type 'man dd' at the command line for more information on how to use it.
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 

Re: Writing disk images on OSX
Thanks roobarb.
So what you are saying is that the block size won't make any difference to the final image? What's the difference between 10m and 10M? Is is megabytes vs megabits? Why would I not be able to boot the recent images when I had no problems with the old ones?
So what you are saying is that the block size won't make any difference to the final image? What's the difference between 10m and 10M? Is is megabytes vs megabits? Why would I not be able to boot the recent images when I had no problems with the old ones?
Re: Writing disk images on OSX
Nope, as I understand it the block size is literally to do with the size of the chunks dd handles before pushing the data to the output device. Shouldn't make any difference to the image once written (unless you happened to be writing to a device that had very specific requirements, which USB sticks generally don't).marctwo wrote:So what you are saying is that the block size won't make any difference to the final image? What's the difference between 10m and 10M? Is is megabytes vs megabits? Why would I not be able to boot the recent images when I had no problems with the old ones?
The difference between 'M' and 'm' is... nothing at all. The version of dd supplied with OS X simply has a 'variation' from the Linux version whereby the multiplication value of the number is given by a lower case letter. The 'm' still means "multiply given value by 1048576". Using '1m' or '10m' also doesn't really matter; anything significantly higher than the default 512 bytes will get better write performance from the USB stick.
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 

Re: Writing disk images on OSX
I finally managed to write a working image yesterday and I think I know what the problem was. I used the command:
I managed to get it to work on an 8GB stick. I believe that the problem was that I was using a 4GB stick that was fractionally too small to fit the image. I guess the older Ubuntu images were smaller. Thanks roobarb for all your help.
Code: Select all
dd if=<input file> of=<your_own_device> bs=10m
Re: Writing disk images on OSX
it should have said something if the stick was too small. did you get no errors? seems there are plenty of old or just not very good usb sticks out there that are smaller than they claim to be :/ I already made the images a bit smaller too.
Re: Writing disk images on OSX
I never really noticed until the most recent time I did it when it had a very small message about end of media or something. I am using a Kingston 4gb micro SD card with adapter so I'm suprised it was too small. Worked fine on a Sandisk 8GB USB stick.