<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">On Thu, Aug 7, 2025 at 10:26\u202fAM Chris Irwin <<a href="mailto:chris@chrisirwin.ca">chris@chrisirwin.ca</a>> wrote:</div></div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Aug 05, 2025 at 05:28:42PM -0400, Khalid Baheyeldin wrote:<br>
> I got a used, new to me, Lenovo laptop, and was copying the<br>
> old laptop's disk to the new one by booting each from a live Xubuntu<br>
> image, then copying over Ethernet, using nc and dd.<br>
<br>
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).<br>
<br>
I installed Fedora in 2017, and have used this method to migrate it across a few laptops since then.<br></blockquote><div><br></div><div><div style="font-size:small" class="gmail_default">That was the scheme that I used until the last two laptops.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">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. <br></div><div style="font-size:small" class="gmail_default">The previous laptop was hard to get into, and therefore, I could not remove the SSD drive to do what I have always done. <br></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">In a nutshell, this is what I did, and it worked really well (apart from the confusion caused by Lenovo Secure Boot).</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">The assumption here is that you are on a LAN that is isolated from the wider internet.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">On the target machine (the new one that will have its disk wiped):</div><div style="font-size:small" class="gmail_default"><br></div><div class="gmail_default"><font size="1"><span style="font-family:monospace">sudo bash<br></span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace"><br></span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace"># Find out the IP address <br></span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace">ip a</span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace"><br></span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace"># Start a listener process, and pipe its output to the disk<br></span></font></div><div style="font-size:small" class="gmail_default"><font size="1"><span style="font-family:monospace">nc -l -p 9999 | <br> gzip -d |<br> dd bs=10M conv=fsync status=progress of=/dev/nvme0n1</span></font><br></div><br></div><div style="font-size:small" class="gmail_default">On the source machine (the older one that we will be copying from):</div><div style="font-size:small" class="gmail_default"><br></div><div class="gmail_default"><font size="1"><span style="font-family:monospace">DEST_IP=192.168.0.99</span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace"><br></span></font></div><div class="gmail_default"><font size="1"><span style="font-family:monospace">dd bs=10M status=progress if=/dev/sda | <br> gzip -c -9 |<br> nc $DEST_IP 9999</span></font></div></div><div class="gmail_quote gmail_quote_container"><br></div><div class="gmail_quote gmail_quote_container"><div style="font-size:small" class="gmail_default">Was quite speedy when both machines were connected over Ethernet.</div><div style="font-size:small" class="gmail_default">Source disk was 500G and that took 1 hr 41 minutes to copy.</div><div style="font-size:small" class="gmail_default">Then followed by doing gdisk to fix the partition table, then GParted <br></div><div style="font-size:small" class="gmail_default">to resize the root partition to take up the rest of the 1TB NVME.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">The latter two steps are described in <a href="https://wolfgang-ziegler.com/blog/migrate-linux-to-larger-ssd">this article</a>.<br></div></div><div class="gmail_quote gmail_quote_container"><br></div></div>