General :: Copy / Clone Usb Stick That Have Several Partitions?
May 6, 2010Is there a good way from the shell to copy/clone a usb stick that have several partitions?
View 5 RepliesIs there a good way from the shell to copy/clone a usb stick that have several partitions?
View 5 RepliesI have a 16GB Ubuntu Webserver running on a Transcend SMART CF chip (Yes I know all the reasons not to). I want to move that entire system (OS, Files and structure) to an external bootable HD that will probably be closer to 100GB. What's the easiest way to do this and have it be plug and play. By which I mean I can then plug the drive into a new system and boot it up just as it was running on the old system.
View 1 Replies View RelatedI have linux installation which is on USB flash drive...there are two partitions. how to clone it to another USB. I tried manualy creating partitions on new flash drive and manualy copyng files but this doesn't work.
View 2 Replies View RelatedI am trying to replace an old, smaller, and dying laptop hard drive with a newer one, using a USB external drive. I first tried cloning disk to disk with Clonezilla, but it failed after cloning my root, swap, and /home directories it froze when it tried to reinstall grub. After 2x trying, I switched to dd, which I have never really used (I am fairly new to Linux in general). The actual command I used was:
Quote:
dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror
All seemed ok and after approximately 2 hours my 80GB drive had been cloned onto my new 250GB, with dd giving what appeared to be a satisfactory closure summary. I tried to mount and access the drive from my external USB enclosure but could not view it, though the data is there, I believe, as the size and bytes show... The error that Dolphin is giving me is:
Quote:
error - wrong fstype, bad option, bad superblock on /dev/sdb1 Missing codepage or helper program or other error. When I installed the new drive directly into my laptop, it begins to boot (Sabayon 5.4, 2.6.35 kernel) but almost immediately I get (handwritten down, but this is close):
Quote:
detected real_root
mounting /dev/sda1 on /newroot failed: input/output error
!! Could not mount specified ROOT, try again
!! Could not find the root block device in .
[code]....
I am assuming that my issue has something to do with grub, and maybe specific UUIDs that don't match (?) but I'm not really certain. I have both Grub Legacy 0.9x and the newer Grub 2 installed (Sabayon is already moving over) but I still boot with Legacy, not with the new 2, as I don't know how to switch, and am not sure if I should yet. I thought that dd copied bit for bit, and I added the noerrorï just to try to get it all transferred, so I don't know what went wrong exactly, though something seems wrong with grub and the bootloader, I guess...
I have a 16GB memorystick which used to have a Linux partition. It therefore has two partitions; 2GB FAT32 and 14GB linux boot drive. The linux part stopped working, so I decided to reinstall it. But windows can't see that partition. I tried formatting the whole disk, but I can only format one partition (the FAT32). There seems to be no way to combine the two partitions into one big one, and there seems to be no way for windows to partition the large part of the memorystick to but Linux on it. In the windows partition manager, windows sees the large unused partition, and it let me delete it. But once I have deleted it, I'm not allowed to format it. Also I cannot delete or resize the small partition. I have a memorystick with two partitons. Windows only sees one of them, and won't let me use the other one. I would like to combine the two partitions so I can install Linux on the memory stick again.
View 3 Replies View RelatedI wanted to back up my 4Gb boot drive and the new drive I had was slightly smaller. Couldn't find any info on here and precious little on the internet but I have previously used this technique to clone an 8Gb disk onto a 4Gb one. Since I have gained a lot of useful info from this forum over the years its probably time I contributed something. I used my netbook but this would work equally well from a live CD. Note the disk has to be unmounted so you can't use the live system. Firstly your USB stick probably has 2 partitions one for "/" and one for swap.
The first step is to reduce the "/" partition on the source drive to a size smaller than your target drive. I used gparted for this. Next create a partition on your target drive that is the same size or bigger than your newly shrunken partition. I formatted this although I'm not sure this is necessary. Personally I just used the whole drive and used a file on a hard disk as swap. Next you have to use dd to copy the partition.What is important is that you are copying the partition not the drive. So your source would be /dev/sdx1 and target /dev/sdy1 (you will need to find your own values for x&y).
Once again be very careful that you get these the right way around or you will destroy your souce disk. Even better do it in two stages - copy your source to a file and then the file to the target. Now you have a replica of your original disk but it is not bootable. If you are planning to use a swap partition you may as well create it now. Remember you will probably have to change /etc/fstab to read the new swap - at least on my system this was referenced by UUID. No need to change anything for the replicated partition as the UUID came over with everything else.
I installed Ubuntu 10.04 on a usb stick in persistent install mode. So I could boot the laptop or my desktop computer with the stick, at boot time. Once I needed the 8GB stick for another purposes so I thought about coyping it to my desktop doing from mac os x: dd if=/dev/disks3s of=/Users/jack/Desktop/usb_copy
Now I am trying to do the opposite, after having used the stick, which was formatted to NTFS, just doing
dd if=/Users/jack/Desktop/usb_copy of=/dev/disks3s
but although I can see that almost of the files are there, I can not boot again. IT is also strange the the file permissions are kind of strange, something like _user
I have a 160Gb Hard drive with 3 partitions. sda1, sda2, sda3. sda1 & 2 are just under 20 GB each. the other 120 GB is free space. I have so many 40GB hard drives! I would like to copy (with dd) the MBR, sda1 & 2 to a 40GB hard drive and be able to just use that so I can free up my 160GB hard drives. Typically when I want to clone something, the drives are equal or larger than the original. I'm not too sure about this, and if I use code (show below), will I also get the MBR? #where sda is the 160gb with 3 partitions and drive sdb is a 40GB drive with 2 partitions.
Code:
dd if=/dev/sda1 of=sdb1
dd if=/dev/sda1 of=sdb1
Also, is there a way I can do this with 1 line, or have both dd operations running simultaneously?
I'm trying to clone a 2GB USB memory stick to another stick just like it (same size and brand). The src drive has three partitions, one fat, one ext2 and one encrypted (in that order). It also has an mbr. I create the clone using the following command:
dd if=/dev/xxx of=/dev/xxx bs=512k conv=noerror,notrunc
Once it's done the mbr, the ext2 and the encrypted partitions seem fine, but the fat one is slightly modified on the clone. Here is a hex dump of the (broken) clones fat partition followed by a dump of the original partition.
"Clone":
0000000 3ceb 6d90 646b 736f 7366 0000 0402 0001
0000010 0002 0002 f800 00bc 003e 0040 0000 0000
[code]....
I have win7 and ubuntu on a 250gb hard drive. I would like to move this to a 1tb drive. Is it possible to clone the entire hard drive, including the MBR? Thought about doing a disk image but unsure if this is the answer. I am using win7 64 pro and ubuntu 10.10.
View 3 Replies View RelatedI have a very specific issue that I am having trouble resolving. I have an old laptop and a new laptop with a smaller HDD. I want to copy the windows partition from the new lappy to the old bigger HDD so I have room for Ubuntu. All of my files are on a Maverick install on the old lappy. How can I get all my files and windows to the old HDD and into the new laptop. I am a little stuck on this one because of my limited options.
View 8 Replies View RelatedId like to know if its possible to somehow copy an EXACT copy of my linux from one computer to "paste" on another!
And how would I be able to do this?
My home server runs Debian Lenny, and I'm about to upgrade the system drive to a larger drive.In the process, I want to take the opportunity to reorganize the partitions and resize them. For learning purposes, I'm planning to migrate from an MBR partition table to GPT.Because of those two changes, I can't just run "dd if=/old/drive of=/new/drive" (well, not without lots more work afterwards). I could use the debootstrap process to get a fresh installation on the new system drive, but I used that technique during the last system upgrade and it's probably overkill for this.Can I just copy the partitions from the old drive to the new?Will "dd if=/dev/hda1 of=/dev/hdb2" work, assuming /dev/hdb2 is larger than /dev/hda1? (If so, the filesystem can be resized to take advantage of the new larger partition, right?)Would parted (or gparted) be a better tool for copying the contents of the partitions?
View 3 Replies View RelatedI am trying to encrypt partitions on a usb stick using squeeze. I will be installing Arch on that stick, but as I am using Debian as the OS to do the encrypting I thought here was the best place to ask. I've not had any dealings with encryption before so i'm a little lost. It's not working as I would expect basically - here is the error mssge :
spoovy@peony ~ $ sudo cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sdb5
WARNING!
This will overwrite data on /dev/sdb5 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/sdb5.
[Code]...
I have Ubuntu 10.10 installed on a 4GB USB stick. I need to make a full bootable backup copy of the OS onto another 4GB USB stick.
I have a DVD burner installed, but no hard drive.
Been using 11.4 for the last few days and I think I might really like it. Thought getting my Broadcom wireless to work would be the hard part but I'm having real trouble with USB transfers for some reason. Tried to copy a 700MB .avi to a USB stick yesterday, I know it's good as I use it regularly. I get the KDE notification that it has copied the file (seemed far too quick but didn't think much of it) and then went to watch it.
Didn't show up on my telly and when I stuck it back in the computer to check it had only copied an arbitrary 39MB of the file. Tried again this morning, copying three albums to my phone - I get the notification that copying files has been completed almost instantly, I let it sit for five minutes and of the three albums one track has been transferred. It's an Android phone so I can use a file browser to confirm they are there, but they're all 0 bytes in size.
I just installed Ubuntu 11.04 on my workstation (MB Asus P6X58D Premium) and cannot copy large files (350 MB) to USB Sticks. If i copy one file the copy dialog hangs at ~99% and if I Try to copy 2 or more files it hangs after 99% of the first file but if the files are smaller (3-5 MB) it copies about 5 files but not more.(Its the same if i try to create a USB Startup disk or if I copy from the terminal)I tried different filesystems (ext3 fat32 ntfs) but its always the same bug.I tried 2 different Sticks with the same result but both sticks work on a 10.10 box or with win7.I read about a similar bug in natty beta 1-2 but it should have been resolved with release i think.
View 1 Replies View RelatedI'd like to move my existing Ubuntu installation from my hard disk (/dev/sda1) to a USB stick. How do I copy the data from HD to USB? dd is obviously not the right option since the HD is 320GB and the USB stick only 16GB. However, only 3.5GB are used so this makes perfect sense.And it would make my HTPC even more silent |-)
View 1 Replies View RelatedI have a 120 gig drive that I'd like to clone before it fails completely. I was thinking I'd pull the drive from the server and build a separate machine that has it's own os installed and the source and destination drive. Does anyone know of any linux tools will will do a full drive copy? Additionally, If possible, I'd like to move to a larger drive. how I'd migrate the 120 drive to a 400 or so? 1 idea I have is to install os on 2 new drives to where it they will boot, Then boot with one and copy source to the newly created destination drive.
View 6 Replies View RelatedHow to copy bootable USB stick including MBR partition table? I have Debian Lenny installed.
View 1 Replies View RelatedMy usb stick will not allow me to easily copy and paste files on to it, or delete them once I no longer want them on the drive. Its owner is root. How can I change the owner? At the moment it is loading as a stylesheet in media/usb0.
The file is transferring at a very low speed. 74mb in 4 minutes
I suspect I will do better if I set up the drive via fstab. What entry should I put in fstab for a USB stick drive?
I just bought a new 2 TB hard disk to replace my old 175 gig one. I currently am dual-booting Lucid Lynx and Windows 7, and rather than go through the process of reinstalling both, then reinstalling all my programs, settings, and everything, I was wondering if there's a way I can just copy the partitions on my 175 GB disk to the new one, grow them to fill up the rest of the free space on the new 2 TB disk, and then plug that HD into the primary master plug on my motherboard... will that work?
View 4 Replies View RelatedI was given a CD for work purposes and when I put the disc into the drive I get 2 disc icons on my desktop. One has data (a pdf file) and the other has serveral audio tracks. I tried to use dd to image the disc but it gives an input/output error immediately without copying anything. If I try to use brasero or k3b to copy the disc it only copies the audio portion. The data portion does not show up in the drop down to copy - only the audio. If I right-click the data (or audio) desktop icon and select 'copy' from the shortcut menu then it creates an image of the audio portion.
for dd i tried:
dd if=/dev/cdrom of=/home/username/test.iso
This give an immediate error with no data written to the iso file.
dd if=/dev/cdrom of=/home/username/test.iso bs=2M conv=notrunc,noerror
This copies a small amount of data to an iso file but it wasn't usable.
I have tried: 1. zcat boot.img.gz > /dev/sde and copy the image file debian-testing-amd64-netinst.iso to the usb-stick. 2. and manual whit syslinux /dev/sde1And also various builds of testing and it can't load the image file. always i get the error message "Filed to copy file from cd-rom"And i cant ether install 6,01 Before the image debian stable 6,0 worked and several testing builds before the stable release 6.0.The boot process work flawless but installer can not find the iso according to error msgI have verified the iso file with md5sum and made sure to write out to de stick whit sync.And haven't changed my bios boot that worked before.
View 4 Replies View RelatedHow to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).
More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.
A linux cvs server is of 250 GB, I have to replace all data to a new 500 GB hdd with intact of data. How will I do that?
View 11 Replies View RelatedI Have a Red hat 9 Installed in our Site With 5 Partitions Which work's as a Server for 3 clients .I wanted to clone the entire H.D.D of the system to a new one, So then if i have a problem i can restore it back.For Example I use Nortron Ghost for Windows Systems( but Without Portions)
View 11 Replies View RelatedI'd like to be able to clone a tagged module, but have not succeeded with this attempt:
Code:
Does anyone know if it is possible to clone/copy tags like this at all? Or must I find another way of doing this?
I want to clone a linux bridge repository. i'm behind a proxy server.
The command :
gives the following error
I've done
1 - sudo apt-get install socket
2 - in my home directory, a shell script called "proxy-cmd.sh" was created containing #! /bin/bash (echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket git://MYPROXY 3128 (read a; read a; cat )
3 - chmod +x proxy-cmd.sh
4 - export GIT_PROXY_COMMAND=<PATH TO MY SCRIPT>/proxy-cmd.sh
Still not getting.
I'm thinking about cloning a system without having physical access to its HDD. Is it possible to simply copy the contents of the filesystem (using ssh/scp) to a freshly formatted HDD (maintaining the source fs-type and -geometry)?
View 14 Replies View Related