Getting new hardware - can I just move the disk?
Liam Proven
lproven at gmail.com
Mon Oct 11 19:41:40 UTC 2021
On Mon, 11 Oct 2021 at 19:59, Bo Berglund <bo.berglund at gmail.com> wrote:
>
> It is:
> Lenovo IdeaCentre 3 07ADA05 Model 90MV
> Comes with:
> - 512 GB SSD NVM Express (NVMe) PCI Express
> - 16 GB RAM
> - CPU: AMD Ryzen 5 3500U 4 cores 2.1 GHz
> - Graphics: AMD Radeon RX Vega 8 (not useful for a server)
Sounds like a decent, fairly powerful machine.
The one thing I will say is this: my partner's PC in her old flat is a
Lenovo minitower. I don't know if it's an Ideacenter and it's 200km
away.
I had major problems getting it to dual-boot Win10 and Linux Mint in
UEFI mode. The GRUB menu would not appear, whatever I tried. You had
to press F12 to pick a boot disk, then choose the HDD, and _then_ the
menu came up.
Upgrading from Mint 19 (i.e. Ubuntu 18.04) to Mint 20 (i.e. Ubuntu
20.04) magically fixed this.
This is why I said you might want to upgrade _first_.
Second caveat:
I have only tried to move a Linux partition from an MBR machine to a
GUID machine once: from a Thinkpad X300 to an Apple MacBook.
Not only did it fail, it destroyed and corrupted the hard disk and I
had to reinstall Mac OS X.
> Since there is no free disk space on the drive I would have to delete/shrink a
> partition to do this, right?
Wrong.
You will have to totally erase the hard disk and repartition it with
MBR instead of GPT. These are not interchangeable.
So, if you do, ensure you have a working, tested, bootable Win10 key
*FIRST* before changing anything. Also ensure you have made a copy of
any activation keys using ProduKey or similar.
https://www.nirsoft.net/utils/product_cd_key_viewer.html
*But* you can test if it will boot off a legacy BIOS USB key without
doing anything.
> But what about this instead:
> From the live USB with Ubuntu Mint 20.04 (where I use GParted now) I could
> cohoose to install Ubuntu onto this machine and then Ubuntu 20 would deal with
> the disk handling. I assume Ubuntu is clever enough to handle a machine from
> Lenovo, right?
It might. With UEFI all bets are off.
What you *must* do is boot the key *in UEFI mode*.
If you boot from a key in BIOS mode and then install onto a GPT/UEFI
disk, in my experience, you will destroy it. Nothing will boot off it
afterwards and I was unable to fix such a mess with either Linux or
Windows tools.
So you need to learn how to choose the boot mode, how to know which
boot mode you are in, and how to edit the UEFI boot settings and check
and maybe change the priorities.
Yes, it is a mess.
> If I then am asked if I want to dual-boot or completely remove Windows I would
> select remove and then presumably the Ubuntu installer would handle the disk
> drive stuff for me...
Maybe. I have not tried this. I never use the automatic-partitioning
options, and I dual-boot all my UEFI machines.
I recommend shrinking the Windows partition as small as possible but
leaving it there.
I wrote a blog post on how to do this:
https://liam-on-linux.livejournal.com/68495.html
Extremely short version:
[1] Run cleanup twice (first for user files, then again for system files).
[2] Disable hibernation.
[3] Disable swap.
[4] Run `CHKDSK /F`
[5] Then reboot into Linux, delete the pagefile and swapfile, delete
everything in C:\WINDOWS\TEMP and
C:\USERS\$username\AppData\Local\Temp
[6] Use Gparted to shrink the Windows partition so it has at a minimum
25% free space. Leave the ESP and the "Windows Reserved" partition and
the C drive. Any others you should be safe to remove.
Then install Ubuntu into the remaining space.
> This would get the Microsoft / Windows problem solved.
Should do. If you remove all the Windows partitions, though, you must
leave the ESP.
> >Do this _before_ you try to copy Ubuntu onto it.
>
> With this I guess you mean I could not copy my old installation onto it, right?
That is the key problem.
If you install Ubuntu in dual-boot, then remove the Ubuntu partition
and replace it with a copy of your old one, then:
• you will have to reinstall GRUB _in UEFI mode_
• you might have to check and edit /etc/fstab to make sure it knows
it's a different partition now
... but it might work. I have never tried this. I am not 100% sure.
If anyone else reading this has tried copying a partition from an
MBR+BIOS PC onto a GPT+UEFI PC, do please speak up!
> I think that Thinkpads are made by Lenovo since a good many years when IBM let
> go of them....
They are, yes.
My minimal experience of Lenovo _desktops_ is different and I didn't
like them as much.
Secondly, I hate modern flat chiclet keyboards, so I don't have any
newer Thinkpads. I have an X220 and a T420, and I'm looking for a
W520, but nothing newer.
I used an X240 when I worked at Red Hat and it was a total pain with
Linux... but then, I was using Fedora, and Fedora is a pain IMHO.
> >* You cannot boot from an NVMe disk in BIOS mode
> >* You might be able to but only if the manufacturer put some kind of
> >driver in the NVMe drive's firmware
>
> But if Ubuntu 20 fixed it when installing itself as described above, then maybe?
I honestly don't know. I am sure it _is_ possible to get a booting
UEFI system on GPT on NVMe -- there are many such computers now!
It's transferring from an old BIOS box I don't know about.
> I have since read up more and it seems like a pretty straightforward operation.
It is.
> Yes, I have seen you around here quite a bit and recently I saw that you are a
> little bit older than myself, but not by much...
:-)
> I've been doing electronics and software development for 40+ years but I have
> only encountered Linux privately and mostly recently since I retired from my day
> work 10+ years ago...
Good for you!
I had a daughter 2 years ago, when I was 51. (And I love being a dad!)
But I think I will be working until I drop dead now...
> I think that the 20.04 upgrade needs to be done first...
I agree.
> But then I also need to restructure my server a bit, primarily to move /home to
> a partition of its own. It holds the bulk of disk space now (175+ GB) and most
> of that are videos and such. Without that the system part is maybe 30 GB or so,
> much simpler to handle.
Ah, yes, that will help.
> Thanks for your comments, always appreciating talking to another old hand!
:-) Mutual!
I've seen you over on the FreePascal lists as well, but as my attempt
to get back into Pascal has not got far -- see "new daughter" above --
I don't post much there.
--
Liam Proven ~ Profile: https://about.me/liamproven
Email: lproven at cix.co.uk ~ gMail/gTalk/FB: lproven at gmail.com
Twitter/LinkedIn: lproven ~ Skype: liamproven
UK: (+44) 7939-087884 ~ Czech [+ WhatsApp/Telegram/Signal]: (+420) 702-829-053
More information about the ubuntu-users
mailing list