Home | News | Download | Packages | Forum | Wiki | Github

Installation error: failed to install grub to /dev/sda


(Jose) #1

Hello,

1.- I was trying to install Void in a VirtualBox Virtual Machine, no luck, I followed the following tutorial:
Void Linux: A Review + Installation Guide
http://www.cupoflinux.com/SBB/index.php/topic,2300.0.html

But after the last step: Install, I get the error:

failed to install grub to /dev/sda
Check /dey/tty8 for errors
I do not see anything in that file. I used the file:
void-live-x86_64-20160316-cinnamon.iso
It is a 530MB but does not have even a simple editor like gedit. Void works in the VM from the ISO but it was impossible for me to install it in the 16GB virtual disk.

2.- I was able to install to RAM the gedit editor, but when I tried to install:
2.1 KeepNote
2.2 View Your Mind VYM (Mind Mapping)
2.3 Wine
It did not find those programs in the repository, can they be installed or if they are not in the repository can not be installed?

Please understand that I am a Linux newbie. I would like a rolling distro without systemd to do graphics design and web pages as well as personal notes and mind maps. Easy to use and to be able to use some Debian packages.

Thank you and regards.
joejac


(deepdark) #3

You can search the repository for packages matching what you want using

xbps-query -Rs “mind.map”

to search for terms mind and map. You can just add as many terms as you want, separating with “.”.

I use them as an alias in my local zsh file

xqr=‘xbps-query --regex -Rs’

and

xqr “text.editor”

While Void has no systemd, its repos are smaller than the gargantuous Debian repos. You left the Valhalla of repos and now you are in a much smaller pocket universe. You can build your own with Void tools though.

As to your grub/vm problems, sorry I haven’t used Void in vm so cannot help with that one. For installing to metal though, I used the Gentoo Installation Block Devices & Partition Scheme guides, substituting their tools with cfdisk and syslinux.


(Jose) #4

Thank you deepdark.

1.- Me I have a suggestion: If you include in your ISO an automatic partition solution in order to do a straight forward Void installation, you will be able to increase your audience, much people like me will be able to use your OS and your OS will soar in Distrowatch list. This is the first time I fail to install an OS in Virtual Box and I have tested about 25 distros.

I always avoid distros for technical people, but in this case I found very good references of Void compared to Gentoo, that is the only choice that I have remaining, and I was avoiding to install since one year ago that my beloved Linux Mint Debian 1 was discontinued and I know that Debian goes to systemd.

2.- Thank you for the information on building packages, but that is too advanced for my little Linux knowledge, and know I have a lot of issues to resolve and very little time to do an in deep study on the matter.

Best regards.
joejac


(Benjamin) #5

There is a tool to install void graphically, it’s called “void-installer”. If you used the local install option from the installer you’d also get a GUI interface once you login. All this information may be found at http://www.voidlinux.eu/download/.


(Jakukyo Friel) #6

FYI, I installed void-live-x86_64-musl-20160420.iso on VirtualBox,
and grub installed successfully (BIOS+GPT+1M bios-boot empty partition).


#7

I know I’m a bit late, but I ran across the same error message: I forgot to mark the /boot partition as bootable in cfdisk. If you miss that, you’ll get the error messages mentioned above.


(Alex) #8

If adept Void users think it is better to have my post in a new topic, please tell me so an I will remove this post and copy it to a fresh topic. I made the post here, because last reply is quite old and I have same problem as Original Topic.

I have purchased a refurbished, “high-end” type of laptop.
Fujitsu Siemens Lifebook P702
64 bit Intel i5 3320m
4 GB DDR3
500 GB HDD
EFI / UEFI ? (Not sure which, UEFI-world is new to me. Deff not Bios only though, I think. )
Data Sheet PDF:
http://solutions.us.fujitsu.com/pdf/notebooks/Notebook-computer-LIFEBOOK-P702-datasheet.pdf
BIOS Manual PDF:
http://solutions.us.fujitsu.com/www/content/pdf/SupportGuides/P701_BIOS_Guide_FPC58-2900-01_rA.pdf

The re-seller provided a Windows7 Pro Swedish Installation DVD
(Windows only, no specific drivers, no Bloat-Ware! :grinning:)

I have installed an empty 1TB HDD. (I can play with it back and forth as I wish.)
I will need to setup a dual-boot on this laptop.
Win7 for company-work and Void for personal use.
I can with no problems make a fresh Win7 install with the provided DVD.
(Through an external USB-DVD-reader.)

I just can not make Void to install on this laptop. ( Have been trying 2 days now.)
Live Void 2016.04 Cinnamon 64-bit on an USB-flash-drive loads fast and I do not see any errors during the boot-process. First I installed Win7, then tried to install Void “next to it”. Installation fails with message:
Failed to install grub to /dev/sda !
Check /dev/tty8 for errors

Finally, I even tried to install Void only on a re-formated disk from scratch. Same result.

My settings in BIOS:
BIOS version: 2.07 (the latest from manufacturers web-site)
System: Drive Configuration: Drive0: (1TB HDD) Enabled

