[kwlug-disc] Odd situation when booting from live image
Khalid Baheyeldin
kb at 2bits.com
Thu Aug 7 11:57:49 EDT 2025
On Thu, Aug 7, 2025 at 10:26 AM Chris Irwin <chris at chrisirwin.ca> wrote:
> On Tue, Aug 05, 2025 at 05:28:42PM -0400, Khalid Baheyeldin wrote:
> > I got a used, new to me, Lenovo laptop, and was copying the
> > old laptop's disk to the new one by booting each from a live Xubuntu
> > image, then copying over Ethernet, using nc and dd.
>
> I've always been partial to putting my old storage in a USB enclosure,
> then using live media and ddrescue to copy it to the new system (and fstrim
> after booting into the system).
>
> I installed Fedora in 2017, and have used this method to migrate it across
> a few laptops since then.
>
That was the scheme that I used until the last two laptops.
The newer of the two laptops (the one I am typing this from) had an NVME
drive, and I don't have an NVME enclosure.
The previous laptop was hard to get into, and therefore, I could not remove
the SSD drive to do what I have always done.
In a nutshell, this is what I did, and it worked really well (apart from
the confusion caused by Lenovo Secure Boot).
The assumption here is that you are on a LAN that is isolated from the
wider internet.
On the target machine (the new one that will have its disk wiped):
sudo bash
# Find out the IP address
ip a
# Start a listener process, and pipe its output to the disk
nc -l -p 9999 |
gzip -d |
dd bs=10M conv=fsync status=progress of=/dev/nvme0n1
On the source machine (the older one that we will be copying from):
DEST_IP=192.168.0.99
dd bs=10M status=progress if=/dev/sda |
gzip -c -9 |
nc $DEST_IP 9999
Was quite speedy when both machines were connected over Ethernet.
Source disk was 500G and that took 1 hr 41 minutes to copy.
Then followed by doing gdisk to fix the partition table, then GParted
to resize the root partition to take up the rest of the 1TB NVME.
The latter two steps are described in this article
<https://wolfgang-ziegler.com/blog/migrate-linux-to-larger-ssd>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20250807/4b063e87/attachment.htm>
More information about the kwlug-disc
mailing list