Re: best way to backup USB stick (2)
On 15/04/2014 12:34 AM, Hugo Vanwoerkom wrote: PaulNM wrote: On 04/13/2014 10:16 PM, Hugo Vanwoerkom wrote: Specifically: usbDrive=/dev/sde1 You're not backing up and restoring usb drives, you're backing up and restoring a partition on usb drives. The partition table and bootloader aren't handled by your script. No bootloader=no booting. :) I'd suggest getting the whole device (/dev/sde) unless you're planning to restore to a drive with other partitions you want to preserve. The other thing to realize is that you can have two different USB sticks, but they present differently to the OS and/or BIOS. For instance, I have a cheap 64GB Sandisk stick that /looks/ like a fixed drive and another 64GB Silicon Power [SP] stick that presents as removable (under Windows in this case). Consequently a backup tool provided by Toshiba to backup the Windows 8 installation only works on the SP drive. Both are overkill for storage, but I would have been happy to use the slower and otherwise less useful Sandisk device for the backup. I did a copy of the SP drive to the Sandisk one (using dd), it did boot okay, but it failed to do recovery when I tested it; the original backup on the SP stick works flawlessly. As an aside, the Windows backup is probably never going to be used, but I want it just in case. Already had Kali linux installed and I will be trying other distros until I settle on one, but I definitely won't be using Windows 8 on the machine. In AU we had an advert which said: Oils Aint Oils Sol ... -- we can say the same about USB sticks. Cheers A. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/538b38a0.9080...@affinityvision.com.au
Re: best way to backup USB stick (2)
PaulNM wrote: On 04/13/2014 10:16 PM, Hugo Vanwoerkom wrote: Hi, So I got a script that backs up the USB stick to a file and restores a (larger) USB stick from that file all using dd. It is here: http://paste.debian.net/93598 That's small enough that you should have included it in the email, in my opinion. the relevant parts are the backup: dd conv=notrunc,noerror bs=4096 if=$usbDrive | gzip $backupFilename and the restore: gzip -dc $backupFilename | dd of=$usbDrive Makes perfect copy AFAICT, but it does not boot and the original USB stick does. Completes w/o errors. Can any dd expert tell me what I am doing wrong? Actually, the really relevant part is the variable definitions. Specifically: usbDrive=/dev/sde1 You're not backing up and restoring usb drives, you're backing up and restoring a partition on usb drives. The partition table and bootloader aren't handled by your script. No bootloader=no booting. :) I'd suggest getting the whole device (/dev/sde) unless you're planning to restore to a drive with other partitions you want to preserve. Hugo Another suggestion: Look into ddrescue (package name is gddrescue). It's more flexible when dealing with drives that have problems. Thanks. Hugo -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/ligrkp$idn$1...@ger.gmane.org
best way to backup USB stick (2)
Hi, So I got a script that backs up the USB stick to a file and restores a (larger) USB stick from that file all using dd. It is here: http://paste.debian.net/93598 the relevant parts are the backup: dd conv=notrunc,noerror bs=4096 if=$usbDrive | gzip $backupFilename and the restore: gzip -dc $backupFilename | dd of=$usbDrive Makes perfect copy AFAICT, but it does not boot and the original USB stick does. Completes w/o errors. Can any dd expert tell me what I am doing wrong? Hugo -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/lifgea$oii$1...@ger.gmane.org
Re: best way to backup USB stick (2)
On 04/13/2014 10:16 PM, Hugo Vanwoerkom wrote: Hi, So I got a script that backs up the USB stick to a file and restores a (larger) USB stick from that file all using dd. It is here: http://paste.debian.net/93598 That's small enough that you should have included it in the email, in my opinion. the relevant parts are the backup: dd conv=notrunc,noerror bs=4096 if=$usbDrive | gzip $backupFilename and the restore: gzip -dc $backupFilename | dd of=$usbDrive Makes perfect copy AFAICT, but it does not boot and the original USB stick does. Completes w/o errors. Can any dd expert tell me what I am doing wrong? Actually, the really relevant part is the variable definitions. Specifically: usbDrive=/dev/sde1 You're not backing up and restoring usb drives, you're backing up and restoring a partition on usb drives. The partition table and bootloader aren't handled by your script. No bootloader=no booting. :) I'd suggest getting the whole device (/dev/sde) unless you're planning to restore to a drive with other partitions you want to preserve. Hugo Another suggestion: Look into ddrescue (package name is gddrescue). It's more flexible when dealing with drives that have problems. - PaulNM -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/534b59a0.40...@paulscrap.com