Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

UEFI or BIOS MBR

Started by radiosparks, April 03, 2021, 11:04:18 PM

Previous topic - Next topic

radiosparks

I installed rolling release with boot on /boot efi vfat drive.
Calmares did not give option for uefi. But installed with MBR
How can I re-install boot in efi?

zweimail.nemomen

Hello Radiosparks,
I have only just watched your comment.
Perhaps my solution is not too late for you in spite of this.
I use SparkyLinux 5.15 (Nibiru) 64-bit EFI/GPT, but the STABLE release. Everything works well. I suppose, the solution would be the same/similar in rolling releases either.
Although I usually can get the required result only by the second installation, but then always works.
Be careful, I am not an IT expert, no warranty!

(1) First step is a data saving. It is always important, but in this case absolutely.
(2) Check whether do you have an EFI system or not:
lsmod | grep efi
If the window is empty no EFI, if not like mine:
efi_pstore               ***  *
efivars                   ***  1 efi_***
efivarfs                  ***  1
EFI found on the system.
(3) Check the present situation by sudo gdisk -l /dev/sda. The result would be like this:
Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present
Then you can convert the MBR to GPT, see point 4.2!
I estimate you should like to watch a similar like my data:
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: *** sectors, *** GiB
Model: ***
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): ***
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is ***
Partitions will be aligned on 2048-sector boundaries
Total free space is *** sectors (*** MiB)
Number  Start (sector)    End (sector)  Size       Code  Name
1               2048             ***             *** MiB   EF00  EFI System
2                 ***              ***             *** GiB    ***      Linux swap
3                 ***              ***             *** GiB    ***      Linux filesystem
4                 ***              ***             *** GiB    ***      Linux filesystem

(4) Partitioning:
(4.1):
Using Gparted for partitioning especially in live ISO mode.
I suggest you to follow the tables (it is not an obligatory, depends on your HW):
/dev/sda1        type: esp           Size: 550MB+        Mount: /efi          File system: FAT32;
/dev/sda2        type: swap         Size: 2GB+            Mount:               File system: swap;
/dev/sda3        type: root           Size: your choice   Mount: /             File system: Ext4
/dev/sda4        type: home         Size: rest               Mount: /home     File system: Ext4
It is a risk, whether you can use the current system after rebooting or not. But you could follows these partition table, while re-install the SparkyLinux.
(4.2): Using commands for converting MBR to GPT.
To convert an MBR partition table to GPT using sgdisk, use the -g/--mbrtogpt option:
# sgdisk -g /dev/sda
It is also a risk, whether you can use the current system after rebooting or not. But you could follows the steps, when reinstall your system. When finished the reinstall, you could check the result like above mentioned. See my comments in the 4th sentence.
(5) I never forget to use the sudo update-grub && sudo update-grub2 commands for keeping the system updated every time. When run these in the terminal, you will see the result among the rows.
Be healthy all the Sparkers!
nemomen

View the most recent posts on the forum