You are not logged in.

#21 2017-08-26 23:33:40

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Still though. It didn't work. Now that I'm at the installer, I can give the actual error message:

GRUB Installation Failed
The `grub-efi-amd64 package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.

Last edited by DoctorOW (2017-08-26 23:34:00)

Offline

#22 2017-08-26 23:40:47

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

OK, try this from the live system:

sudo -i
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
for i in proc sys dev dev/pts; do mount --bind /$i /mnt/$i; done &
chroot /mnt /bin/bash
apt update && apt install grub-efi
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot

If there are any error messages, stop at that step and post them here.

Offline

#23 2017-08-26 23:50:21

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Head_on_a_Stick wrote:
apt update && apt install grub-efi

Error is here:

Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie InRelease
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie Release.gpg
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie Release
Err http://pkg.bunsenlabs.org bunsen-hydrogen InRelease
  
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/contrib amd64 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/main amd64 Packages/DiffIndex
Err http://pkg.bunsenlabs.org bunsen-hydrogen Release.gpg
  Could not resolve 'pkg.bunsenlabs.org'
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/non-free amd64 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/contrib Translation-en_US
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/contrib Translation-en
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/main Translation-en_US
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/main Translation-en
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/non-free Translation-en_US
Ign cdrom://[Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52] jessie/non-free Translation-en
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://pkg.bunsenlabs.org/debian/dists/bunsen-hydrogen/InRelease  

W: Failed to fetch http://pkg.bunsenlabs.org/debian/dists/bunsen-hydrogen/Release.gpg  Could not resolve 'pkg.bunsenlabs.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package grub-efi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  grub-common grub2-common

E: Package 'grub-efi' has no installation candidate

Offline

#24 2017-08-26 23:54:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

^ Use `sudo apt edit-sources` and populate the file thusly:

Then save the file and try the command again.

EDIT: no, ignore that, sorry.

Last edited by Head_on_a_Stick (2017-08-26 23:57:15)

Offline

#25 2017-08-26 23:56:25

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Stuck on:

Media change: please insert the disc labeled
 'Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52'
in the drive '/media/cdrom/' and press enter

Offline

#26 2017-08-27 00:01:11

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

DoctorOW wrote:
Media change: please insert the disc labeled
 'Debian GNU/Linux 8.7 _Bunsen-hydrogen_ - Snapshot amd64 LIVE/INSTALL Binary 20170429-16:52'
in the drive '/media/cdrom/' and press enter

Yes, OK, run the `sudo apt edit-sources` command and remove the line(s) pertaining to /media/cdrom

The actual one you want is https://packages.debian.org/jessie/grub-efi-amd64 but the grub-efi transitional package should pull that in (once APT's database is updated).

Offline

#27 2017-08-27 00:03:44

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

It did not:

Do you want to continue? [Y/n] Y
Err http://deb.debian.org/debian/ jessie/main grub2-common amd64 2.02~beta2-22+deb8u1
  Could not resolve 'deb.debian.org'
Err http://deb.debian.org/debian/ jessie/main grub-efi-amd64-bin amd64 2.02~beta2-22+deb8u1
  Could not resolve 'deb.debian.org'
Err http://deb.debian.org/debian/ jessie/main grub-efi-amd64 amd64 2.02~beta2-22+deb8u1
  Could not resolve 'deb.debian.org'
Err http://deb.debian.org/debian/ jessie/main grub-efi amd64 2.02~beta2-22+deb8u1
  Could not resolve 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/grub2/grub2-common_2.02~beta2-22+deb8u1_amd64.deb  Could not resolve 'deb.debian.org'

E: Failed to fetch http://deb.debian.org/debian/pool/main/g/grub2/grub-efi-amd64-bin_2.02~beta2-22+deb8u1_amd64.deb  Could not resolve 'deb.debian.org'

E: Failed to fetch http://deb.debian.org/debian/pool/main/g/grub2/grub-efi-amd64_2.02~beta2-22+deb8u1_amd64.deb  Could not resolve 'deb.debian.org'

E: Failed to fetch http://deb.debian.org/debian/pool/main/g/grub2/grub-efi_2.02~beta2-22+deb8u1_amd64.deb  Could not resolve 'deb.debian.org'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Offline

#28 2017-08-27 00:05:56

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

Do we need to copy resolv.conf into the chroot? I never usually bother...

ping -c 3 8.8.8.8
ping -c 3 google.com
ip a
ip r

EDIT: you did remember to connect to the internet in the live session, right?

Last edited by Head_on_a_Stick (2017-08-27 00:08:02)

Offline

#29 2017-08-27 00:08:37

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Big DUMP:

root@debian:/# ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2000ms

root@debian:/# ping -c 3 google.com
ping: unknown host google.com
root@debian:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 38:b1:db:02:4c:cc brd ff:ff:ff:ff:ff:ff
    inet 10.225.46.227/17 brd 10.225.127.255 scope global dynamic wlan0
       valid_lft 603544sec preferred_lft 603544sec
    inet6 fe80::3ab1:dbff:fe02:4ccc/64 scope link 
       valid_lft forever preferred_lft forever
root@debian:/# ip r
default via 10.225.0.1 dev wlan0  proto static  metric 1024 
10.0.4.7 via 10.225.0.1 dev wlan0  proto dhcp  metric 10 
10.225.0.0/17 dev wlan0  proto kernel  scope link  src 10.225.46.227 

The weird thing is that I'm writing this reply from the live install so I know internet works.

Offline

#30 2017-08-27 00:13:03

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

Is your router at 10.225.0.1?

I've just chrooted into my BL system (from Arch) using the same method and the networking is fine  hmm

Offline

#31 2017-08-27 00:17:07

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Well as I mentioned I'm on University Wifi so I have no idea where the router is at or how it's configured. Is there some way I can look?

Offline

#32 2017-08-27 00:21:02

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

DoctorOW wrote:

I'm on University Wifi

That could be the problem.

DoctorOW wrote:

Is there some way I can look?

Enter 10.225.0.1 (or 10.0.4.7) into the URL bar in your browser, most routers have a webpage portal.

Offline

#33 2017-08-27 00:25:17

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Head_on_a_Stick wrote:
DoctorOW wrote:

I'm on University Wifi

That could be the problem.

Does apt-get run on any non-standard ports? I notice torrenting doesn't work here (Sorry about the bandwidth hit) and I assume they have a firewall for that kind of thing.

Head_on_a_Stick wrote:
DoctorOW wrote:

Is there some way I can look?

Enter 10.225.0.1 (or 10.0.4.7) into the URL bar in your browser, most routers have a webpage portal.

Unable to connect to 10.225.0.1 but 10.0.4.7 times out on "Connecting..." if that helps.

Offline

#34 2017-08-27 00:42:19

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

DoctorOW wrote:

Does apt-get run on any non-standard ports?

I don't think so, no.

We could try something a little left-wing field if you want...

First, use the live session to download the Arch systemd package from this link:

https://www.archlinux.org/packages/core … /download/

Then unpack the tarball:

tar xf ~/Downloads/systemd-*.pkg.tar.xz

Now mount your EFI system partition:

sudo mount /dev/sda1 /mnt

And copy over the systemd-boot .efi loader to the ESP using the "removable" .efi loader location:

sudo mkdir -p /mnt/EFI/BOOT
cp ~/Downloads/usr/lib/systemd/boot/efi/systemd-bootx64.efi /mnt/EFI/BOOT/BOOTX64.EFI

You need to create the systemd-boot configuration file:

sudo mkdir -p /mnt/loader/entries
sudo tee /mnt/loader/entries/bunsen.conf <<!
title BunsenLabs
linux /vmlinuz
initrd /initrd.img
options root=/dev/sda2 ro
!

Finally, create a kernel post-install script to copy new kernel images to the ESP after updates:

sudo tee /etc/kernel/postinst.d/zz-update-esp <<!
#!/bin/sh
mount /dev/sda1 /mnt && echo 'Mounted ESP'
cp /vmlinuz /initrd.img /mnt && echo 'Copied kernel & initrd'
umount -R /mnt && echo 'Done!'
!

Make the script executable and run it manually for the first time to get the kernel & intrd copied over:

sudo chmod +x /etc/kernel/postinst.d/zz-update-esp
/etc/kernel/postinst.d/zz-update-esp

A reboot should bring you into the new system but if not we may have to add an NVRAM entry manually to correct any shortcomings in the UEFI implementation.

EDIT: s/wing/field/, must have been a Freudian slip...  ]:D

Last edited by Head_on_a_Stick (2017-08-27 00:50:20)

Offline

#35 2017-08-27 01:01:16

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Well that worked but I seem to be stuck at the username/password screen. Maybe my user didn't get added?

Offline

#36 2017-08-27 01:10:35

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

DoctorOW wrote:

I seem to be stuck at the username/password screen

Hmmm  hmm

Does the live session show anything under /home for the installed system?

That will show the username and this shows you how to change the password (replace "root" with your username).

To create a new user, run this command as root:

adduser

Offline

#37 2017-08-27 01:16:35

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 1,146

Re: [SOLVED] GRUB2 fails to install

If i had a £ for every unetbootin thread HoaS had posted in.. and he had a £ for every Rufus one.. I'd be twice as rich as him (minimum), Rufus does at least allow people to pick working options (mostly... if they actually READ the help).. though frankly if you're using Windows where Rufus is generally used, frankly dd for Windows  is more reliable than either.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#38 2017-08-27 01:17:33

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Can't get into root either!

Offline

#39 2017-08-27 01:23:48

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] GRUB2 fails to install

Bearded_Blunder wrote:

frankly dd for Windows  is more reliable than either

Yes, I already linked to that earlier in the thread  smile

And yes, Rufus should work if "DD" [sic] mode is selected but I have grown rather bored of posting that particular gem  roll

DoctorOW wrote:

Can't get into root either!

BunsenLabs locks the root account, you will have to use B_B's favorite init=/bin/bash trick, here is the link again:

https://wiki.archlinux.org/index.php/re … nvoke_bash

EDIT: Ha! You're not using GRUB...  lol

For systemd-boot, press "e" with the menu entry highlighted and add init=/bin/bash to the options line immediately after ro, separated with a space; then press return to boot the modified entry.

Last edited by Head_on_a_Stick (2017-08-27 01:28:30)

Offline

#40 2017-08-27 01:32:45

DoctorOW
Member
Registered: 2017-04-13
Posts: 20

Re: [SOLVED] GRUB2 fails to install

Am I booted into the install or the livedisk for this?

Offline

Board footer

Powered by FluxBB