[HOW TO] Changing Legacy Boot with MBR to UEFI with GPT Without Reinstall MXLinux  [Solved]

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
ichsan2895
Posts: 6
Joined: Wed Apr 13, 2022 3:02 am

[HOW TO] Changing Legacy Boot with MBR to UEFI with GPT Without Reinstall MXLinux  [Solved]

#1 Post by ichsan2895 »

It is really high risk operation, I beware to backup the data first, then do this steps:

1. I use Zorin 15.3 KDE for changing MBR to GPT (not from Live USB, I run Zorin when changing MBR to GPT in this case, then I use MXLinux KDE 19.4 (Live USB) to install UEFI bootloader.

2.

Code: Select all

sudo apt-get install gparted
3. Open Gparted then open it. Select one partition to resize it. Allocate about 150MB for new partition called EFI (format it as FAT32)

4.

Code: Select all

sudo gdisk /dev/sdc
where /dev/sdc is your disk which contains MXLinux

5. press w then ENTER to change MBR to GPT
6. press y then ENTER o proceed it
https://lh3.googleusercontent.com/uu_eb ... h7MnmVGrLm

7.

Code: Select all

sudo parted
8.

Code: Select all

print all
Make sure the disk is successful changed to GPT. If it was successful, it will be printed Partition Table : GPT
https://forum.zorin.com/uploads/default ... f286b8.png

9.

Code: Select all

select /dev/sdc
10.

Code: Select all

set 3 esp
where 3 is the number of /dev/sdc3 that contains FAT32 EFI partition. If it was successfull, you should see boot, esp flags on FAT32 EFI partition.
https://forum.zorin.com/uploads/default ... 5bf3cb.png

11.

Code: Select all

quit
for exiting from Parted

12.

Code: Select all

sudo mount /dev/sdc1 /mnt
where /dev/sdc1 is root partition of MXLinux

13.

Code: Select all

sudo mount /dev/sdc3 /mnt/boot/efi

where /dev/sdc3 is EFI filesystem that created previously
https://lh5.googleusercontent.com/VtYpW ... Inmkrgh7oE

14.

Code: Select all

sudo chroot /mnt
15.

Code: Select all

grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable
https://lh4.googleusercontent.com/MIboc ... aH2FC0JOl9

Tested in a SSD Disk (256 GB) which contains 2 OS (MXLinux KDE 19.4 and Zorin Core 15.3). Both was detected by grubloader.



Moderator: images changed to links, please read the forum rules
Last edited by ichsan2895 on Sun Jan 01, 2023 1:58 am, edited 2 times in total.

ichsan2895
Posts: 6
Joined: Wed Apr 13, 2022 3:02 am

Re: [HOW TO] Changing Legacy Boot with MBR to UEFI with GPT

#2 Post by ichsan2895 »

Why I don't use MX Boot Repair?

Because I got fail and error "could not set up chroot environment" when creating ESP boot loader with MX Boot Repair

Post Reply

Return to “Tips & Tricks by users”