Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting the boot mechanism to UEFI

106 views
Skip to first unread message

Andrew

unread,
Jul 13, 2020, 8:27:09 AM7/13/20
to
Given a Linux-only system running on two discs (SSD and "normal"), I
have been trying to work out how to change things to use the UEFI boot
mechanism.
The SSD ( /dev/sda ) has room to spare, although not at the start of the
drive. The system-main partition is also on that drive.
The only instructions I have seen are for Debian-based systems.
I'm aware that I could do an initial install - re-partitioning the SSD -
and that would get me there, is that the only way?
The Motherboard is only a couple of years old - as you can guess by the
use of SSD - so there are no technical constraints.

Bit Twister

unread,
Jul 13, 2020, 9:11:00 AM7/13/20
to
On Mon, 13 Jul 2020 14:27:07 +0200, Andrew wrote:
> Given a Linux-only system running on two discs (SSD and "normal"), I
> have been trying to work out how to change things to use the UEFI boot
> mechanism.
> The SSD ( /dev/sda ) has room to spare, although not at the start of the
> drive. The system-main partition is also on that drive.
> The only instructions I have seen are for Debian-based systems.
> I'm aware that I could do an initial install - re-partitioning the SSD -
> and that would get me there, is that the only way?

As I misunderstand it, your boot loader looks for a partition with a
certain UUID/GUID. As a result of that you can have the "UEFI" partition
pretty much where you want it.

For example, I am running Mageia Linux, bios is set to legacy OS/CSM.
For grub to be able to boot the system, I created the bios grub partition
on the end of the drive.

In my stupid opinion, you could do the same thing without having to
re-partition the drive.

If it were I, I would boot a system rescue, click the Gparted icon
bottom left in task bar, shrink a partition some where, then set the
flags on the new partition as desired.

That should set the UUID to the value need for UEFI booting.
If not, you can use Gparted to set the desired value.
https://en.wikipedia.org/wiki/BIOS_boot_partition

Be aware you still need to get the partition filled with the desired
software.

Download link at http://www.system-rescue-cd.org/
contains instructions on burning iso to thumb drive if desired.

Andrew

unread,
Jul 13, 2020, 10:00:36 AM7/13/20
to
Thanks.
I don't actually need to shrink anything, the two partitions on that SSD
(one is the swap area) don't take up the entire volume so I can just
create a new partition.
Your
> Be aware you still need to get the partition filled with the desired
> software.

is the open problem.
That system is running openSUSE 15.1 at present and I may well end up:
- taking a copy of /etc somewhere under /home
- creating a list of my current software in /home
and then reinstalling 15.1, totally re-partitioning the SSD while I'm
about it - there is a directory there I'd like to move to /dev/sdb and
I'm not that happy with btrfs as a filesystem.

This kind of open heart surgery was much easier before systemd took over.

Carlos E.R.

unread,
Jul 13, 2020, 10:16:08 AM7/13/20
to
As you are posting on the SUSE group, I take it for a given that you are
using openSUSE Leap or Tumbleweed. Well, it is easy, fire up YaST, boot
module, change boot method to UEFI. It should propose to create an EFI
partition (doesn't need to be at the start), but I don't know if this is
contemplated. So, you have to try.



--
Cheers, Carlos.

Andrew

unread,
Jul 14, 2020, 3:28:20 AM7/14/20
to
Thanks, but . . .
I tried it the first time. It told me it needed to install a new
package - which it did - but then told me I had no valid EFI partition.
YaST Partitioner did not want to let me create a new partition (of any
kind) in the unassigned area of the SSD.
Booting a current Gparted, it allowed me to create such a partition.
Booting back into openSUSE 15.1, YaST Partitioner allowed me to set the
partition type to EF and format the beast.
Trying YaST Boot, once again it told me I had no valid EFI partition.
Reboot (some changes to the partition table used to require a reboot)
and trying YaST Boot, once again it told me I had no valid EFI partition.
My new EFI partition is correctly formatted, but empty.

Carlos E.R.

unread,
Jul 14, 2020, 8:04:07 AM7/14/20
to
Well, at this point I'm out of ideas, and I would recommend asking at
the official openSUSE support channels, ie, the mailing list or the web
forum.

--
Cheers, Carlos.

Bit Twister

unread,
Jul 14, 2020, 8:45:35 AM7/14/20
to
On Tue, 14 Jul 2020 09:28:18 +0200, Andrew wrote:


> Thanks, but . . .
> I tried it the first time. It told me it needed to install a new
> package - which it did - but then told me I had no valid EFI partition.
> YaST Partitioner did not want to let me create a new partition (of any
> kind) in the unassigned area of the SSD.
> Booting a current Gparted, it allowed me to create such a partition.
> Booting back into openSUSE 15.1, YaST Partitioner allowed me to set the
> partition type to EF and format the beast.
> Trying YaST Boot, once again it told me I had no valid EFI partition.
> Reboot (some changes to the partition table used to require a reboot)
> and trying YaST Boot, once again it told me I had no valid EFI partition.
> My new EFI partition is correctly formatted, but empty.

Not so sure that you can see contents in that partition when/if
you can mount it.

Suggest you get back into gparted, click the partition, select the flags
option and set the desired flag type.

After which you should see the desire code. Example snippet of mine
gdisk -l /dev/sda
Number Start (sector) End (sector) Size Code Name
9 712286208 1471924223 362.2 GiB 8300 vmguest
10 1471924224 1471926271 1024.0 KiB EF02 bios_grub

My code is EF02 because it is a legacy MBR install. Not UEFI
I do not expect yours to have a Name. I put media and Partition labels
on all my partitions.

Malcolm

unread,
Jul 14, 2020, 10:07:38 AM7/14/20
to
Hi
I suspect the disk is still 'dos' rather than 'gpt' better to backup
and look at bios_grub or start afresh with the disk as gpt (far better
idea IMHO).

--
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
Tumbleweed 20200710 | GNOME Shell 3.36.3 | 5.7.7-1-default
Intel DQ77MK MB | Xeon E3-1245 V2 X8 @ 3.40 GHz | Intel/Nvidia
up 13:01, 2 users, load average: 0.39, 0.56, 0.89

Andrew

unread,
Jul 14, 2020, 2:14:10 PM7/14/20
to
I have not done anything to that SSD using fdisk but Yast/Partitioner
does describe the Partition Table as being MS-DOS.
On the other hand: from what I have read about EFI, that should not
matter. On a similar setup but with UEFI boot, the Partition Table is
also described as being MS-DOS. The content of *that* EFI partition
were set up by an original openSUSE install and that is looking like the
best option.
No urgency though, it works using the traditional BIOS boot now.

Carlos E.R.

unread,
Jul 14, 2020, 5:24:08 PM7/14/20
to
Then Malcolm is right.

> On the other hand: from what I have read about EFI, that should not
> matter.  On a similar setup but with UEFI boot, the Partition Table is
> also described as being MS-DOS.  The content of *that* EFI partition
> were set up by an original openSUSE install and that is looking like the
> best option.
> No urgency though, it works using the traditional BIOS boot now.

It matters to YaST, it does not contemplate that case.

--
Cheers, Carlos.

Malcolm

unread,
Jul 14, 2020, 7:30:56 PM7/14/20
to
Hi
Then I would stick to what's working....

What is the system, is it recent or older hardware?

--
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
Tumbleweed 20200713 | GNOME Shell 3.36.4 | 5.7.7-1-default
Intel DQ77MK MB | Xeon E3-1245 V2 X8 @ 3.40 GHz | Intel/Nvidia
up 22:24, 2 users, load average: 0.12, 0.18, 0.15

Andrew

unread,
Jul 15, 2020, 3:13:38 AM7/15/20
to
The system is just over two years old and the motherboard - Asus Prime
A320M-K - is still being sold now, I even did a BIOS update a couple of
months back. This is about as current as it gets.
The SSD (and the rotating disc) are the same age as the Mobo and I'm
pretty sure I have not been updating partitions with fdisk so I have no
idea why the system should think the discs have MS-DOS partition tables.
Actually, I'm absolutely sure I have not been updating SSD
partition-tables with fdisk. I also never had plans to install Windows
on this system so will not have felt the need to set any compatibility
flags.

William Unruh

unread,
Jul 15, 2020, 3:48:24 AM7/15/20
to
a) AFAIK linux ignores all flags anyway.
b) AFAIK Dos partition table means the usual "4 primary partitions, and
one can be used for secondary partitions" type partition table. IT is
the old standard-- the newer one is gpt partition table. It just means
that when you formatted the disks you used the old style rather than the
new style partition table, however you partitioned it originally (or
perhaps it came with that).

No great harm unless you really want to have many partitions.

Andrew

unread,
Jul 15, 2020, 5:44:36 AM7/15/20
to
b) makes sense, that is exactly what I did.
0 new messages