Results 1 to 5 of 5

Thread: dd command on an active USB key ?

  1. #1
    Join Date
    Jul 2010
    Location
    Bangkok, Thailand
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    dd command on an active USB key ?

    Hi,

    To avoid having both Vista and Ubuntu sharing my internal hard drive I installed lucid on a 16 Go USB key. Now, I would like to take an iso image of the key as a backup to reinstall on a new key in case I lose the first one.

    I believe the appropriate command to do this is dd (or dcfldd) but I am not sure about one thing : do I have to boot from a CD and then insert the key to copy or can I do it while the key is 'active' (ie. I boot from the key and I dd that same key) ?

    Thanks for any response
    Last edited by oxag; July 19th, 2010 at 03:11 AM.

  2. #2
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: dd command on an active USB key ?

    When cloning using dd I always boot from a third device, (Live CD, Live USB).

  3. #3
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: dd command on an active USB key ?

    Oops!

  4. #4
    Join Date
    Oct 2009
    Beans
    19

    Re: dd command on an active USB key ?

    The reason for booting from another device is simple... You don't want the computer updating the data on the USB key while it is copying data. There is no way to guarantee that the data copied will be in a usable state after the copy is complete.

    Perform a normal shutdown of Linux from the USB key, restart the computer using a boot device other than the USB key, then insert the key and transfer it's data to another device. You could use dd to copy directly to a new key if you have both in the system at the same time, just be sure you know which key is which. (Insert one and look to see where it is connected in the device tables, then insert the other and see where it is connected. (One should be /dev/sda and the next /dev/sdb or something similar to this.) Next use dd /dev/sd? /dev/sd? to transfer the data replacing the ? with the correct device letter.

  5. #5
    Join Date
    Jul 2010
    Location
    Bangkok, Thailand
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: dd command on an active USB key ?

    Thanks rodgerdg

    I did what you suggested (boot from a live CD and dd the content of my key to a mykey.iso file on my hard drive) and everything went smoothly.

    It took more than an hour to dd 16 GB though.

    Thanks again

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •