I’ve been using dd option: conv=fdatasync instead of doing a separate sync command, and I always neglected to run eject, did you ever see instances where sync was not sufficient? Have you tried conv=fdatasync? Remove the disk safely: $ sudo eject -v /dev/sdc The “o\nn\np\n1\n\n\nw” stanza explained (\n after each individual option stands for line feed): echo o # Create a new empty DOS partition tableĮcho # Last sector (Accept default: varies)įormat stick as VFAT (32-bit fat) and give it label WINDISK: $ sudo mkfs.fat -F32 -v -I -n "WINSTICK " /dev/sdc1 All in one go, again in order to avoid navigating the fdisk menus: $ echo -e "o\nn\np\n1\n\n\nw" | sudo fdisk /dev/sdc Wipe off file system and/or partition table signatures from the device (to ensure fdisk in next step works without issues): $ sudo wipefs -all /dev/sdcĬreate a fresh, new partition table, one new partition (primary) and write the changes to disk. Make sure drive is not mounted: $ sudo umount /dev/sdc* Check drive assignment with dmesg (right after plugging the stick in) or with sudo fdisk -l. REPARTITION AND FORMAT USB STICK FOR DATA USE I like the command line, so here are instructions for working in the terminal. There are also apps made just for this purpose. If you prefer using GUI tools, you can do this in GParted or Disks. When you want to return the stick to regular data saving use, you need to reformat it. So if you are using a 4 GB stick for a 1.2 GB ISO, you won’t have 2.8 GB at the ready for storing your holiday snaps. It “dumps” the source disk to your target disk as is, bit-by-bit.
You can now unplug the stick.ĭd stands for Disk Dump, which describes it perfectly. Sudo eject - unmounts the partitions (if mounted) and detaches the drive. Status=progress - shows a progress bar so you know something is happening (I’ve noticed it’s not always working)Ĭonv=fdatasync - flush buffers to disk, making sure everything is written to the USB disk (does same as a separate “sudo sync” command would do, as pointed out by in this post further down this thread) Of - output file target device (figured out in step 1).īs - bytes to read and write at a time (10M was suggested, I use 1M, default is 512, I believe)
If - input file name of the ISO file with full path Issue the needed commands (dd and its friends)all in one go, individual commands separated by a semicolon: $ sudo dd if=/home/username/Downloads/example.iso of=/dev/sdc bs=1M status=progress conv=fdatasync sudo eject /dev/sdc Make sure the USB stick is unmounted (ignore the possible error messages for individual partitions): $ umount /dev/sdc* In this example output you can see which means it’s /dev/sdc. Look for line “Attached … removable disk” close to the end of the listing. Check dmesg output to find out the device assignment (or check with sudo fdisk -l).
Do not trust “it’s always been /dev/sdc”.ĬREATING A BOOTABLE USB STICK FROM AN ISO FILE USING dd IN TERMINAL
I’m being the “community secretary” and collecting it to one post, for a step-by-step guide, in case someone else is wondering how to create a bootable USB stick from an ISO file using command dd in terminal.
Now you can connect this USB to a computer which you need to install Linux operating system and boot it from USB.Great advice given in this thead. Navigate to USB drive $ cd /media/usbĪnd, you have all done. Now rename some required files and directories as like below. Copy ldlinux.sys file to USB drive to make it bootable. Make USB Bootable – Finally, we need to make this USB bootable.Copy OS Files – Now copy all files from mounted iso /media/iso/ to USB drive /media/usb.
Read this: How To Format USB Drive in Linux Command Line But in any case, it’s not mounted using the following command to mount it manually.
The users running the Windows operating system visit the below link to make a bootable Linux USB on their system.
Now, This article will help you to create a bootable Linux USB drive on Linux operating system through the command line. I also have Ubuntu 14.04 installed on my system. I want to create of bootable us of Ubuntu 14.04 LTS. How do I create a bootable Linux USB drive on a Linux system.