Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Grub Fails to Install

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#31 Post by p.H »

pinkbeat wrote:Okay, so I got out of there and finished the install without the boot loader.
I went into TTY4 before finishing the install. This is what it said:
Ok, the problem is clearly visible this time : "no space left on device" when trying to register the EFI boot variable for GRUB. The "device" is the embedded non-volatile memory (NVRAM) used to store EFI variables (not part of a mass storage device).
I know about one solution and two workarounds if the solution does not work.

Solution : delete log files in /sys/fs/pstore. The EFI variable backend for pstore has to be mounted, not sure that the installer mounts it.

Workaround 1 : boot with the kernel parameter "efi_no_storage_paranoia" to allow use of more than 50% of the available space. At your own risk :
Using this parameter you can use more than 50% of your efi variable storage. Use this parameter only if you are really sure that your UEFI does sane gc and fulfills the spec otherwise your board may brick.
Workaround 2 : install GRUB in the "removable device path" of the EFI partition, which does not require creating an EFI boot variable.
pinkbeat wrote:This is the screen it came to after installation reboot.
EFI shell. Interesting. Could be useful for workaround 2. The EFI shell syntax is close to DOS/Windows command.com/cmd.exe syntax. So you can browse the filesystem with dir and cd. You could try this first :

Code: Select all

dir fs0:\
dir fs0:\EFI

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#32 Post by pinkbeat »

Sorry, I kept refreshing page two to check for responses. lol. Didn't realize it already started a third page.
Anyway, I guess I can go back to reinstalling everything on the micro sd card again and give you the screen shots when that fails and go from there. Okay?

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#33 Post by pinkbeat »

@p.H.
I've done the reinstall of the whole system to the 64GB Micro SD Card.

Grub Installation Fail Messages:
https://www.flickr.com/photos/190020956 ... 602063847/

https://www.flickr.com/photos/190020956 ... 602063847/

TTY4 Info:
https://www.flickr.com/photos/190020956 ... 602063847/

Message/Instructions for booting after Install:
https://www.flickr.com/photos/190020956 ... 602063847/

After Install and rebooting EFI Shell Screen:
https://www.flickr.com/photos/190020956 ... 602063847/

So, now tell me where to go and what to type in to fix this, if you would please. Thanks. Basically when I turn on the tablet it goes to the EFI Shell screen. Thanks again for helping me.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#34 Post by p.H »

Too bad you removed the previous picture showing the EFI shell (for comparison).
The EFI shell does not list fs0: any more. Maybe the firmware cannot boot from the SD card.
Also the "\" character looks weird, it is shorter than usual.

Can you boot a live system or the Debian installer in rescue mode ? In rescue mode, you can launch a shell in the installed system root.

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#35 Post by pinkbeat »

p.H wrote:Too bad you removed the previous picture showing the EFI shell (for comparison).
The EFI shell does not list fs0: any more. Maybe the firmware cannot boot from the SD card.
Also the "\" character looks weird, it is shorter than usual.

Can you boot a live system or the Debian installer in rescue mode ? In rescue mode, you can launch a shell in the installed system root.
I think this is the previous picture I deleted. Let me know if it's not.
https://www.flickr.com/photos/190020956 ... 602063847/

I can boot a live Debian installer in rescue mode. But I don't know how to do what you said about launching a shell in the installed system root though. Could you tell me. Sorry, just very new to this. Know Windows very well and fix and build my own pc's but this is a new venture for me. I need baby instructions. Ha.

I noticed that too as far as the \. I don't know what that short backslash is about.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Grub Fails to Install

#36 Post by Head_on_a_Stick »

You might be able to clear some space for new NVRAM variables by running these commands from any live ISO image booted in UEFI mode:

Code: Select all

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
# rm /sys/firmware/efi/efivars/dump-*
Some people have also reported that a firmware ("BIOS") update can fix this problem. Is that possible with your device? Updating the firmware is risky but not as risky as the efi_no_storage_paranoia kernel parameter suggested earlier in the thread.
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#37 Post by p.H »

pinkbeat wrote:I think this is the previous picture I deleted. Let me know if it's not.
It's not. The picture showed the EFI shell with fs0.
p.H wrote:I can boot a live Debian installer in rescue mode.
Live Debian or Debian installer ?
With the Debian installer in rescue mode, just follow the steps until it offers to select the root filesystem. Select it and choose to run a shell in it.

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#38 Post by pinkbeat »

