Switching from legacy to uefi

Moderation Note: Moved from Legacy MBR or UEFI GPT?

Hi im currently running manjaro on legacy bios and want to switch to uefi. Could I just do a clean install of manjaro on uefi and then restore a timeshift backup? Or am I best creating the uefi partition and making a new grub inside it

Have a look into this reference:

https://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide#Switching_from_BIOS_to_UEFI

2 Likes

The problem I have with that (apart from I'm thick and still learning) is I can't create a new partition, gparted won't let me create or resize my drive. I have 2 partitions
/dev/nvme0n1p1 ext /4
/dev/nvme0m1p2 linux-swap
and 7.2mb unallocated. I can't resize my main partition to create enough space for a UEFI partition which is why I asked about doing a fresh install of manjaro and then restoring a timeshift backup from my second drive

I know I can unmount my swap and resize that but can't resize the main partition as it needs to be mounted to use manjaro

You need to perform partition operations from a live usb.

Followed the instructions to the letter and it keeps failing with
grub-install: error: /boot/efi doesn't look like an EFI partition.

sudo modprobe efivarfs
modprobe: FATAL: Module efivarfs not found in directory /lib/modules/5.6.15-1-MA

and I'm running from chroot
the latest error is this

Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

can you return

inxi -Fxxxza
sudo parted -l

Sorry i meant to edit my post but the edit didn't save. I fixed it now, i was just doing something simple the hard way (story of my life).

Thanks to everyone who took the time to help me

Could you please post a resumé of how you solved this and mark it as solution for other users wanting to do the same in the future?

Summary of what I did

Edit: Works only if the disks have a GPT partition table.

MAKE SURE YOU ARE IN UEFI MODE IN BIOS FIRST

First I booted into live usb and created a 512mb partition with gparted on my drive, then I followed this guide

  1. Create the /boot/efi directory

sudo mkdir /boot/efi

3.) Mount the EFI partition as /boot/efi

sudo mount /dev/sdXY /boot/efi

X = Alphabet of the drive = a,b,c ... Y = Partition number of the EFI partition = 1,2,3,4...

Example - /dev/sda4

4.) Install Grub according to UEFI

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

5.) Update Grub configuration file.

sudo update-grub

but before I ran commands 4 and 5 I ran sudo manjaro-chroot -a

Not sure if this is the correct way but it worked for me. My mistakes were not booting into live usb from UEFI and not running sudo manjaro-chroot -a after step 3

5 Likes

That's great! Thank you so much for taking your time a d posting the solution.

it work if disks are in GPT ....

2 Likes

ok but how can I convert the disk from MBR to GPT during installation?

it's NOT easy to convert

  • if you convert , all disk will be converted ( backup required ) , gdisk convert this
  • new UUID to changes in /etc/fstab ( lsblk -fs )
    add /boot/efi in /etc/fstab , ( chroot and exit )
    and update grub ( chroot for get /boot/efi )

or

  • backup
  • format GPT with gparted , and restore backup , you need also /boot/efi with flag boot & esp
  • and restore grub-install EFI
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by