# Copy bootable USB stick



## ccc (Dec 17, 2010)

Hi

Howto copy *bootable USB* stick under FreeBSD?


----------



## Beastie (Dec 17, 2010)

USB pendrive device to ISO image file and vice versa?

Check the *EXAMPLES* section in dd(1) and the release announcement (*dd if=8.1-RELEASE-amd64...*) for examples.


----------



## ccc (Oct 20, 2012)

Beastie said:
			
		

> USB pendrive device to ISO image file and vice versa?
> 
> Check the *EXAMPLES* section in dd(1) and the release announcement (*dd if=8.1-RELEASE-amd64...*) for examples.



Thx, but does dd copy the MBR as well from one USB stick to another?


----------



## Beastie (Oct 20, 2012)

LOL, what took you so long?! :e



			
				ccc said:
			
		

> does dd copy the MBR as well from one USB stick to another?


dd(1) does a sector for sector data transfer. So yes, this includes everything from sector 0 (which contains the MBR) to EOF, as long as you don't explicitly seek to/skip sectors.
And like any tool running under a *nix system, it doesn't care about the source or destination type: it works on _files_ and everything - including devices - is a file.


----------



## jb_fvwm2 (Oct 20, 2012)

In some instances one may wish to leave the computer otherwise-idle, minimize running programs, etc when copying TO the thumbdrive.  (I use pipes with sleep and other methods to copy when a dd  isn't being used...)
Depending upon several factors, not knowledgeable enough to write further about it.


----------



## zer0sig (Oct 24, 2012)

jb_fvwm2, this is correct, one major reason is that thumbdrives or on USB, which unlike old "regular" serial devices there isn't really a dedicated chip to processing the I/O - the CPU does the thinking for USB, as it does for most hardware since around the advent of PnP hardware in the late 90s (the two are not mutually inclusive, but both did occur at about the same time and both were created for Wintel systems though FreeBSD has actually worked with PnP more accurately for longer).


----------