Advanced: Boot Configuration:

  • Fast Boot: Disabled
  • CSM (Compatibility Support Module): Enabled
    (I have also tried Disabled, same result)
  • Boot Time Diagnostic Screen: Enabled
  • Preboot Execution Environment: Disabled

Advanced: Internal Device Configurations:

  • Serian ATA Controller: Enabled
    SATA Controller Mode: AHCI
  • USB3.0 Controller: Enabled

Advanced: CPU Features:
Multi-core: Enabled
HT Technology: Enabled
SpeedStep Technology: Enabled
Vitualization Technology: Enabled
Intel VT-d: Disabled ( Virt. Tech. for Directed I/O )

Legacy USB Support: Enabled
SCSI SubClass Support: Enabled
USB Port: Enabled

Security:
Of all settings in this section, only Set Supervisor Password can be marked/changed. The rest is gray, not selectable/changeble. This was not the case when I got the laptop. I created a supervisor password, that locked up underlying settings. Changed them to following states. And set supervisor password back to the empty state (disableing all security functions, hopefully).

Supervision Password Is: Clear ( no password is set )
User Password: Same as above
Set Supervisor Password: Enter
Set User Password: Enter
Password on Boot: Disabled
Boot from Removable Media: All
Flash Write: Enabled
TPM (Security Chip ) Settings:
Security Chip: Disabled
Current TPM State: Disabled and Deactivated
Change TPM State: No Change

Secure Boot Configurations:
Secure Boot: Disabled
Protected Signatures: Enabled ( User Mode )
Customized Signatures: Disabled ( Standard )
Secure Boot Option: Disabled

First I made a MBR layout (that I am familiar with)
That attempt failed with the error
Failed to install grub to /dev/sda !

The latest is following, GPT layout:

sda1 - 300 mb - Fat32 ( EFI sys partition? ) - /boot/efi
sda2 - 70 gb - NTFS ( W7 sys part )
sda3 - 400 gb - NTFS ( W7 storage part )
sda4 - 2 gb - Ext2 - /boot
sda5 - 25 gb - Ext4 - /
sda6 - 22 gb - Ext4 - /home
sda7 - all the rest gb - Ext4 - /media/Storage

Failed to install grub to /dev/sda !
Ctrl Alt F8:


glibc-locales: configured successfully.
Running grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=void=grub --recheck /dev/sda…
Installing for x86_64-efi platform.
grub-install: error: failed to get canonical path of ‘/boot/efi’.

[EDIT] Oh, btw… I am using the void-installer from the ISO, first logging in as root with voidlinux, then installer.

I have tried and tried and read up on UEFI and GPT and tried again.
I read instructions specific to this setup on Void Wiki. Instructions in Void-Installer.
I have no clue what so ever, where and how to proceed and troubleshoot.
What do I miss?
Is there any thing that I need to setup / configure manually in this situation / combination?
I have used this same USB-2016.04-64-Cinnamon on several 64-bit-bios systems and all have installed with out any pain and like a charm.


Installer fails to install bootloader on /dev/sda
#9

According to that, I think you must use UEFI/GPT layout, but check your BIOS settings:

I think the “Secure Boot” stuff must be enabled for UEFI/GPT… :thinking:


(Alex) #10

Thanks for the reply @cr6 [quote=“Alex, post:8, topic:506”]
First I made a MBR layout (that I am familiar with)
That attempt failed with the error
Failed to install grub to /dev/sda !

The latest is following, GPT layout:
[/quote]
I first tried with MBR (not knowing if GPT is mandatory for UEFI / Void-UEFI).

Then I started from scratch with GPT layout.
The layout I list have more than 4 partitions and none of them are Extended. :wink:
Hence, it is GPT.

BIOS ( /UEFI ) settings:
I have listed some settings, but there are no other settings than those in this post, that say anything about “BIOS / EFI / UEFI”, so imma dunno…

Oh, Secure boot must be enabled? Hmm. But how come then W7 installs Disabled-Secure-Boot in EFI-sys-part and W7-sys-part (C:) with out any pain but Void fails at exact same settings?

Also. If I remember correct, I red on several pages on internet about UEFI and GPT about two things.

  • Make sure CSM is Enabled
  • Make sure Secure Boot is Disabled

#11

MBR is limited to 2,2 To … To get more you need GPT.
GPT is part of UEFI standard I guess.
To use GPT you need a [recent] motherboard with an UEFI firmware (since 2010?).

Secure boot ? No, I apologize, I think it’s not directly related…

I never installed any linux distro with UEFI because my motherboard doesn’t support it, so I’m not exactly the right person to help you with UEFI/GPT stuff, I’m really sorry.

  • Even re-formatting your HDD (erasing Win7),
  • creating an MBR partitionment with one / root partition,
  • installing Void the normal way (not-UEFI),

That simple setup doesn’t work ?? Weird… :frowning2:


(Alex) #12

