Wednesday, April 16, 2014

Using a usb for Mac and then Linux

I've been using a usb stick on my Mac and I wanted to use it to boot a different machine for Linux. After fiddling with a bunch of file formats and partitions on my Mac, I decided I had done something bad to the usb stick that even mkfs couldn't fix.

I got around this by cleaning out the usb stick (mine is at sdc):

sudo dd if=/dev/zero of=/dev/sdc bs=4M (not sdc1, since I want to kill the whole stick; bs is to speed things up)
sudo fdisk /dev/sdc

There should be no existing partitions, so pressing d should say "No partition defined yet".
Make a new partition (n, then p, then 1, then default, then default, then w).

sudo mkfs.vfat /dev/sdc1
umount /dev/sdc1 (if it got mounted)
sudo dd if=/path/to/iso.iso of=/dev/sdc bs=4M

Should work.

No comments:

Post a Comment