[quote="Head_on_a_Stick"]You might be able to clear some space for new NVRAM variables by running these commands from any live ISO image booted in UEFI mode:}

Your gonna have to tell me step by step how to get to that. Don't know how to boot in to UEFI mode. I know how to install and how to click on rescue mode and how to get to TTY4, 3 from instructions here and how to get out of those screens now. That's about it.

Don't think I'll find a bios update but I'll look and see if I can.
Thanks...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#39 Post by p.H »

If you get a GRUB screen when you boot the Debian installer, then it is EFI mode.
Anytime after the "loading additional components" step, you can switch to a shell in tty2 or tty3 and type the two commands given by Head_on_a_Stick.

If you launched the rescue mode, you can proceed to the "enter rescue mode" screen. Select the root device of your installed system. If you don't know which one is the root partition, you can try them all in order or only those of type ext4 listed by the following command in a shell :

Code: Select all

blkid -t TYPE=ext4
The next screen should ask whether to mount a /boot/efi partition. Answer yes. Then select "execute a shell in /dev/(root partition)".
In the installed system shell, you can run this command to install GRUB in a way which does not require to write in the EFI variables :

Code: Select all

grub-install --no-nvram --force-extra-removable
You said that you installed the EFI partition on the SD card, but is the tablet able to boot from the SD card ?

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#40 Post by pinkbeat »