Yep, that I am aware of.[quote=“cr6, post:11, topic:506”]
To use GPT you need a motherboard with an UEFI firmware.
[/quote]
I am quite (but not totaly) sure that even if GPT is part of UEFI standard, that one can use a GPT-disk on BIOS-system. The difference is in that case one need to create a small partition ( 1 MB ? ) in the beginning of the disk, so that BIOS-system can read and handle the GPT-disk.

Anyhow.
This in not the case. I only started my try-and-fail with MBR.
Currently, the disk is GPT.
So, the disk partition layout is not the problem.


#13

Excuse-me, all of this is a little bit confusing… (don’t get me wrong)
Well, to be clear, which data / patitions are on your HDD actually ? You re-installed Windows7 ?
Or perhaps you re-formatted again your HDD ?


(Alex) #14

@cr6
No need to say sorry, dunt worry :wink:
You trying to help an other human being is already a beautiful thing! :heart:

The latest (current, present) setup / layout is:

GPT
sda1 - 300 mb - Fat32 - /boot/efi
sda2 - 70 gb - NTFS (empty)
sda3 - 400 gb - NTFS (empty)
sda4 - 2 gb - Ext2 - /boot
sda5 - 25 gb - Ext4 - /
sda6 - 22 gb - Ext4 - /home

[EDIT]
I have a feeling that there is no possibility to make “BIOS-install” on this laptop. Only “UEFI-install”. (I could be wrong.)

From Void Wiki - Installation: UEFI
Once booted into the install environment, you can double-check by looking for the /sys/firmware/efi/ directory. If it present, then you are presently running in UEFI mode

Every time I boot the Live USB, that directory is present.


#15

lol… :confounded: stupid me, really ! Sorry, I’m tired… I’m going to :sleeping:

OK so it’s GPT. :+1:


(Alex) #16

Not entirely correct… I can not INSTALL Void.
I still can BOOT Live Void 2016.04 64-bit Cinnamon ISO from USB. :wink:

Iso have no parted, but fdisk is there…
sudo fdisk -l /dev/sda
Disklabel type: gpt

So, yep, disk got correctly partitioned for GPT


#17

Well, I never tried to follow the wiki to install Void in UEFI/GPT mode, but it should not be so difficult I guess…
Wait, someone else more experienced will surely help you soon. :wink: Me I go to sleep.


(Masato the Empty) #18

@Alex
I think it’s been pretty much settled in the discussion, but you definitely have UEFI. I can tell because of the “CSM” support option (which most motherboards recommend you leave enabled.) That’s needed in order to load boot-sector based systems (non-efi OS on an MBR disk).

GPT is required to be supported by a UEFI system as it was designed for UEFI. However, MBR disk support is also required. It doesn’t mean that it will run boot-sector-based code (that’s what the CSM is for) as you’ll still need to put an EFI system partition on the MBR disk.

secureboot: not an area I’m particularly knowledgable about at this time, but I do know that if your Windows installation requires it, then you’ll need to do some extra work to make grub use it, unless you want to go into the bios and turn it on and off every bleeding time you change OSes. If your version of Windows doesn’t need/want it, leave it off.

TPM is useful if you want to do disk encryption, and boot without having to enter your keys (it allows the HDD to boot unattended only when it’s in the system with the TPM. There’s all sorts of info out there for how it workd if you are ever interested).

OK, so to start, since you’re trying to do a dual boot setup, and you mentioned having even tried removing Windows, make sure you’ve got Windows installed first (with space left on the disk for Void). Once that’s out of the way, continue.

It’s up to you whether to install Windows in EFI mode or Legacy mode, but whatever you do with Windows, you’ll need to do with Void running on the same disk. If your laptop has a decent firmware, UEFI is better. If your firmware sucks, then it could well be worse. This will determine the disk layout (Legacy Windows will make you use MBR, EFI Windows will make you use GPT).

I don’t know with certainty, but that makes it sound to me like you might have forgotten to select a mount point for the EFI system partition, even though your layout suggested that you did do so. Before going to the install step in the installer, double-check by arrowing right to the “settings” so you can review what you’ve put in.

If all that looks good, then try again and see what happens. Come back with any details you can, like the error you put in that first post of yours.


(Alex) #19

@masato you feels to me like a perfect teacher. Perfectly pedagogical! =)

About security options… I thought I first learn to install “basic” and eventually “build further into the wild” when I become more adept on the subject.

The Win7Pro does not complain with Secure Boot Disabled, Hence I take it that Win does not require it.

In the void-installer, when I configure mount-point and file systems, the first thing I do is:
sda1 - 300 mb - Fat32 ( EFI sys partition? ) - /boot/efi

Or do you mean that I need to mark that partition in fdisk with some boot-flag? I thought I red some where that GPT does not have such flags like MBR does.

If I understand you correct… I could be unlucky and gotten a laptop with a half-shitty BIOS/UEFI, that works with W7 but not with Void? :sweat:


#20

I was having the same error message on my HP laptop, so I had to disable legacy support and secure boot in order to install Void.


(Alex) #21

Disable legacy support you say? I am no longer sure if I tried that or not, I´ll try disable legacy, disable secure boot. Be back with results shortly.
Thanks @fado ! =)