Prev: upgrade Fedora without destroying data?
Next: error 21
From: jny0 on 12 Jul 2010 10:01 Hi, I have a usb key which is used to install embedded systems with linux. It's the only one I've got which will do this, so I've been trying to copy it. I examined the partitions and set a new usb key with the same partitions. I then used rsync to copy the files from the old usb key to a directory on my desktop. I then used rsync again to copy the files from my desktop to the new usb key. However, it doesn't work. The partitions may be slightly different sizes, as the keys are slightly different sizes. I've checked for hidden files, but the copies seem complete. I was originally using a 4GB usb stick, and fdisk kept telling me I might experience problems booting from this, so I acquired a smaller one (which fdisk seems much happier with). Any ideas? Cheers.
From: mjt on 12 Jul 2010 15:11 On Mon, 12 Jul 2010 07:01:36 -0700 (PDT) jny0 <jny0(a)hotmail.com> wrote: > I have a usb key which is used to install embedded systems with > linux. It's the only one I've got which will do this, so I've been > trying to copy it. I examined the partitions and set a new usb key Just want to be sure I'm not reading into anything. So, this USB key ... it's a "bootable" usb key? If so, you can't simply copy all the files from one key to another USB key. The MBR must be written to also, so the [new/different] USB key can be booted from. -- Next to being shot at and missed, nothing is really quite as satisfying as an income tax refund. - F. J. Raymond <<< Remove YOURSHOES to email me >>>
From: Gernot Fink on 12 Jul 2010 15:40 In article <7b1eaede-b0c4-427b-967a-590a1ade381e(a)e5g2000yqn.googlegroups.com>, jny0 <jny0(a)hotmail.com> writes: > I have a usb key which is used to install embedded systems with > linux. It's the only one I've got which will do this, so I've been > trying to copy it. I examined the partitions and set a new usb key > with the same partitions. I then used rsync to copy the files from > the old usb key to a directory on my desktop. I then used rsync again > to copy the files from my desktop to the new usb key. However, it > doesn't work. you miss the MBR (masterbootrecord) and depending the Bootloader a bootblock. The easist way is to use "fdisk -l" to identify sourde and targetdevice. Then use dd if=/dev/sdX of=/dev/sdY th copy the Stick 1to1. (if=inputfile of=outputfile) Be verry carfuel about the devicename to avoid crashing your system. partimage is also able to clone a USB-bootdevice. -- MFG Gernot
From: jny0 on 16 Jul 2010 04:17 OK, sorted it. First I found a USB stick of exactly the same size. I removed the partitions - fdisk sdb - p (to view the partitions. There were 2) - d (to delete a partition) - 1 (to select the first partition for deletion) - d (to delete a partition) .. Used DD to zero it (this I believe removed the MBR). Then used DD to copy from sdc (the whole device) to sdb (the other whole device).
From: jny0 on 16 Jul 2010 04:22
.... Sorry, please read on if you're interested. I pressed the wrong button... OK, sorted it. First I found a USB stick of exactly the same size. I removed the partitions - fdisk sdb - p (to view the partitions. There were 2) - d (to delete a partition) - 1 (to select the first partition for deletion) - d (to delete a partition) - w (to write the changes) Used DD to zero it (this I believe removed the MBR). - dd if=/dev/null of=/dev/sdb - dd if=/dev/zero of=/dev/sdb Then used DD to copy from sdc (the whole device) to sdb (the other whole device). - dd if=/dev/sdc of=/dev/sdb (sdc is my source disk, sdb if the one I just blanked) I like detailed instructions like this, so hopefully others will too. |