Restoring a big partition to a smaller partition with Clonezilla The 2019 Stack Overflow...

A poker game description that does not feel gimmicky

Can a flute soloist sit?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

Is flight data recorder erased after every flight?

Are there incongruent pythagorean triangles with the same perimeter and same area?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Distributing a matrix

What is the most effective way of iterating a std::vector and why?

Why isn't airport relocation done gradually?

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

What does ひと匙 mean in this manga and has it been used colloquially?

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Loose spokes after only a few rides

Can one be advised by a professor who is very far away?

Ubuntu Server install with full GUI

What is the closest word meaning "respect for time / mindful"

What is the motivation for a law requiring 2 parties to consent for recording a conversation

When should I buy a clipper card after flying to OAK?

What do hard-Brexiteers want with respect to the Irish border?

Are there any other methods to apply to solving simultaneous equations?

Did 3000BC Egyptians use meteoric iron weapons?

Is a "Democratic" Oligarchy-Style System Possible?

Are spiders unable to hurt humans, especially very small spiders?

What do the Banks children have against barley water?



Restoring a big partition to a smaller partition with Clonezilla



The 2019 Stack Overflow Developer Survey Results Are Inclonezilla - restore OS partition image to larger/smaller partitionHow to mount a Clonezilla img to extract files?Hard Disk Clone Image SizeFreeBSD Clonezilla Not Restoringclonezilla - restore OS partition image to larger/smaller partitionhow to create another physical volume/partition with existing unused lvm space without data loss?Do I need to increase original partition size if I'm simply restoring contents (with dd)?How to backup a large multi-partition hard-disk towards a small one?Partitioning an external HDD using GPT and with a “Microsoft Reserved” partition?Clonezilla - cloning usb flash drive to smaller usb flash driveI resized a partition (made it smaller) but now the partition shows the same size as before I resized it only with less available space.





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







5















Some time ago I created a backup of an EXT4 partition with Clonezilla. Now the HDD crashed and I lost some important data.



The size of the image of the partition is 50GB. I tried to restore this image to a 200GB HDD but it turned out that the size of the original partition was 500GB. Since I don't have a 500GB HDD for dumping available I figured out how to force Clonezilla to ignore it by passing -C to partclone. But while recovering it stopped with the error target seek ERROR:Invalid argument.



I could imagine that the data on the partition is fragmented so that the actual bitmap doesn't fit. Is there a workaround for this? I have a HDD with about 600GB available but I don't like touching the partition table or such. Ideally would be a way to restore it to a mountable image. (ISO or such)










share|improve this question














