<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Daniel B. Thurman wrote:
<blockquote cite="mid:4ACE25C0.8090107@cdkkt.com" type="cite">
  <pre wrap="">On 10/08/2009 10:31 AM, Konstantin Svist wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On 10/08/2009 09:48 AM, Dr. Michael J. Chudobiak wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi all,

Is there an easy way to transfer a system from one drive (holding
boot, swap, lvm partitions, in the default F11 layout) to a different
hard drive, if the new drive is smaller?

If the new drive is larger, dd could be used in a fairly
straightforward way.

However, I want to try replacing a 160 GB hard drive with an Intel 80
GB solid-state drive, just for fun...

I suspect a re-install might be easier.

- Mike

      </pre>
    </blockquote>
    <pre wrap="">gparted (or qtparted) will do what you want. I don't remember if it
can resize the partitions as you copy them, but in the worst case you
can resize first then copy.

or you can use cp -a to copy over all necessary files and run
grub-install to restore the grub boot loader if it's installed in MBR
(default)

    </pre>
  </blockquote>
  <pre wrap=""><!---->There is a potential problem when using partition resizing - it can mess
up the partition tables and render the drive unbootable - need to be
careful here, as it "bit me in the a.."!

FWIW,
Dan
  </pre>
</blockquote>
<pre class="moz-signature" cols="72">Your easiest option might simply be a "bare metal" backup and restore, backing up from the old drive and restoring to the new.

This also may work, but I am pretty sure I am missing at least one important thing that hopefully someone else will point out so that you can use this method:

* Set up the drive ahead of time with the same partitions as your existing one, greater than or equal to the existing size of each partition. You may encounter problems if you are going to make any new partition smaller, even if the new one is still large enough to hold all of the data.

* Do as Konstantin suggested above to copy the files over and then make GRUB set itself up to hopefully boot the system for you off the new drive.



This is off the top of my head so unless you know what you're doing, I wouldn't recommend trying it until a few people have ripped it to pieces and corrected whatever flaws I have missed or inadvertently inserted. No warranties express or implied, and I am not responsible if you foobar your system trying this, etc. etc.



-- 


Paul

</pre>
</body>
</html>