Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I need to copy a bootable 2GB flash disk on witch I installed mandriva 2006, on another 2GB flash disk and the copy has to be bootable.
What I have done up to now is a non bootable copy.
Who can help me?
Thanks
If the two flash drives are the same size you can use the dd command to make an exact sector by sector copy of the one flash drive on the other:
# dd if=/dev/sd* of=/dev/sd#
You must be root to run dd. The * should correspond to the device file for your initial flash drive, typically /dev/sda, and # should correspond to the device file of your second flash drive that you want to copy to, typically /dev/sdb. The numbering/lettering on your flash drives' device files will depend on the order in which you put them in the usb ports on most distros. Also, if you have any sata drives, they take up sdx numbering, i.e. the first sata drive is /dev/sda, so that will shift the first flash drive to /dev/sdb.
CAUTION: It is imperative that you get the device files right for your flash drives when using the above command. If your not sure how to do this, post back before trying to run the command.
At any rate, the dd command will work and the second flash drive will be bootable, just like the first.
Last edited by kilgoretrout; 01-18-2006 at 11:11 AM.
On my pc the flash disk is mapped on /dev/sdb1.
I insert the source flash disk in a Card Reader/Writer USB 2.0
connect the Card Reader/Writer USB 2.0 to a usb port on my pc
I type dd if=/dev/sdb1 of=/mycopy
when the dd command ends I take off the source flash disk and insert the destination flash disk (same geometry)
I tipe dd if=/mycopy of=/dev/sdb1
Anythig goes well, but the destination flash disk is not bootable yet.
Any suggestions ?
thanks
To boot anything you need a bootloader, a small program that resides on the master boot record(mbr) and communicates with systyem bios during boot.The mbr is just the first sector of the drive and 512 bytes in size on every hard drive. The partition table also resides on the mbr. The mbr is generally not accessable(i.e. it's not part of your partition) which is why copying over all the files from one drive to the other with normal commands won't work - they can't copy the mbr so you will have no bootloader on the second drive and thus, no booting.
The dd command operates at a very low level and makes a block by block exact copy of the drive but you have to tell it what to do properly. If you use /dev/sdb1, dd will just copy over sdb1 without the mbr; if you use /dev/sdb instead, dd will copy over every sector, including the mbr with its bootloader.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.