bumped to the homepage by Community 21 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    5















    Some time ago I created a backup of an EXT4 partition with Clonezilla. Now the HDD crashed and I lost some important data.



    The size of the image of the partition is 50GB. I tried to restore this image to a 200GB HDD but it turned out that the size of the original partition was 500GB. Since I don't have a 500GB HDD for dumping available I figured out how to force Clonezilla to ignore it by passing -C to partclone. But while recovering it stopped with the error target seek ERROR:Invalid argument.



    I could imagine that the data on the partition is fragmented so that the actual bitmap doesn't fit. Is there a workaround for this? I have a HDD with about 600GB available but I don't like touching the partition table or such. Ideally would be a way to restore it to a mountable image. (ISO or such)










    share|improve this question














    bumped to the homepage by Community 21 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      5












      5








      5


      5






      Some time ago I created a backup of an EXT4 partition with Clonezilla. Now the HDD crashed and I lost some important data.



      The size of the image of the partition is 50GB. I tried to restore this image to a 200GB HDD but it turned out that the size of the original partition was 500GB. Since I don't have a 500GB HDD for dumping available I figured out how to force Clonezilla to ignore it by passing -C to partclone. But while recovering it stopped with the error target seek ERROR:Invalid argument.



      I could imagine that the data on the partition is fragmented so that the actual bitmap doesn't fit. Is there a workaround for this? I have a HDD with about 600GB available but I don't like touching the partition table or such. Ideally would be a way to restore it to a mountable image. (ISO or such)










      share|improve this question














      Some time ago I created a backup of an EXT4 partition with Clonezilla. Now the HDD crashed and I lost some important data.



      The size of the image of the partition is 50GB. I tried to restore this image to a 200GB HDD but it turned out that the size of the original partition was 500GB. Since I don't have a 500GB HDD for dumping available I figured out how to force Clonezilla to ignore it by passing -C to partclone. But while recovering it stopped with the error target seek ERROR:Invalid argument.



      I could imagine that the data on the partition is fragmented so that the actual bitmap doesn't fit. Is there a workaround for this? I have a HDD with about 600GB available but I don't like touching the partition table or such. Ideally would be a way to restore it to a mountable image. (ISO or such)







      partition backup data-recovery clonezilla






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 6 '14 at 7:40









      NoirNoir

      1831211




      1831211





      bumped to the homepage by Community 21 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 21 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          4 Answers
          4






          active

          oldest

          votes


















          0














          The Clonezilla site expressly mentions that restoring to a smaller device is a documented limitation of the tool, but this page makes mention of a possibility of attempting such a recovery if one believes that the data to restore. This is probably the sort of thing you did. If that does not work, then:



          PhotoRec does wonders, but for a large partition, is time consuming and the results can make a monumental task of picking through the output of the tool. I used SysRescueCD, which includes it. As this tool needs at least as much free space on the system as was stored on the overwritten drive, one has to have enough free space for the data (including any data that was deleted and not overwritten before the failure). SysRescueCD also has sshfs on it, so you can use storage on another system if you don't have a free drive.



          PhotoRec can get some file extensions (pictures, mp3's, and so on) correct, but file names were completely lost otherwise. Nevertheless, it was possible to recover certain key files. I got back about as much data as the drive had on it. Sometimes, it is not worth a lot of effort to recover everything, but what kind of time it takes is dependent on how important something was that was lost.



          I've done this thing multiple times. Once I had a drive that failed. I used what amounted to ddrescue to snag a copy of the drive, then proceeded to recover most of 40 GB of mp3s.






          share|improve this answer































            0














            One of the possibilities could be to try to mount the backup image and just copy the files to your new drive having previously created a filesystem on the new drive. This post describes how you can prepare a clonezilla image for mounting. It looks like you are going to need a lot of space, though, to decompress the image.






            share|improve this answer































              0














              I was looking for a solution to a similar issue and want to share my outcome with you, in fact I had a windows notebook with a single-partitioned 750GB disk which wasn't booting anymore because of bad sectors but I had only a 160GB spare disk available; considering I knew the total amount of data on the source disk was about 32GB I got myself a copy of Hdd Regenerator to "repair" the bad sectors of the 750GB disk then I imaged it with Clonezilla.



              Under Clonezilla I loaded the image then checked the options "-ICDS" in the first options screen and "-k1" in the second... the software restored the data and then the screen showed an error of some sort that I can't remember right now but was involved with space available on the target disk.



              So I rebooted the system and started with the local disk (the one that I restored the image on), choose to "Load the (Windows) startup repair" which took a few minutes then I rebooted the system again and, after some grinding, it loaded Windows flawlessly!






              share|improve this answer

































                0














                since you have the 600gb empty you can mount your current HD and copy its files to the 600gb !

                or
                you can make a new backup using dd+gzip and you will have chance to restore your hard drive without problems of loosing space.



                if you want to do that from your current runing os :



                mount your current hd (since it is an ext4 it can be mounted on different places).



                sudo mkdir ~/bk/{0,1}
                sudo mount /dev/SRC_HD ~/bk/0
                sudo mount /dev/DST_HD ~/bk/1
                sudo copy -arxp ~/bk/0/* ~/bk/1/


                now you will make some changes if you want to boot with 600gb



                use blkid to get HDs UIDs



                SRC_HDUUID="7ahzj19f-a2b2-4f24-bb01-4ca7bc9fed3a"
                DST_HDUUID="7aaeb19f-a2b2-4f24-ffc1-4ca7bc9fed3a"

                sudo grep "$SRC_HDUUID" /etc /boot -rl | while read f
                do
                sed -i "s/$SRC_HDUUID/$DST_HDUUID/g" $f
                done

                sudo umount -fl ~/bk/*


                update the grub in your current os it



                sudo update-grub


                reboot into your fresh copy inside $DST_HD and then wipe your SRC_HD or any.



                if you want to do that from a live os with gzip dd gunzip :



                backup again your SRC_HD to a raw image



                dd if=/dev/SRC_HD | gzip -c  > /inside/your600/image.img


                restore it from the raw image



                gunzip -c /inside/your600/image.img | dd of=/dev/SRC_HD


                but before restoring it it's good to wash your SRC_HD



                washing a hard drive is creating a file inside th hard drive filled up with zero, and removing that file!



                sudo dd if=/dev/zero of=/where/hardrive/mountd/zero


                acoording to the hd size it will take some time and it will stop with a 'disk full' mesage !



                sudo rm /where/hardrive/mountd/zero





                share|improve this answer


























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "106"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: false,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f118370%2frestoring-a-big-partition-to-a-smaller-partition-with-clonezilla%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  0














                  The Clonezilla site expressly mentions that restoring to a smaller device is a documented limitation of the tool, but this page makes mention of a possibility of attempting such a recovery if one believes that the data to restore. This is probably the sort of thing you did. If that does not work, then:



                  PhotoRec does wonders, but for a large partition, is time consuming and the results can make a monumental task of picking through the output of the tool. I used SysRescueCD, which includes it. As this tool needs at least as much free space on the system as was stored on the overwritten drive, one has to have enough free space for the data (including any data that was deleted and not overwritten before the failure). SysRescueCD also has sshfs on it, so you can use storage on another system if you don't have a free drive.



                  PhotoRec can get some file extensions (pictures, mp3's, and so on) correct, but file names were completely lost otherwise. Nevertheless, it was possible to recover certain key files. I got back about as much data as the drive had on it. Sometimes, it is not worth a lot of effort to recover everything, but what kind of time it takes is dependent on how important something was that was lost.



                  I've done this thing multiple times. Once I had a drive that failed. I used what amounted to ddrescue to snag a copy of the drive, then proceeded to recover most of 40 GB of mp3s.






                  share|improve this answer




























                    0














                    The Clonezilla site expressly mentions that restoring to a smaller device is a documented limitation of the tool, but this page makes mention of a possibility of attempting such a recovery if one believes that the data to restore. This is probably the sort of thing you did. If that does not work, then:



                    PhotoRec does wonders, but for a large partition, is time consuming and the results can make a monumental task of picking through the output of the tool. I used SysRescueCD, which includes it. As this tool needs at least as much free space on the system as was stored on the overwritten drive, one has to have enough free space for the data (including any data that was deleted and not overwritten before the failure). SysRescueCD also has sshfs on it, so you can use storage on another system if you don't have a free drive.



                    PhotoRec can get some file extensions (pictures, mp3's, and so on) correct, but file names were completely lost otherwise. Nevertheless, it was possible to recover certain key files. I got back about as much data as the drive had on it. Sometimes, it is not worth a lot of effort to recover everything, but what kind of time it takes is dependent on how important something was that was lost.



                    I've done this thing multiple times. Once I had a drive that failed. I used what amounted to ddrescue to snag a copy of the drive, then proceeded to recover most of 40 GB of mp3s.






                    share|improve this answer


























                      0












                      0








                      0







                      The Clonezilla site expressly mentions that restoring to a smaller device is a documented limitation of the tool, but this page makes mention of a possibility of attempting such a recovery if one believes that the data to restore. This is probably the sort of thing you did. If that does not work, then:



                      PhotoRec does wonders, but for a large partition, is time consuming and the results can make a monumental task of picking through the output of the tool. I used SysRescueCD, which includes it. As this tool needs at least as much free space on the system as was stored on the overwritten drive, one has to have enough free space for the data (including any data that was deleted and not overwritten before the failure). SysRescueCD also has sshfs on it, so you can use storage on another system if you don't have a free drive.



                      PhotoRec can get some file extensions (pictures, mp3's, and so on) correct, but file names were completely lost otherwise. Nevertheless, it was possible to recover certain key files. I got back about as much data as the drive had on it. Sometimes, it is not worth a lot of effort to recover everything, but what kind of time it takes is dependent on how important something was that was lost.



                      I've done this thing multiple times. Once I had a drive that failed. I used what amounted to ddrescue to snag a copy of the drive, then proceeded to recover most of 40 GB of mp3s.






                      share|improve this answer













                      The Clonezilla site expressly mentions that restoring to a smaller device is a documented limitation of the tool, but this page makes mention of a possibility of attempting such a recovery if one believes that the data to restore. This is probably the sort of thing you did. If that does not work, then:



                      PhotoRec does wonders, but for a large partition, is time consuming and the results can make a monumental task of picking through the output of the tool. I used SysRescueCD, which includes it. As this tool needs at least as much free space on the system as was stored on the overwritten drive, one has to have enough free space for the data (including any data that was deleted and not overwritten before the failure). SysRescueCD also has sshfs on it, so you can use storage on another system if you don't have a free drive.



                      PhotoRec can get some file extensions (pictures, mp3's, and so on) correct, but file names were completely lost otherwise. Nevertheless, it was possible to recover certain key files. I got back about as much data as the drive had on it. Sometimes, it is not worth a lot of effort to recover everything, but what kind of time it takes is dependent on how important something was that was lost.



                      I've done this thing multiple times. Once I had a drive that failed. I used what amounted to ddrescue to snag a copy of the drive, then proceeded to recover most of 40 GB of mp3s.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 16 '14 at 19:50









                      kbulgrienkbulgrien

                      266215




                      266215

























                          0














                          One of the possibilities could be to try to mount the backup image and just copy the files to your new drive having previously created a filesystem on the new drive. This post describes how you can prepare a clonezilla image for mounting. It looks like you are going to need a lot of space, though, to decompress the image.






                          share|improve this answer




























                            0














                            One of the possibilities could be to try to mount the backup image and just copy the files to your new drive having previously created a filesystem on the new drive. This post describes how you can prepare a clonezilla image for mounting. It looks like you are going to need a lot of space, though, to decompress the image.






                            share|improve this answer


























                              0












                              0








                              0







                              One of the possibilities could be to try to mount the backup image and just copy the files to your new drive having previously created a filesystem on the new drive. This post describes how you can prepare a clonezilla image for mounting. It looks like you are going to need a lot of space, though, to decompress the image.






                              share|improve this answer













                              One of the possibilities could be to try to mount the backup image and just copy the files to your new drive having previously created a filesystem on the new drive. This post describes how you can prepare a clonezilla image for mounting. It looks like you are going to need a lot of space, though, to decompress the image.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Aug 9 '14 at 9:34









                              bodgixbodgix

                              1




                              1























                                  0














                                  I was looking for a solution to a similar issue and want to share my outcome with you, in fact I had a windows notebook with a single-partitioned 750GB disk which wasn't booting anymore because of bad sectors but I had only a 160GB spare disk available; considering I knew the total amount of data on the source disk was about 32GB I got myself a copy of Hdd Regenerator to "repair" the bad sectors of the 750GB disk then I imaged it with Clonezilla.



                                  Under Clonezilla I loaded the image then checked the options "-ICDS" in the first options screen and "-k1" in the second... the software restored the data and then the screen showed an error of some sort that I can't remember right now but was involved with space available on the target disk.



                                  So I rebooted the system and started with the local disk (the one that I restored the image on), choose to "Load the (Windows) startup repair" which took a few minutes then I rebooted the system again and, after some grinding, it loaded Windows flawlessly!






                                  share|improve this answer






























                                    0














                                    I was looking for a solution to a similar issue and want to share my outcome with you, in fact I had a windows notebook with a single-partitioned 750GB disk which wasn't booting anymore because of bad sectors but I had only a 160GB spare disk available; considering I knew the total amount of data on the source disk was about 32GB I got myself a copy of Hdd Regenerator to "repair" the bad sectors of the 750GB disk then I imaged it with Clonezilla.



                                    Under Clonezilla I loaded the image then checked the options "-ICDS" in the first options screen and "-k1" in the second... the software restored the data and then the screen showed an error of some sort that I can't remember right now but was involved with space available on the target disk.



                                    So I rebooted the system and started with the local disk (the one that I restored the image on), choose to "Load the (Windows) startup repair" which took a few minutes then I rebooted the system again and, after some grinding, it loaded Windows flawlessly!






                                    share|improve this answer




























                                      0












                                      0








                                      0







                                      I was looking for a solution to a similar issue and want to share my outcome with you, in fact I had a windows notebook with a single-partitioned 750GB disk which wasn't booting anymore because of bad sectors but I had only a 160GB spare disk available; considering I knew the total amount of data on the source disk was about 32GB I got myself a copy of Hdd Regenerator to "repair" the bad sectors of the 750GB disk then I imaged it with Clonezilla.



                                      Under Clonezilla I loaded the image then checked the options "-ICDS" in the first options screen and "-k1" in the second... the software restored the data and then the screen showed an error of some sort that I can't remember right now but was involved with space available on the target disk.



                                      So I rebooted the system and started with the local disk (the one that I restored the image on), choose to "Load the (Windows) startup repair" which took a few minutes then I rebooted the system again and, after some grinding, it loaded Windows flawlessly!






                                      share|improve this answer















                                      I was looking for a solution to a similar issue and want to share my outcome with you, in fact I had a windows notebook with a single-partitioned 750GB disk which wasn't booting anymore because of bad sectors but I had only a 160GB spare disk available; considering I knew the total amount of data on the source disk was about 32GB I got myself a copy of Hdd Regenerator to "repair" the bad sectors of the 750GB disk then I imaged it with Clonezilla.



                                      Under Clonezilla I loaded the image then checked the options "-ICDS" in the first options screen and "-k1" in the second... the software restored the data and then the screen showed an error of some sort that I can't remember right now but was involved with space available on the target disk.



                                      So I rebooted the system and started with the local disk (the one that I restored the image on), choose to "Load the (Windows) startup repair" which took a few minutes then I rebooted the system again and, after some grinding, it loaded Windows flawlessly!







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Nov 15 '15 at 18:36









                                      slm

                                      256k71544689




                                      256k71544689










                                      answered Nov 15 '15 at 17:31









                                      MarioMario

                                      1




                                      1























                                          0














                                          since you have the 600gb empty you can mount your current HD and copy its files to the 600gb !

                                          or
                                          you can make a new backup using dd+gzip and you will have chance to restore your hard drive without problems of loosing space.



                                          if you want to do that from your current runing os :



                                          mount your current hd (since it is an ext4 it can be mounted on different places).



                                          sudo mkdir ~/bk/{0,1}
                                          sudo mount /dev/SRC_HD ~/bk/0
                                          sudo mount /dev/DST_HD ~/bk/1
                                          sudo copy -arxp ~/bk/0/* ~/bk/1/


                                          now you will make some changes if you want to boot with 600gb



                                          use blkid to get HDs UIDs



                                          SRC_HDUUID="7ahzj19f-a2b2-4f24-bb01-4ca7bc9fed3a"
                                          DST_HDUUID="7aaeb19f-a2b2-4f24-ffc1-4ca7bc9fed3a"

                                          sudo grep "$SRC_HDUUID" /etc /boot -rl | while read f
                                          do
                                          sed -i "s/$SRC_HDUUID/$DST_HDUUID/g" $f
                                          done

                                          sudo umount -fl ~/bk/*


                                          update the grub in your current os it



                                          sudo update-grub


                                          reboot into your fresh copy inside $DST_HD and then wipe your SRC_HD or any.



                                          if you want to do that from a live os with gzip dd gunzip :



                                          backup again your SRC_HD to a raw image



                                          dd if=/dev/SRC_HD | gzip -c  > /inside/your600/image.img


                                          restore it from the raw image



                                          gunzip -c /inside/your600/image.img | dd of=/dev/SRC_HD


                                          but before restoring it it's good to wash your SRC_HD



                                          washing a hard drive is creating a file inside th hard drive filled up with zero, and removing that file!



                                          sudo dd if=/dev/zero of=/where/hardrive/mountd/zero


                                          acoording to the hd size it will take some time and it will stop with a 'disk full' mesage !



                                          sudo rm /where/hardrive/mountd/zero





                                          share|improve this answer






























                                            0














                                            since you have the 600gb empty you can mount your current HD and copy its files to the 600gb !

                                            or
                                            you can make a new backup using dd+gzip and you will have chance to restore your hard drive without problems of loosing space.



                                            if you want to do that from your current runing os :



                                            mount your current hd (since it is an ext4 it can be mounted on different places).



                                            sudo mkdir ~/bk/{0,1}
                                            sudo mount /dev/SRC_HD ~/bk/0
                                            sudo mount /dev/DST_HD ~/bk/1
                                            sudo copy -arxp ~/bk/0/* ~/bk/1/


                                            now you will make some changes if you want to boot with 600gb



                                            use blkid to get HDs UIDs



                                            SRC_HDUUID="7ahzj19f-a2b2-4f24-bb01-4ca7bc9fed3a"
                                            DST_HDUUID="7aaeb19f-a2b2-4f24-ffc1-4ca7bc9fed3a"

                                            sudo grep "$SRC_HDUUID" /etc /boot -rl | while read f
                                            do
                                            sed -i "s/$SRC_HDUUID/$DST_HDUUID/g" $f
                                            done

                                            sudo umount -fl ~/bk/*


                                            update the grub in your current os it



                                            sudo update-grub


                                            reboot into your fresh copy inside $DST_HD and then wipe your SRC_HD or any.



                                            if you want to do that from a live os with gzip dd gunzip :



                                            backup again your SRC_HD to a raw image



                                            dd if=/dev/SRC_HD | gzip -c  > /inside/your600/image.img


                                            restore it from the raw image



                                            gunzip -c /inside/your600/image.img | dd of=/dev/SRC_HD


                                            but before restoring it it's good to wash your SRC_HD



                                            washing a hard drive is creating a file inside th hard drive filled up with zero, and removing that file!



                                            sudo dd if=/dev/zero of=/where/hardrive/mountd/zero


                                            acoording to the hd size it will take some time and it will stop with a 'disk full' mesage !



                                            sudo rm /where/hardrive/mountd/zero





                                            share|improve this answer




























                                              0












                                              0








                                              0







                                              since you have the 600gb empty you can mount your current HD and copy its files to the 600gb !

                                              or
                                              you can make a new backup using dd+gzip and you will have chance to restore your hard drive without problems of loosing space.



                                              if you want to do that from your current runing os :



                                              mount your current hd (since it is an ext4 it can be mounted on different places).



                                              sudo mkdir ~/bk/{0,1}
                                              sudo mount /dev/SRC_HD ~/bk/0
                                              sudo mount /dev/DST_HD ~/bk/1
                                              sudo copy -arxp ~/bk/0/* ~/bk/1/


                                              now you will make some changes if you want to boot with 600gb



                                              use blkid to get HDs UIDs



                                              SRC_HDUUID="7ahzj19f-a2b2-4f24-bb01-4ca7bc9fed3a"
                                              DST_HDUUID="7aaeb19f-a2b2-4f24-ffc1-4ca7bc9fed3a"

                                              sudo grep "$SRC_HDUUID" /etc /boot -rl | while read f
                                              do
                                              sed -i "s/$SRC_HDUUID/$DST_HDUUID/g" $f
                                              done

                                              sudo umount -fl ~/bk/*


                                              update the grub in your current os it



                                              sudo update-grub


                                              reboot into your fresh copy inside $DST_HD and then wipe your SRC_HD or any.



                                              if you want to do that from a live os with gzip dd gunzip :



                                              backup again your SRC_HD to a raw image



                                              dd if=/dev/SRC_HD | gzip -c  > /inside/your600/image.img


                                              restore it from the raw image



                                              gunzip -c /inside/your600/image.img | dd of=/dev/SRC_HD


                                              but before restoring it it's good to wash your SRC_HD



                                              washing a hard drive is creating a file inside th hard drive filled up with zero, and removing that file!



                                              sudo dd if=/dev/zero of=/where/hardrive/mountd/zero


                                              acoording to the hd size it will take some time and it will stop with a 'disk full' mesage !



                                              sudo rm /where/hardrive/mountd/zero





                                              share|improve this answer















                                              since you have the 600gb empty you can mount your current HD and copy its files to the 600gb !

                                              or
                                              you can make a new backup using dd+gzip and you will have chance to restore your hard drive without problems of loosing space.



                                              if you want to do that from your current runing os :



                                              mount your current hd (since it is an ext4 it can be mounted on different places).



                                              sudo mkdir ~/bk/{0,1}
                                              sudo mount /dev/SRC_HD ~/bk/0
                                              sudo mount /dev/DST_HD ~/bk/1
                                              sudo copy -arxp ~/bk/0/* ~/bk/1/


                                              now you will make some changes if you want to boot with 600gb



                                              use blkid to get HDs UIDs



                                              SRC_HDUUID="7ahzj19f-a2b2-4f24-bb01-4ca7bc9fed3a"
                                              DST_HDUUID="7aaeb19f-a2b2-4f24-ffc1-4ca7bc9fed3a"

                                              sudo grep "$SRC_HDUUID" /etc /boot -rl | while read f
                                              do
                                              sed -i "s/$SRC_HDUUID/$DST_HDUUID/g" $f
                                              done

                                              sudo umount -fl ~/bk/*


                                              update the grub in your current os it



                                              sudo update-grub


                                              reboot into your fresh copy inside $DST_HD and then wipe your SRC_HD or any.



                                              if you want to do that from a live os with gzip dd gunzip :



                                              backup again your SRC_HD to a raw image



                                              dd if=/dev/SRC_HD | gzip -c  > /inside/your600/image.img


                                              restore it from the raw image



                                              gunzip -c /inside/your600/image.img | dd of=/dev/SRC_HD


                                              but before restoring it it's good to wash your SRC_HD



                                              washing a hard drive is creating a file inside th hard drive filled up with zero, and removing that file!



                                              sudo dd if=/dev/zero of=/where/hardrive/mountd/zero


                                              acoording to the hd size it will take some time and it will stop with a 'disk full' mesage !



                                              sudo rm /where/hardrive/mountd/zero






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Feb 4 '16 at 13:33

























                                              answered Feb 4 '16 at 13:20









                                              JonasJonas

                                              903517




                                              903517






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f118370%2frestoring-a-big-partition-to-a-smaller-partition-with-clonezilla%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                                                  Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                                                  Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...