The officially official Devuan Forum!

You are not logged in.

#1 2024-02-25 04:28:56

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

installing Devuan Trinity, gpt disk, non-uefi boot error

Hi, I am trying to install trinity on to my laptop. Asus n550jv

I wiped the old partitions off and setup partitions on the 238.5Gb ssd as
/dev/sda1 2mb bios-grub
/dev/sda2 46.9Gb /
/dev/sda3 4.1Gb swap
/dev/sda4 187.5Gb /home

I got through the install but when I rebooted (quite a few times after subsequent re-installs) I get a bios error like

insert a bootable disk, disk not found.

Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key

This laptop only has a cdrom and the ssd. I'm using a devuan-Trinity (kde) off a memory-stick.

If I try to install-grub /dev/sda2, I get an error...

install-grub: error: failed to get canonical path

This laptop has no other OS installed.

It doesn't seem to matter what I try now, after an install from a live-distro, the laptop can't find the bootable drive.

When I check the drive partitions, it seems to be intact. But the bios can't find the info to boot.

Daedalus/plasma was working fine, I thought I would try to reduce the overheads to get more time out of the new battery.

The sata mode is set as ahci.

Is there a glaring solution I'm not seeing?

tia, Glenn


pic from 1993, new guitar day.

Offline

#2 2024-02-25 07:55:27

aluma
Member
Registered: 2022-10-26
Posts: 533  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

@GlennW

/dev/sda1 2mb bios-grub

To boot in UEFI mode, this partition must have the

esp

flag.

Regards.

P.S. The partirion table is not entirely clear.
If msdos, then the /dev/sda1 2mb bios-grub partition is not needed.

Last edited by aluma (2024-02-25 08:31:38)

Offline

#3 2024-02-25 14:26:37

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 73  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

that laptop was manufactured in the era where some could boot mbr/dos and some required gpt partitioning

ttps://forums.debian.net/viewtopic.php?t=150117

ttps://www.rodsbooks.com/efi-bootloaders/index.html

also for reader reference:
ttps://www.pcmag.com/reviews/asus-n550jv-db72t
ttps://www.laptopmag.com/reviews/laptops/asus-n550jv


Be Excellent to each other and Party On!
ttps://www.youtube.com/watch?v=rph_1DODXDU
ttps://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you

Offline

#4 2024-02-25 15:13:21

delgado
Member
Registered: 2022-07-14
Posts: 157  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

In short: There is no way around UEFI boot for a gpt disk.

gpt disk and non-uefi boot are mutally exclusive. This can not boot by design - it's not an error.

gpt partion table -> UEFI boot
mbr partiion table -> BIOS boot

Modern x86 PC's are all UEFI. Addionally they have a BIOS emulation, which allows them to boot mbr disks.
An "UEFI emulated BIOS" counts as BIOS.

Offline

#5 2024-02-25 16:17:15

aluma
Member
Registered: 2022-10-26
Posts: 533  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

that laptop was manufactured in the era where some could boot mbr/dos and some required gpt partitioning

Everything is simpler actually. smile
Here are the names of programs that allow you to load the installed OS
https://dev1galaxy.org/viewtopic.php?id=6394

Before this, you need to fix the partitions on the disk from a live session using gparted in accordance with the previously selected table (GPT or msdos).
Then load the installed OS and reinstall the bootloader.

Offline

#6 2024-02-25 16:42:22

rolfie
Member
Registered: 2017-11-25
Posts: 1,067  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

In short: There is no way around UEFI boot for a gpt disk.

gpt disk and non-uefi boot are mutally exclusive. This can not boot by design - it's not an error.

This is true for Windows, where it is a must, but not for Linux.

In case of a GPT partitioned disk to be able to install/boot in Legacy mode you will need a grub_bios partition (1Mibyte, no file system, grub_bios flag set) to be able to save the parts of grub that goes in that area that is availabe on MBR partitioned disks and which is used by the GPT partitioning scheme in that case. I have done that successfully with Daedalus. Will only work for a pure Linux system.

The installation media must be booted in legacy mode to be able to install the legacy grub. May thats the problem?

Last edited by rolfie (2024-02-25 16:44:47)

Offline

#7 2024-02-25 17:24:43

aluma
Member
Registered: 2022-10-26
Posts: 533  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

UEFI is dancing with a tambourine.  smile

The recipe may work on one distribution, but not on another. It may work if you give the installer the entire disk and will not work if you install it on a separate partition of a system with another Linux already installed in UEFI. (my last experience with Gostbsd) and such options...

Offline

#8 2024-02-25 17:36:54

rolfie
Member
Registered: 2017-11-25
Posts: 1,067  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Well, you can't mix legacy installs and UEFI installs on one computer, that is impossible. You must take a decision during the initial installation ... thats then valid for other OSes on that PC too.

Last edited by rolfie (2024-02-25 17:37:29)

Offline

#9 2024-02-25 17:41:01

rolfie
Member
Registered: 2017-11-25
Posts: 1,067  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

I maybe have an idea what went wrong:

If I try to install-grub /dev/sda2, I get an error...

install-grub: error: failed to get canonical path

You have prepared a bios_grub partition, why do you want to install grub to /? Use /dev/sda instead. If booted in legacy mode grub-install will take care for the rest.

Last edited by rolfie (2024-02-25 17:41:27)

Offline

#10 2024-02-25 17:57:22

aluma
Member
Registered: 2022-10-26
Posts: 533  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Well, you can't mix legacy installs and UEFI

In my case (failure when installing to a separate partition) it was a clean option UEFI.

Offline

#11 2024-02-26 02:11:20

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Hi, thank you for all the replies.

I am avoiding any M$ crap, if possible.

I partitioned the disk with gpt.
I have switched off fastboot, and secureboot in the bios.
Also I have the disk recognised using ahci.
CSM is ENABLED.

Because this is a different machine, here is the partitioning table list from,
lsblk

loop0 ... clip
sda    8:0 0 238.5G 0 disk
-sda1 8:1 0       2M 0 part
-sda2 8:2 0   23.4G 0 part
-sda3 8:3 0    8.4G 0 part
-sda4 8:4 0    3.5G 0 part
-sda5 8:5 0    3.5G 0 part
-sda6 8:6 0  16.6G 0 part
-sda7 8:7 0   183G 0 part
sdb ... (devuan-live memory stick)
-sdb1 ... clip
... clip
sr0 11:0 1 1024M 0 rom

I wrote UEFI, but I may have meant EFI.

installing Devuan Trinity, gpt disk, non-uefi boot error

If I am to re-install an OS to the laptop, I must get past this partitioning problem.

My memory fails me, but I'm beginning to think that the laptop was using efi-boot, with fastboot and secureboot switched off.
In my old notes I have a 199.2Mb fat partition.
I may have changed this at some time, without reinstalling the OS, and maybe that is why I'm not familiar with the boot time grub errors.

I only use it when I'm away from home and need a PC. Like travelling, holidays, house-sitting, etc.

There is no personal data at risk... so I may reinstall, but boot from the efi section of the flash-drive and then see if the install progresses past the grub-install section.

The last attempt, last evening I continued past the error, but on reboot could login but not start a gui. ( now I remember I installed xfce4, not plasma, lol)

Anyhow, I wanted to install trinity, because I like (familiar with) kde systems.

I downloaded and dd'd to a stick super_grub2_disk,

dd bs=512k if=/home/glenn/Downloads/super_grub2_disk_hybrid_2.02s10.iso of=/dev/sde status=progress && sync

But didn't find a way to install/reinstall grub. So, I must have changed the partitioning scheme and borked the install on my own.

Anyhow, life's an adventure, and I'm always open to a new truth & still learning.

Thanks again

Last edited by GlennW (2024-02-26 20:49:37)


pic from 1993, new guitar day.

Offline

#12 2024-02-26 08:50:48

aluma
Member
Registered: 2022-10-26
Posts: 533  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

@GlennW

so I may reinstall,

It is not necessary.
You already have the OS installed, it just needs a bootloader.
1. The partition for the UEFI bootloader must be 0.5...2 GB in size and have the efi,boot flags. Create this instead of your 2 MB sda1 partition.
2. This can be done using gparted from a live image. In my experience it moves, resizes, etc. correctly.
3. I can’t say anything about super_grub2, I use YUMI Legacy, all you need to do to boot the OS from your hard drive is click on the first menu item. As I understand it, it works like grub with a search for installed operating systems.
YUMI Legacy itself requires Win to install, there is YUMI exFAT, but I have little experience using it.
2.pngкартинка png

