[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Copying one drive to a smaller one.



On Tue, 10 May 2022 07:28:02 +0200
DdB <debianlist@potentially-spam.de-bruyn.de> wrote:

> Hi,
> 
> Am 09.05.2022 um 20:54 schrieb David Christensen:
> > Resizing and moving a Debian instance from a 500 GB drive to a 250
> > GB drive requires a lot of expertise.
> 
> I fully agree. And i am missing some information from the OP:
> 
> Was the 500 GB drive UEFI already?

Yes.

> Will both drives live on the same computer ever?

No.

The original problem is this: The 500G drive has too small a root
partition and also has the home partition on the same drive. I want to
expand the root partition, and separate the home partition off to
another drive. I don't need much for root-- 250G is more than enough
(actually 64G would be plenty, but it's hard to find SSDs that small).

> 
> If the answers would be yes to 1 and no to second, that would allow
> reusing the UUID's, which can be manipulated (on the new disk) with
> sgdisk. But of course, since that involves some kind of "hacking", i
> recommend to create some understanding along the disk format
> necessities for UEFI booting first, like from
> https://www.rodsbooks.com/ pages.
> 
> My goal would be to manipulate the target to come very close to the
> source, except for the partitioning/fs layout, in order to prepare
> for a successful rsync for ALL (except swap, but including ESP)
> partitions. mkswap has a -U switch too. :-)
> 

For all but the boot mechanism, copying files from source to
destination via rsync should work. For ext4, files are files. It's the
boot mechanism that can get tricky. That's what I'm unsure about.

The plan is/was to partition the new 250G drive exactly as I want it,
and then copy the individual pieces (root, /boot, swap) to the drive.
Then figure out/work out the boot process so I can stick it in and boot
from that drive.

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster


Reply to: