Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #248062

Re: Copying one drive to a smaller one.

From Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups linux.debian.user
Subject Re: Copying one drive to a smaller one.
Date 2022-05-10 04:40 +0200
Message-ID <ElnX3-es5B-5@gated-at.bofh.it> (permalink)
References <El0QN-ed6f-3@gated-at.bofh.it> <ElgLT-enyM-15@gated-at.bofh.it> <EliNH-eoXH-1@gated-at.bofh.it> <EljJL-epCt-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> With a modern EFI system with UUIDs in the fstab it's actually not that
> hard. Boot off an rescue disk or somesuch. Create partitions on the new disk
> that mirror those of the old disk (except of course that the largest one
> should be smaller; do not make any of the others smaller). If you're lucky

A similar option is to use (g)parted on the source disk to shrink the
partitions enough to fit on the destination disk, move them to the
beginning of the disk and then `dd` the whole disk to the destination:
the `dd` will fail when it reaches the end of the destination disk but
if you've shrunk*resized properly it will have copied all the relevant
info.  You'll just need to run `parted` on the destination disk (to fix
the secondary GPT partition table which is a copy normally placed at
the end and which `dd` couldn't copy for you).


        Stefan

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Copying one drive to a smaller one. <paulf@quillandmouse.com> - 2022-05-09 04:00 +0200
  Re: Copying one drive to a smaller one. Felix Miata <mrmazda@earthlink.net> - 2022-05-09 04:40 +0200
  Re: Copying one drive to a smaller one. David Christensen <dpchrist@holgerdanske.com> - 2022-05-09 21:00 +0200
    Re: Copying one drive to a smaller one. "Andrew M.A. Cater" <amacater@einval.com> - 2022-05-09 21:20 +0200
      Re: Copying one drive to a smaller one. Tixy <tixy@yxit.co.uk> - 2022-05-09 22:10 +0200
      Re: Copying one drive to a smaller one. The Wanderer <wanderer@fastmail.fm> - 2022-05-09 23:00 +0200
    Re: Copying one drive to a smaller one. <paulf@quillandmouse.com> - 2022-05-09 23:10 +0200
      Re: Copying one drive to a smaller one. Michael Stone <mstone@debian.org> - 2022-05-10 00:10 +0200
        Re: Copying one drive to a smaller one. Stefan Monnier <monnier@iro.umontreal.ca> - 2022-05-10 04:40 +0200
    Re: Copying one drive to a smaller one. "stepore@gmail.com" <stepore@gmail.com> - 2022-05-10 07:10 +0200
    Re: Copying one drive to a smaller one. <paulf@quillandmouse.com> - 2022-05-10 14:40 +0200
      Re: Copying one drive to a smaller one. Michael Stone <mstone@debian.org> - 2022-05-10 18:30 +0200
      Re: Copying one drive to a smaller one. Michael Stone <mstone@debian.org> - 2022-05-10 21:20 +0200
      Re: Copying one drive to a smaller one. <paulf@quillandmouse.com> - 2022-05-10 21:30 +0200

csiph-web