P.S.Another way, probably faster, is to create a partition for the UEFI bootloader and actually reinstall it.
By the way, I installed my Trinity using the live image of Daedalus 5.0 with Xfce.

Last edited by aluma (2024-02-26 09:13:05)

Offline

#13 2024-02-26 20:42:08

rolfie
Member
Registered: 2017-11-25
Posts: 1,067  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

@GlennW: you have to make up your mind what you want on this PC - either a legacy install (that was my initial impression) - or an (U)EFI installation. Unfortunately the prerequisites and boundary conditions slightly differ from each other. Both is possible, but you will need to take the right steps to achieve your goal.

Legacy installation on a GPT partitioned drive:
- You will need to add a 1M unformatted partition with bios_grub flag set for writing the legacy grub into that.
- Boot the install media in legacy mode. A legacy grub install to a selected device will be executed by the installer.

(U)EFI-Installation on a GPT partitioned drive:
- You will need an EFS partition (Debian and Ubuntu installers refer to the ESP by the name "EFI boot partition"), FAT32, suggested size 512M to 2048M (Win10 comes with about 110M, but this is small but not safe against update and unforeseen issues). Marked as ESP and in many cases boot flag set. 
- Boot the install media in UEFI-Mode. A EFI grub install to the ESP will be executed by the installer.

Something to read: https://askubuntu.com/questions/500359/ … -partition

Last edited by rolfie (2024-02-26 20:43:26)

Offline

#14 2024-02-26 21:22:40

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Hi, thanks for all the replies.

@aluma: I've already wiped the drive (again), but I'll keep the super iso for emergencies.

Sorry for not waiting. I get a bit tenacious.

@rolfie: Thank you for your summary... I've read so many descriptions, and forgotten a bit, on my main PC box I use legacy and GPT.

I want to try that (legacy and GPT) on my laptop, and will give it another go today after re-partitioning.

I found the Trinity install a bit confusing... with partition (it just my brain) of /usr /var /boot/ / /tmp swap and /home and might try using the Full ISO and converting to trinity afterwards.

The other problem I had was I was trying to start the gui, but had forgotten I only installed xfce4 and not plasma... :-)

I seem to get myself into sticky situations faster than flash-gordon.


pic from 1993, new guitar day.

Offline

#15 2024-02-26 23:11:35

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Well, I got xfce4 installed, but I had to use grub-super-boot... to boot the install.

I still have the same boot error, ... no disk found.

I haven't seen in gparted a "make bootable" flag that sticks.

I started gdisk,
selected /dev/sda
p = print gpt table (protected mbr)
x = expert
a = attributes
1 = partition number (found no fields set)
2 = legacy bios bootable
w = write (gives ominous warning "all partitions will be deleted")

ready to reboot...


pic from 1993, new guitar day.

Offline

#16 2024-02-26 23:20:35

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,427  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

ExeGNU/Linux is Devuan with Trinity -
https://sourceforge.net/projects/exegnulinux/files/iso/

As mentioned before, to boot gpt in legacy mode, you need a partition that is at least 1MB, unformatted and bios_grub flag (in gparted) or ef02 flag (in gdisk). No partition needs to be marked bootable.

Offline

#17 2024-02-27 00:04:05

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Thank you fred.

...to boot gpt in legacy mode, you need a partition that is at least 1MB, unformatted and bios_grub flag

I had this before and the bios gave the error above, this is why I am asking.

I just rebooted the laptop and it gives the same error. edit...

I got through the install but when I rebooted (quite a few times after subsequent re-installs) I get a bios error like

insert a bootable disk, disk not found.

Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key

partmon gave a warning the the kernel would not be aware of the change until rebooted.

When selecting the bios (esc) it shows only the cdrom as a bootable device (no usb inserted).

I have that iso, exegnulinux... but even after several installs, I get the same bios error.

wip

Last edited by GlennW (2024-02-27 00:15:35)


pic from 1993, new guitar day.

Offline

#18 2024-02-27 00:24:42

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

The os is installed, I can boot into and start at the slim login manager, with the grub-super-iso.

The bios shows the ssd is installed and connected, as usual.

In the bios, I changed PXE to enable... just gives info on the network device, also

intel security, theft to off.

I used gdisk to set the 1st partition as bootable, but should that be the partition where the /boot directory is?

I can try again, btw, all the partitions and data are intact after the gdisk operation.

still working on it.


pic from 1993, new guitar day.

Offline

#19 2024-02-27 00:38:08

stultumanto
Member
Registered: 2023-12-12
Posts: 54  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

You need to install grub to the disk, not the partition, i.e., 'grub-install /dev/sda' not 'grub-install /dev/sda2'.

There are two versions of grub, grub-efi and grub-pc. The former is for UEFI systems, the latter for BIOS. I don't know how it works if you install Devuan with the automatic installer, but is it possible you got the wrong version?

You can find out whether the system is in UEFI mode by checking the contents of /sys/firmware/efi/efivars/. There should be a large number of files in there if the system is UEFI. If the efivars aren't there, it's not EFI. Some systems allow you to switch between UEFI and legacy BIOS boot in the BIOS setup menu.

Here's the full process for setting up a legacy BIOS boot partition: After creating the partition in gdisk (type EF02) enter the expert menu with the x command. Then issue the a (attributes) command, and select the BIOS partition number. An attribute menu will be printed. Select the 'hide from EFI' and 'legacy BIOS bootable' attributes (should be options 1 & 2.) Do not to format this partition.

Last edited by stultumanto (2024-02-27 00:51:48)

Offline

#20 2024-02-27 01:14:51

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

@rolfie: Thank you, I always boot in legacy bios mode where and when I can, to avoid the esp shims and signing.

I made up my mind a long time ago, and always use legacy boot. But my laptop is a slightly different scenario.

It just has to work.

I do know from experience that most of the iso have a similar installer function.

I might try the PcLinuxOs iso, just to see if that gets me out of this situation.

There is an upside to using the grub-super...iso, if the laptop gets lost it will be hard to use without the usb as a key..


pic from 1993, new guitar day.

Offline

#21 2024-02-27 01:16:41

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

@stultumanto

You need to install grub to the disk, not the partition, i.e., 'grub-install /dev/sda' not 'grub-install /dev/sda2'.

OK, I'll do that now.


pic from 1993, new guitar day.

Offline

#22 2024-02-27 01:27:48

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

It replied, "no errors reported"

But the same error appears on reboot. insert proper disk


pic from 1993, new guitar day.

Offline

#23 2024-02-27 21:29:46

delgado
Member
Registered: 2022-07-14
Posts: 157  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

(No solution, sorry)
Depending on the time you want to sink in this topic ... something to read.

Detailed information on disk layouts and booting can be found in the install instructions of (e.g.) Archlinux and Gentoo.
Philosophy is: "There is no install program, you do anything by yourself". Instructions and information are corresponding.

Offline

#24 2024-02-27 21:53:03

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 590  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

The disk and os boots fine with a bootable flashdrive, like super-grub-disk.

So I gather I have wiped the mbr part of the ssd when I repartitioned and reformatted, and the bios no longer sees the ssd as a bootable drive.


pic from 1993, new guitar day.

Offline

#25 2024-02-28 00:21:03

aluma
Member
Registered: 2022-10-26
Posts: 533  

Re: installing Devuan Trinity, gpt disk, non-uefi boot error

Solutions:
1. Erase everything from the disk, install opensuse on an empty disk in automatic mode.
https://download.opensuse.org/distribut … -Media.iso
opensuse has a more advanced installer and interface.
2. Make a clean partition of msdos, swap, a couple of root partitions "/" and /home.
Try installing the same opensuse or a different one.
3. Undesirable and only if a Win license is flashed into the BIOS. Download Win8, install it on the entire disk, then reduce its partition, add Linux partitions and install it naturally in UEFI mode.

P.S.
For option 2, maybe you need to select the "legacy" mode in the BIOS, I don't know how this is done on your computer. In one of mine there is no such item at all and the mode is determined by the disk partition.

Last edited by aluma (2024-02-28 00:42:27)

Offline

Board footer