How to Install Operating Systems to USB drives and SD Cards. [Proficient]

Novice | Proficient | Expert

¥ is a variable for the disk you’re using. The red texts are commands for a terminal.

Linux

list the currently mounted partitions
df -h

unmount the disk you’re writing to
umount /dev/sdd¥

write the image file to your unmounted drive
dd bs=4M if=/Users/You/Desktop/anOS.image of=/dev/sdd¥

OS X

list the currently mounted partitions
diskutil list

unmount the disk you’re writing to
diskutil unmountDisk /dev/disk¥

zero out the disk in a once over
sudo dd if=/dev/zero of=/dev/disk¥ bs=1024 count=1

write the image file to your unmounted drive
sudo dd if=/Users/You/Desktop/anOS.img  of=/dev/disk¥ bs=4m

Windows

run a program called Diskpart
Diskpart

list the currently mounted partitions
list disk

select the disk you’re writing to
select disk ¥

write zeros over the drive
clean

create a new scheme
create partition primary
select partition 1

configure the partition
active
format fs=fat32
assign letter=y

exit the program
exit

How to Install Operating Systems to USB drives and SD Cards. [Novice]

Novice | Proficient | Expert

This guide details an common way to write disk images, raw files, or binary to any removable data drive. Some things to take note of before you continue:

  • The character ¥ is used as a stand in for the number of whatever disk you determine to be yours. Where sda¥ is written could mean you’re looking for sda2 or disk3 or something crazy like mm39fda4clp.
  • Be sure of which device is yours before manipulating it, because if you have the wrong disk you could accidentally delete everything ever. So take care.
  • Red Texts are commands to be entered in Terminal or Command Prompt
  • First make sure your download file is an image (.img .dmg .iso etc.) and not an archive (.zip .tar.gz .rar etc.)
  • If it is an archive you’ll have to uncompress it. Most Operating Systems will have native zip support, but if you run into something more exotic try Keka for Mac OS or 7-Zip for Windows.

Linux

Open a terminal. From the taskbar or your applications folder or search it or something.

List your connected disk partitions by inputing this command and hitting enter
df -h

Identify which disk you’re trying to write to. if you can’t figure it out by looking at the storage size and format, you can unplug it and run the df -h command again to see the one that disappears. But plug it back in.

Keep it plugged in, but unmount it from your system by entering the path of whichever drive you just determined it was.
sudo umount /dev/sdd¥

Write your chosen disk image file to the drive using dd, but make sure you’ve chosen the correct drive. Replace the if=path/path with the location of your image file. You may be able to drag and drop the image file after if= to insert the path.
sudo dd bs=4M if=/Users/You/Desktop/anyOS.image of=/dev/sdd¥

OS X

Open a Terminal. From the Dock or from your Applications folder or hit Command+Space and search for it.

List your connected disk partitions by inputing this command and hitting enter
diskutil list

Identify which disk you’re trying to write to. if you can’t figure it out by looking at the storage size and format, you can unplug it and run the diskutil list command again to see the one that disappears. But plug it back in.

Keep it plugged in, but unmount it from your system by entering the path of whichever drive you just determined it was.
sudo diskutil unmountDisk /dev/disk¥

Write zeros over the drive to “clean” the data off of it. Sometimes dd has problems on Mac if you skip this step.
sudo dd if=/dev/zero of=/dev/disk¥ bs=1024 count=1

Write your chosen disk image file to the drive using dd, but make sure you’ve chosen the correct drive. Replace the if=path/path with the location of your image file. You may be able to drag and drop the image file after if= to insert the path.
sudo dd if=/Users/You/Desktop/anyOS.img  of=/dev/disk¥ bs=4m

Windows

If you’re on Windows probably just use the Win32DiskImager to create your boot media or whatever you’re doing. Run it as an administrator, choose your image file and make sure you choose the correct drive letter and click write.