Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install from calculate to mbr fails at grub [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Thu Sep 14, 2023 10:37 pm    Post subject: Install from calculate to mbr fails at grub [solved] Reply with quote

I have been using calculate linux to install gentoo. This works, but their installer isn't perfect. Once you're done it's very easy to switch from their binhost to gentoo repositories, although a binhosted gentoo is very nice too. I have reviewed this elsewhere.

In particular, if you're installing to an old system with no uefi, things get difficult. I believe this is a grub, not a gentoo or calculate problem. The install live cd uses uefi boot, and grub stubbornly refuses to believe that you're doing a legacy install. Uefi has certainly become the default, so installing to mbr from a uefi is more and more of a useless edge case of use to nobody. But I think the same thing could bite straight up gentoo users too.

The calculate installer after correctly installing everything fails with:

Code:
Failed to mount efivarfs, installation failed.


I tried every which way to get it to work, but it just won't. Not a gentoo problem so I won't elaborate. what I did was try to run grub by hand after cl-install exits: # grub-install --target=i386-pc /dev/sdX

That should work, but fails with:
Code:
 Error: Failed to get canonical path of `none'


This is a pretty cryptic error, not unheard-of, but definitely a grub error. Grub is looking once again for nonexistent efi partitions of some kind. But after much googling I found the solution. You can override grub's default behavior with:

Code:
 # grub-install --recheck --root-directory=/mnt/test /dev/sdX


Of course you have to have mounted your target root directory. Calculate mounts the target disk in a weird place, but I just created /mnt/test and mounted it there too.

That finally worked for me, and I'm on to the next problem. But the post where I found this recommend that you can add "--force" if that didn't work. Since it worked I can't check that.

Cheers,
Jon.
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 370

PostPosted: Fri Sep 15, 2023 9:05 am    Post subject: Re: Install from calculate to mbr fails at grub [solved] Reply with quote

jesnow wrote:
Uefi has certainly become the default, so installing to mbr from a uefi is more and more of a useless edge case of use to nobody. But I think the same thing could bite straight up gentoo users too.


Virtualised systems are often using a virtualised BIOS.

jesnow wrote:
I tried every which way to get it to work, but it just won't. Not a gentoo problem so I won't elaborate. what I did was try to run grub by hand after cl-install exits: # grub-install --target=i386-pc /dev/sdX

That should work, but fails with:
Code:
 Error: Failed to get canonical path of `none'


This is a pretty cryptic error, not unheard-of, but definitely a grub error. Grub is looking once again for nonexistent efi partitions of some kind. But after much googling I found the solution. You can override grub's default behavior with:

Code:
 # grub-install --recheck --root-directory=/mnt/test /dev/sdX


Of course you have to have mounted your target root directory. Calculate mounts the target disk in a weird place, but I just created /mnt/test and mounted it there too.


If you want to install Grub, you either need to chroot into the target system and execute the "grub-install /dev/sda" there or you need to specify the target system with the "--root-directory" option. Because you want Grub from your installed system and not from the live-system.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Sat Sep 16, 2023 1:06 pm    Post subject: Reply with quote

This was a bare metal install, not virtualized. Calculate is especially nice for virtualized, small or one-off systems as you don't have to spend days to compile and maintain them and they're still gentoo. this however, was 100% metal. An old (but still good) system.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sat Sep 16, 2023 1:32 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Unsupported Software.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Sat Sep 16, 2023 3:29 pm    Post subject: Reply with quote

Hey it's your ballpark, your rules.

pietinger wrote:
Moved from Installing Gentoo to Unsupported Software.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sat Sep 16, 2023 3:33 pm    Post subject: Reply with quote

jesnow wrote:
Hey it's your ballpark, your rules.

pietinger wrote:
Moved from Installing Gentoo to Unsupported Software.

If an Gentoo developer tells me it is wrong I believe him:
https://forums.gentoo.org/viewtopic-p-8801943.html#8801943
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum