I would be very grateful for help with the syntax of the dd command.
I have downloaded Linux Mint 17.1 Xfce to a USB stick and I now want to make the USB bootable. It is the exact syntax that is defeating me.
When I insert the USB it is shown on my home screen as 'USB Stick'. Clicking on the icon brings up another screen showing location /media/gam/USB Stick and the contents as linuxmint-17.1-xfce-32bit.iso.
My USB drive is, I believe, at /dev/sdb.
I know I should start the process by unmounting the drive:- umount /dev/sdb
but what is the exact syntax for the first part of the dd command?
dd if=/?? of=/dev/sdb
As things stand, I seem to be defeated by the space in 'USB Stick' - or is this a red herring?
the dd command
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
the dd command
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: the dd command
Just quick addition to above instructions.
Note that the "dd" command will not show any progress bar or anything while it is working. You'll just see a flashing cursor. When it's done, the regular terminal prompt will appear. (It may or may not give a message that it's completed -- I can't remember.) Don't interrupt the process once it starts. Just let it go until complete -- may take a few minutes, or up to 10-15 minutes.
Note that the "dd" command will not show any progress bar or anything while it is working. You'll just see a flashing cursor. When it's done, the regular terminal prompt will appear. (It may or may not give a message that it's completed -- I can't remember.) Don't interrupt the process once it starts. Just let it go until complete -- may take a few minutes, or up to 10-15 minutes.
Re: the dd command
To avoid pulling out USB flash too early due to no feedback on dd command, what I usually do is add a sync command , like this real stuff I did:
[wayne@trios][~]$ su
Password:
root@trios:/home/wayne# dd if=debian-jessie-DI-rc2-i386-DVD-1.iso of=/dev/sdb bs=4M; sync
Re: the dd command
I believe using DD you need to put USB\ Stick so if I've understood what you're trying to do correctly (and I've typed it correctly) the whole command should beNewmint17 wrote:As things stand, I seem to be defeated by the space in 'USB Stick' - or is this a red herring?
dd if=/media/gam/USB\ Stick/linuxmint-17.1-xfce-32bit.iso of=/dev/sdb
Confusingly for newcomers to linux different places seem to require treating spaces in different ways. If you're editing your fstab config file for example you need to use \040 to indicate a space. Far easier not to use spaces in naming files and drive partitions in the first place.
Re: the dd command
Your point about spaces in file names causing problems in terminal commands if not commented out is valid, however it doesn't apply in this situation.I Know Nothing wrote:I believe using DD you need to put USB\ Stick so if I've understood what you're trying to do correctly (and I've typed it correctly) the whole command should be
dd if=/media/gam/USB\ Stick/linuxmint-17.1-xfce-32bit.iso of=/dev/sdb
The key here is this (from gmilo2):
The ISO file itself can not reside on the USB stick that the dd command is writing to, which is why gmilo2 told OP to move the file to the desktop. Then, as OP already knows, the USB has to be unmount before running the dd command. Once unmounted, the USB is no longer mounted under /media or /media/username and the dd command uses its device name (/dev/sdb in this example). So, gmilo2's code is correct as written, or OP could also add the sync to the end of it as pointed out by wayne128 to ensure it's writing is complete before removing the stick.gmilo2 wrote:Put the .iso file itself onto your Desktop, not the USB drive.
Re: the dd command
I was thinking there were 2 USB sticks involved and he was copying from one to the other but maybe not.gold_finger wrote:Your point about spaces in file names causing problems in terminal commands if not commented out is valid, however it doesn't apply in this situation.
Re: the dd command
Thank you for your excellent help and advice, as a result of which I have successfully used the dd command and had a first look at Mint 17.1 Xfce.
The Forum comes up trumps, again!
The Forum comes up trumps, again!