On Mon, May 09, 2022 at 11:54:16AM -0700, David Christensen wrote: > On 5/8/22 18:54, pa...@quillandmouse.com wrote: > > Folks: > > > > Situation: I have a 500G boot drive (root, swap, home) I'd like to copy > > to a new 250G drive which must then also be bootable (yes, there's > > enough room). This are EFI drives. I can use "dd", but I don't know > > the proper parameters, and as I understand it, copying a 500G to a 250G > > drive is Bad(tm). I could use "rsync", but I don't think the second > > 250G drive will boot just because I copied the files over to it. I > > suspect I would have an additional step needed to make the drive > > bootable. > > > > Can someone outline the proper procedure here? > > > Resizing and moving a Debian instance from a 500 GB drive to a 250 GB drive > requires a lot of expertise. > > > I would take the KISS approach -- backup the system configuration files and > data, remove the 500 GB drive, install the 250 GB drive, do a fresh install > onto the 250 GB drive, and reconfigure/ restore. > > > David >
I also agree: then all you have to do is copy across data you wish to retain. Alternatively, you can plug in the new drive and do a minimal install on it. Use dpkg --get-selections > somefilename to get a list of packages installed on one system and write it into somefile. dpkg --set-selections < somefilename will write that list for Debian's most basic package manager. apt update ; apt dist-upgrade will then use that information to isntall the same package list onto the second machine as exists on the first machine - but that's complex. With every good wish, as ever, Andy Cater