General :: Clone A Larger Disk To Smaller With Cp?
Jul 10, 2010
I need to clone a 160GB hard drive with Linux Mint 9 (not more than 10GB used) to a 30GB SSD that is partitioned carefully (aligned to cylinder boundaries) and is currently running Ubuntu (which I wish to overwrite with Linux Mint 9). The SSD has a /boot partition, / and swap. The source (160 GB) does not have a separate boot partition. Can anyone help me fill in the steps below? /dev/sdc will be the source (160GB) and /dev/sda is the target (with partitions 1,2 and swap on 5).
make a copy of /etc/fstab from the target drive before proceeding. Ready the target partitions. Can I reuse the existing destination partitions on the SSD? Ready the filesystems on each of the target partitions. /boot is ext2, / is ext4 and swap is already set up too. As I said, all contain data (Ubuntu) that I wish to overwrite. So what steps are needed here? Do I need to erase anything (files, etc.) before the copy/clone? next, use dd to copy MBR (right?) And exclude partition table:
Code:
dd if=/dev/sdc1 of=/dev/sda1 count=1 bs=446
Mount the source and destination drives:
Code:
mount -t ext4 /dev/sdc1 /mnt/source
mount -t ext2 /dev/sda1 /mnt/boot_target
mount -t ext4 /dev/sda2 /mnt/root_target
I suppose I can leave the swap partition on the target untouched. Copy the files from the source partition to the destination
Code:
cp -a /mnt/source/boot /mnt/boot_target
cp -a /mnt/source/ /mnt/root_target
then I assume I go to /mnt/root_target and delete the /boot directory, right? Change /etc/fstab to reflect the new partitions. I mount by label. Will my partition labels be intact after this? Do I have to make any changes to GRUB? Anything else?
View 14 Replies
ADVERTISEMENT
Jun 21, 2011
I have an Ubuntu server and i've installed drbl-clonezilla to clone and restore pc, I have a 40 gigabyte image to be deployed on other pc's with larger hard drive ex. 160 GB or 240giga, my problem is that when I deploy the image on a larger disk I end up with a disk with a partition of 40 GB and the rest unallocated, how can i restore the the disk and use full disk space, the goal is to automate the process. In clonezilla-drbl there is the possibility to start a "prerun" and "postrun" fonction that could help complete the deployment process.
View 2 Replies
View Related
Mar 13, 2009
I've been using python's PIL (import Image in py2.5) and the command line utility ImageMagick to add text to images and compose images. I can't figure out how to get the composed image not to crop. That is, suppose I compose A onto B to create C. A is short and wide, while B is tall and narrow. I'd like C to be tall and wide, but instead it has the same dimensions as B.
The width of A is determined by dynamic text. My current solution is to get the width and height of A and B, and then create a maximally sized image, T, onto which I compose B and then A.I'm just wondering if there is some way to streamline this. Can ImageMagick do this for me? These operations take a non-trivial amount of time.
View 4 Replies
View Related
Jun 18, 2010
Currently, I installed CentOS 5.4 into 2 HDDs in my PC. I have bought a larger capacity HDD and would like to clone/image everything over and retain my settings and preferences. How can I do it?
View 4 Replies
View Related
Aug 22, 2011
I 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.
View 3 Replies
View Related
Mar 16, 2010
My parents bought a new hard drive for a laptop that I've owned for several years. It's much larger than the current one, so I plan on splitting it up to dual boot it with Ubuntu.I have no problem with partitioning a drive (I always keep a LiveCD handy), but my question is this: how can I go about moving the existing partition to the new drive? This is a laptop, so I can't simply plug the new drive into another slot.
Also, even if I manage to move it, will Windows still work on the new drive in a larger partition? I've had this laptop for quite a while, and I've lost the recovery discs that came with it a long time ago. I also have a lot of software without CDs to reinstall them with. This makes not reinstalling Windows a high priority.
View 3 Replies
View Related
Aug 2, 2010
I am using Ubuntu and looking for a good editor to edit a file that is > 4GB. I just need to put content at the end and beginning of the file. I suppose I could use something like
cat "text to add" >> huge_file
To append to the file. Is that the route to go? What about prepending? In general, what is the best route if I wanted to edit somewhere in the middle?
I've tried VIM and it fails miserably. I assume emacs and nano would be even worse. What else is there? I assume to accomplish what I am looking for, the editor would have to be specifically designed for this by not keeping the entirety of the file's contents in memory.
View 5 Replies
View Related
Mar 17, 2010
how easy it would be to read the contents of a physical disk that was part of a larger logical volume. The disk contains a "Linux LVM" partition that spans its entire size. My problem is that one of my disks died, and I have to send it back for a warranty replacement. However, the disk is dead, and I can't zero it out. I'm just trying to assess how difficult it would be (or at least how likely it would be) for a tech that's checking out the disk to get at the data.
View 4 Replies
View Related
May 9, 2010
I am trying to clone the hard drive to a slightly smaller hard drive in the same computer, same setup.What software or commands do you use to clone the entire system and resize the partition automatically?The original HD is a little larger than the destination HD. The source partition only has about 20 GB in use and the rest is blank.
I have 2 partition, a small 100MB boot partition and another 500GB LVM partition.I can't just clone from the original disk to the new disk. (for another long reason) I need to make an image of the original disk on an external USB drive first, then move that image onto a new disk.I have tried creating an image of the whole disk with Clonezilla, but then the restoration didn't work because the target drive is smaller than the original.
View 7 Replies
View Related
Apr 16, 2009
Can this be done and to restore the disk with a similar cat command.
View 3 Replies
View Related
Jun 3, 2010
I have my Mythbuntu 9.10 environment installed on an old 160GB PATA disk and have just purchased a new 64GB SSD that I want to transfer my installation to.In the past I've just used ddrescue to clone disks, however in this case the source disk is larger than the destination disk so it won't work. I only have a few GB of actual data on the 160GB disk, so the 64GB SSD is definitely going to be enough for me.
I guess I need someway of either cloning so that only the actual data and not the partition is brought across, or possible shrinking the partition(s) first on the source drive and then using the same ddrescue method I've used in the past.Just looking for some assistance on what method is the best/most reliable?
View 8 Replies
View Related
May 3, 2011
Using Samba I have looked into the file that stores all my web sites, there were a few strange files that get larger and larger all the time. File names are _Za01716 and _Za01820, they are nearly 50mb in size now. I know these are not Log files so what are they and can I delete them?
View 1 Replies
View Related
Aug 18, 2010
I'm looking for some help on this issue. I have an image (Windows XP) made with CloneZilla of a 160Gb disk (used space = 11Gb) and I 'need' to restore that image to a smaller disk (120Gb). In order to try everything out I created a virtual machine in VMWare. I've tried about every option available in CloneZilla without succes. The latest thing I tried was using dd to just copy over the partition to a created partition on the smaller disk but when booting I got:
Code:Booting...Error loading operating system.Then I thought installing the image to a disk with the same size, resize the partition with GParted and make a new CloneZilla image, but for some odd reason (typical to Windows) when booting I get a BSOD, impossible to read. The BSOD happens when booting from the disk with the same size, before resizing the partition. This also is a virtual machine.Can anyone point out what I'm missing? Or, if anyone has succesfully done this, how did you go about it?
View 1 Replies
View Related
Jan 25, 2011
I was thinking about make a clone machine. I was thinking about use a old computer that have some SATA connection. One disk is source and then I add some other disk to destination. I going to have Linux on USB stick. I have look at dd and it look nice but what I can see it only use one disk to another.
Code:
dd if=/dev/hdx of=/dev/hdy
is it possible to add more then one destination?
View 7 Replies
View Related
Jan 13, 2011
I am looking for an Open Source software making it possible to make a disk image of an Ubuntu installation as well as a Windows XP installation.I have checked out Clonezilla which almost solved the problem. However, the disk to which you restore needs to be the same size or bigger. I want to restore the whole thingo a smaller disk than the original.I am considering getting myself an SSD disk which will be considerably smaller than the 160 gb disk I have right now. I need it to work for Windows as well. Unfortunately I can't get rid of Windows quite yet I often participate in webinars on GotoWebinar and they do not support Linux ...
View 9 Replies
View Related
Sep 9, 2011
I used opensuse three years ago. Then I moved to ubuntu, because it was easier for me to use ubuntu at that time. Now, I move back to opensuse again. But I want to know how to clone the opensuse system to another hard disk. I mean I have my opensuse well, I do backup to my opensuse system and restore it to another harddisk with the same partition.
When I used ubuntu, I used a very good small open-source software, named 'Ucloner'. You can find it at ucloner - Backup/restore/clone your Ubuntu, and make Live-Ubuntu. - Google Project Hosting . It is very handy to backup the ubuntu system and restore or clone it to a new harddisk. Especially, when restoring the system, the grub can be installed to the new harddisc automatically with the UUID of the new harddisc (very amazing). But it is only for ubuntu. I am looking for a software with the similar function.
I have tried Clonezilla. No problem to do backup and restore. But I failed to boot the restored system even with the same harddisc. I know it is the problem of GRUB. Even reinstalling the grub, I still can not boot into the system.
My question is
1. is there any software that allows me to backup the opensuse and restore it to another harddisc with the grub installed to the new harddisc automatically?
2. If no software for question 1, what software or application is good to backup and restore the opensuse and how to reinstalled the grub to the new harddisc with different UUID?
3. Since the Ucloner is open-source, is there anybody having interest in change the ucloner code to fit for opensuse? I guess there should be much change, because ubuntu and opensuse are linux both?
View 9 Replies
View Related
Jun 11, 2011
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?
View 2 Replies
View Related
Dec 11, 2010
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]....
View 3 Replies
View Related
Apr 19, 2011
I often run various computers from my Ubuntu 10.04 USB startup disk. Every now and then, people get interested and want a copy of their own. Since I have installed a few extras (VLC, codecs, flash etc) on the disk, not just the out of the box 10.04, I would like to create a clone of the USB startup disk, to give away. How can it be done?
View 2 Replies
View Related
Apr 30, 2011
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 Related
Sep 16, 2010
im trying to use ddrescue to clone a dying disk to a remote machine using ssh. this is my command:
Quote:
sudo ddrescue --block-size=4KiB /dev/sda1 - | ssh user@address 'cat /data/backup.img'
it returns the error "cat: can't open '/data/backup.img': No such file or directory"
View 3 Replies
View Related
Jan 22, 2011
I am using 10.04 LTS Lucid, and I notice the free space of root is getting smaller and smaller.
Five months ago, there was about 3.9GB free space of root, but now it is only 1.6GB. I always run sudo apt-get autoremove and sudo apt-get autoclean every time the update is finished, and also use Bleachbit to clean the system, but both are useless.
I never faced such problem with older versions of Ubuntu, is there any measure to fix it?
View 6 Replies
View Related
Jan 17, 2011
I use clonezilla cd live to backup my Debain Squeese O.S.,
there is the possibility to create a warm backup (clone disk) of O.S. without restart the computer ?
View 2 Replies
View Related
Feb 16, 2011
I have a ubuntu 10.10 server with apaceh2 and php and I want to open a file larger than 2gigs
I've read there is a flag that needs to be compiled into php to do this ?
View 6 Replies
View Related
Jan 23, 2011
I am using 10.04 LTS Lucid, and I notice the free space of root is getting smaller and smaller. Five months ago, there was about 3.9GB free space of root, but now it is only 1.6GB. I always run sudo apt-get autoremove and sudo apt-get autoclean every time the update is finished, and also use Bleachbit to clean the system, but both are useless.
I never faced such problem with older versions of Ubuntu, is there any measure to fix it?
1. There is not any .deb in the /var/cache/apt/archives.
2. The total content of /var/log is only 167.6 MB, that won't be a problem.
View 5 Replies
View Related
Sep 27, 2010
I have a NETGEAR ReadyNAS NV+ with four 1TB drives in a RAID-5 array. This is our primary file storage. This has previously been backed up to a hardware RAID-0 array directly attached to our Windows server. The capacity of this backup array is no longer sufficient. So the plan was, take a bunch of 200GB to 320GB drives (And a 750) I had kicking around, chuck them in a couple of old SCSI drive enclosures I have collecting dust, attach them via IDA/SATA-to-USB adaptors to a USB hub, attach that to the server, create a JBOD array spanning the disks, and back up the NAS to that. Performance is not an issue as this is just to be used for backup, with the idea being as near to zero cost as possible (Spend so far = NZ$100�ish).
The first hurdle I struck was Windows not supporting Dynamic Disks on USB drives (Required to create a spanned volume). At first I resisted using another machine (i.e. a machine running Ubuntu) as I didn't want to dedicate a piece of hardware to backing up the NAS. I then decided it would be acceptable to do this via a VM, which is what I've done.So I have 10.04 running under VMWare Server 2.0.2 under Windows Server 2008 R2. The disks are all presented to the VM. I wasn't sure if I was going to end up creating the array under LVM or something else, but I noticed Disk Utility has an option to create an array, so I tried that. When I add two 250GB drives, the array size is 500GB. When I then add a 160GB drive, the array size drops to 480GB. Huh? If I keep adding disks (Regardless of order) the final array size comes out at 1.8 TB, as per the attached screenshot. Now with the following drives, I expected something more like:
160 + 250 + 250+ 750 + 250 +200 + 200 + 250 + 320 + 250 + 320 = 3.2TB
Am I missing something or making a false assumption somewhere?
View 4 Replies
View Related
Mar 23, 2010
I have just clone from my previous IDE hard disk to a bigger IDE hard disk with clonezilla. However, when I boot my system with the new hard disk using the installation disk, it says an error that "no linux partition found on hard disk".
View 4 Replies
View Related
Aug 5, 2010
What is the best software to clone a hard disk with Fedora
View 3 Replies
View Related
Jun 6, 2010
I just installed Lubuntu 10.04 on old PC (CPU: 700 Mhz, RAM: 640 MB). My swap partition is only 474 MB. I was told it should be twice my RAM, if that's true then I'm really low on swap space. Can I expand my swap space? I also have Fedora 13 installed, it has a 1.3 GB swap partition, can I have Lubuntu use this partition?
View 5 Replies
View Related
May 22, 2011
I ordered a new laptop which has a conventional hd with the pre-intalled os on it. I would like to make an image of all the software that is installed on this conventional hd and move it to an ssd which I will use to replace the hd. Problem is that the conventional hd is 320GB and the ssd is only 240GB. All solutions I've found require the target partition to be at least as large as the source.Is there any way of doing this using linux?
View 8 Replies
View Related