[You said that you installed the EFI partition on the SD card, but is the tablet able to boot from the SD card ?[/quote]

I don't know if it will boot from the sd card, probably not. I'll reinstall everything on to the sd card except the efi partition I'll put on the tablet's internal storage this time. Currently when it boots, it boots to that yellow writing shell screen. I'll try these steps once that is done. I'll be back late tonight or tomorrow.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#41 Post by p.H »

If the tablet cannot boot from the SD card it may not be able to access it either at boot time, so you must also put the root or /boot partition on the internal storage.

If you do a new installation, select advanced > expert install in the boot screen. It will ask extra questions, just leave the default if you do not know what to answer, except for one : when installing GRUB, it will offer to install the boot loader in the removable device path. Say yes. This will give an extra chance to make the system boot even if the boot variable creation fails.

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#42 Post by pinkbeat »

p.H wrote:If the tablet cannot boot from the SD card it may not be able to access it either at boot time, so you must also put the root or /boot partition on the internal storage.

If you do a new installation, select advanced > expert install in the boot screen. It will ask extra questions, just leave the default if you do not know what to answer, except for one : when installing GRUB, it will offer to install the boot loader in the removable device path. Say yes. This will give an extra chance to make the system boot even if the boot variable creation fails.
Okay, but, will the 16GB internal drive be enough storage for the /root? It's actual 15.1 GB or around that. I could put the /swap, /usr and /home on the sd cart but, I thought the/root needed at least 20GB storage. What say you?

I did go into each partition to check before writing and I noticed EFI was on do not use. Maybe that was what was happening. We will see. I had already started the reinstall b4 your post. Swap and EFI are on the internal and the root and home are on the sd card currently. I'll see what happens when it's done a couple hours from now.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#43 Post by p.H »

pinkbeat wrote:will the 16GB internal drive be enough storage for the /root?
It depends on your needs. I have whole Debian installations which fit in 15 GB (but with the LXDE light desktop environment, and I am not sure it supports touchscreens well). If it is not enough, as I wrote you can put a separate /boot partition (250 to 500 MB) on the internal storage and the root partition on the SD card. Alternatively, you may put the root partition on the internal storage and /usr on the SD card, but that is about the same as a separate /boot and just more complicated. Of course you may put /home and /var on the SD card in any case.
pinkbeat wrote:I noticed EFI was on do not use
[Edit] Weird, in my experience manual partitioning marks all EFI partitions as used by default and will complain if no EFI partition is present or marked as used.
pinkbeat wrote:'ll see what happens when it's done a couple hours from now.
Hours ?
IMO, you should just do a basic installation without a desktop environment and check if it boots. Then you can run tasksel to install a desktop environment. If you do a full installation and it fails to boot again, you'll have lost a lot of time for nothing.

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#44 Post by pinkbeat »

p.H wrote:
pinkbeat wrote:will the 16GB internal drive be enough storage for the /root?
It depends on your needs. I have whole Debian installations which fit in 15 GB (but with the LXDE light desktop environment, and I am not sure it supports touchscreens well). If it is not enough, as I wrote you can put a separate /boot partition (250 to 500 MB) on the internal storage and the root partition on the SD card. Alternatively, you may put the root partition on the internal storage and /usr on the SD card, but that is about the same as a separate /boot and just more complicated. Of course you may put /home and /var on the SD card in any case.

These are the partitions I made on this install. I don't have one named /boot though. Wasn't away I needed to do that. Unless you are talking about the EFI partition.

https://www.flickr.com/photos/190020956 ... 602063847/

https://www.flickr.com/photos/190020956 ... 602063847/

pinkbeat wrote:'ll see what happens when it's done a couple hours from now.
Hours ?
IMO, you should just do a basic installation without a desktop environment and check if it boots. Then you can run tasksel to install a desktop environment. If you do a full installation and it fails to boot again, you'll have lost a lot of time for nothing.
I didn't know that. I'm so lost with Linux. lol. I'll try that if you suggest a different partitioning scheme than what I have going now. What is tasksel? Yeah, I was installing GNOME as well as the Debian Desktop environment.

Here are the TTY4 and TTY3 screenshots after the Grub-install dummy fail screen.
https://www.flickr.com/photos/190020956 ... 602063847/

https://www.flickr.com/photos/190020956 ... 602063847/

Also, this is what I got when I tried the mount command that was given on here to try.
https://www.flickr.com/photos/190020956 ... 602063847/

So, If you think I need to redo my partitions in a particular way let me know and I will redo it with the basic boot suggestion you stated earlier. Just tell me exactly what and where.
Thanks!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#45 Post by p.H »

Please do not write your replies inside the quoted parts, it is confusing.

If you want to take no chances, I suggest the following actions :
- select expert install
- put the EFI partition on the internal storage
- create a /boot partition on the internal storage
- do not select any tasks
- install GRUB in the removable device path (fallback bootloader)
- if boot succeeds, run tasksel to install the desired tasks

A /boot partition is not to be confused with the EFI partition. It is mounted on /boot. The EFI partition is mounted on /boot/efi.
pinkbeat wrote:What is tasksel?
Tasksel is a tool which allows to install "tasks" such as dekstop environments, web server, print server...
It does the same as the "select tasks" step during installation but can be run at any time.
pinkbeat wrote:Also, this is what I got when I tried the mount command that was given on here to try.
Maybe efivarfs was already mounted. You can check with mount without argument or by listing the contents of /sys/firmware/efi/efivars with ls.

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#46 Post by pinkbeat »

@ p.H. Thanks, I'll give it a try. Sorry, I didn't realize I was typing within the qoute. Honest mistake. Thanks for telling me. Don't want to be confusing. I'll report back by tomorrow sometime. Thanks again p.H.

Bulkley
Posts: 6387
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Grub Fails to Install

#47 Post by Bulkley »

Head_on_a_Stick wrote:I don't have permission to view that image and I refuse to sign up to "Flickr" (whatever the **** that is).
I have to agree. I tried the Flikr link and got "404".

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#48 Post by p.H »

Bulkley wrote:I tried the Flikr link and got "404"
Not the same issue. The OP removed old pictures.

pinkbeat
Posts: 32
Joined: 2021-03-05 08:15

Re: Grub Fails to Install

#49 Post by pinkbeat »

p.H wrote:
- install GRUB in the removable device path (fallback bootloader)


A bit confused as what to do at this step. What do I partition that section as so there is space for it? Can't make two /boot partitions. Also the /boot partition I made on the internal drive says that the bootable flag is off. Is that okay?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub Fails to Install

#50 Post by p.H »

You must not make two /boot partition (obviously impossible) but one EFI partition (use as: EFI boot) and one /boot partition (use as: ext4 and mount on: /boot) both on the internal storage.

The removable device path has nothing to do with the separate /boot partition. It is an option that is offered in expert mode during the installation of GRUB. It requires no extra space in the EFI partition if its size is at least 10 MB.

The /boot partition must not have the boot flag. With GPT, the boot flag is equal to the EFI system partition type.

Post Reply