LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-08-2020, 12:15 AM   #31
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by colorpurple21859 View Post
restart and see what happens
k here I go. But I just reinstalled the iso for the usb stick so I might be back sooner even if ubuntu doesn't boot from the hard drive haha

I used this this time:

https://docs.01.org/clearlinux/lates...able-usb-linux

ok here I go
 
Old 02-08-2020, 12:31 AM   #32
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Ok still same results.

Good news is I got the usb key to work. Holy shit it boots in like 2 minutes instead of 20. I'm never burning isos to dvds again. I'm so old fashioned I'm still from the knoppix days. This is awesome.

Ok I should show you the boot order (have I yet?):

http://onehammer.com/IMG_20200208_012416.jpg

Notice there are two ubuntu's- actually it was like that even before I did the reinstall. I can't remember why but when I did the original install last year I did something by accident and made two. But anyway just now I attempted both and got the same results with both.
 
Old 02-08-2020, 12:39 AM   #33
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
run the boot-info script and post the results
 
Old 02-08-2020, 12:44 AM   #34
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
run the boot-info script and post the results
http://paste.ubuntu.com/p/KdHbkNyTB3/
 
Old 02-08-2020, 01:23 AM   #35
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Cool

I don't see anything that stands out other then your missing /boot/grub/x86_64-efi directory.
Might be something wrong with the initramfs in /boot. Follow this tutorial
https://linoxide.com/linux-how-to/fi...d-image-linux/
after mounting your root partition to /mnt mount the efi partition to /mnt/boot/efi before running the mount --bind commands.
before exiting out of the chroot run
Code:
apt install grub-efi
grub-install
 
Old 02-08-2020, 01:44 AM   #36
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
ok I got stuck on this part:

Quote:
Now, the real stuff is here. We are gonna build the initrd kernel image here using the command below:

# mkinitrd /boot/initrd.img-3.11.0.12-generic 3.11.0.12-generic-old
because right above that he tells me to rename it:

mv /boot/initrd.img-3.11.0.12-generic /boot/old-initrd.img-3.11.0.12-generic-old

Maybe a mistake in the tutorial?

Also btw I had two in there:

root@ubuntu:/# ls /boot/*initrd*
/boot/old-initrd.img-5.0.0-23-generic /boot/old-initrd.img-5.3.0-28-generic

so I renamed them both to old.[]

Oh wait it says that's only for centos and fedora; the red line. Even still... it's a mistake. Anyway I moved on using the debian version, but I didn't know which one to use since there's two so I assumed the newer version:

update-initramfs -c -k 5.3.0-28-generic

Last edited by Rotwang2; 02-08-2020 at 01:48 AM.
 
Old 02-08-2020, 01:50 AM   #37
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Ok this is happening when I do your command:

Code:
root@ubuntu:/# apt install grub-efi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  grub-efi-amd64
The following packages will be REMOVED:
  grub-gfxpayload-lists grub-pc
The following NEW packages will be installed:
  grub-efi grub-efi-amd64
0 upgraded, 2 newly installed, 2 to remove and 272 not upgraded.
Need to get 50.4 kB of archives.
After this operation, 414 kB disk space will be freed.
Do you want to continue? [Y/n] 
Err:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-efi-amd64 amd64 2.02-2ubuntu8.14
  Could not resolve 'us.archive.ubuntu.com'
Err:2 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-efi amd64 2.02-2ubuntu8.14
  Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/grub2/grub-efi-amd64_2.02-2ubuntu8.14_amd64.deb  Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/grub2/grub-efi_2.02-2ubuntu8.14_amd64.deb  Could not resolve 'us.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ve and 272 not upgraded.

Last edited by Rotwang2; 02-08-2020 at 02:23 AM.
 
Old 02-08-2020, 02:27 AM   #38
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Anyway I went ahead and did it anyway and it looks like it did some EFI magic anyway:

Code:
root@ubuntu:/# update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-28-generic
Found initrd image: /boot/initrd.img-5.3.0-28-generic
Found linux image: /boot/vmlinuz-5.0.0-23-generic
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Adding boot menu entry for EFI firmware configuration
done
So I'm gonna restart brb
 
Old 02-08-2020, 02:34 AM   #39
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
aaaand I'm back haha. Same results. ug.
 
Old 02-08-2020, 03:07 AM   #40
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Alright well I hope you're asleep! Tomorrow I guess I'll just reinstall and map the efi drive properly this time; that's the next thing to try. Unless you want to keep going tomorrow as an exercise, I'm willing, I'm learning a lot. gnight thanks so much,

rw
 
Old 02-08-2020, 08:58 AM   #41
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
Alright well I hope you're asleep
It was way past my bedtime

run the commands to chroot into your system
add this to the list of "mount --bind" commands before the "chroot /mnt" command
Code:
mount --bind /run /mnt/run
after chroot /mnt

Code:
echo "nameserver 2.2.2.2" >> /etc/resolv.conf
apt install grub-efi
grub-install
exit
The echo commands appends nameserver line to your /etc/resolv.conf

Last edited by colorpurple21859; 02-08-2020 at 09:07 AM.
 
Old 02-08-2020, 09:52 AM   #42
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
It was way past my bedtime

run the commands to chroot into your system
add this to the list of "mount --bind" commands before the "chroot /mnt" command
Code:
mount --bind /run /mnt/run
after chroot /mnt

Code:
echo "nameserver 2.2.2.2" >> /etc/resolv.conf
apt install grub-efi
grub-install
exit
The echo commands appends nameserver line to your /etc/resolv.conf
Oh yea I should've thought of that- the reason apt-get couldn't resolve the package is just because there's no dns. Btw I didn't know that echo could actually change a file; I thought it was just for displaying and changing env variables.

Well, now I get this (which is predictable):

Code:
root@ubuntu:/# grub-install
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
That's predictable because the installer didn't install any efi stuff, right? for example here:

Code:
root@ubuntu:/# ls -al
total 4131268
drwxrwxrwx  24 root root       4096 Feb  7 23:23 .
drwxrwxrwx  24 root root       4096 Feb  7 23:23 ..
drwxr-xr-x   2 root root       4096 Feb  7 17:38 bin
drwxr-xr-x   4 root root       4096 Feb  8 03:01 boot
drwxr-xr-x   2 root root       4096 Feb  7 17:33 cdrom
drwxr-xr-x  21 root root       4440 Feb  8 03:33 dev
drwxr-xr-x 123 root root      12288 Feb  7 17:39 etc
drwxr-xr-x   2 root root       4096 Feb  7 17:27 home
lrwxrwxrwx   1 root root         32 Feb  7 17:35 initrd.img -> boot/initrd.img-5.0.0-23-generic
lrwxrwxrwx   1 root root         32 Feb  7 17:35 initrd.img.old -> boot/initrd.img-5.0.0-23-generic
drwxr-xr-x  21 root root       4096 Feb  7 17:38 lib
drwxr-xr-x   2 root root       4096 Aug  5  2019 lib64
drwx------   2 root root      16384 Feb  7 17:26 lost+found
drwxr-xr-x   2 root root       4096 Aug  5  2019 media
drwxr-xr-x   2 root root       4096 Aug  5  2019 mnt
drwxr-xr-x   2 root root       4096 Aug  5  2019 opt
dr-xr-xr-x 240 root root          0 Feb  8 03:31 proc
drwx------   3 root root       4096 Feb  8 01:21 root
drwxr-xr-x  30 root root        900 Feb  8 03:32 run
drwxr-xr-x   2 root root      12288 Feb  7 17:39 sbin
drwxr-xr-x   2 root root       4096 Jun  5  2019 snap
drwxr-xr-x   2 root root       4096 Aug  5  2019 srv
-rw-------   1 root root 2147483648 Feb  7 17:27 swapfile
dr-xr-xr-x  13 root root          0 Feb  8 03:31 sys
drwxrwxrwt   9 root root       4096 Feb  8 10:46 tmp
-rw-rw-r--   1  999  999 2082816000 Feb  7 23:23 ubuntu-18.04.3-desktop-amd64.iso
drwxr-xr-x  11 root root       4096 Aug  5  2019 usr
drwxr-xr-x  14 root root       4096 Aug  5  2019 var
lrwxrwxrwx   1 root root         29 Feb  7 17:35 vmlinuz -> boot/vmlinuz-5.0.0-23-generic

Last edited by Rotwang2; 02-08-2020 at 09:53 AM.
 
Old 02-08-2020, 11:34 AM   #43
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
did you mount the efi partition /dev/sda1 to /mnt/boot/efi before running the chroot command, or to /boot/efi after entering the chroot.
 
Old 02-08-2020, 11:53 AM   #44
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
oohhhh right- I need to do the "for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done" thing from stackoverflow again first, right? I thought those were mutually exclusive. So I do that procedure first before the initrd tutorial?
 
Old 02-08-2020, 12:15 PM   #45
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Oh ok all I had to do was mount the efi. Ok I just did it (outside of chroot in a different window), but it worked without complaining:

Code:
root@ubuntu:/# apt install grub-efi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
grub-efi is already the newest version (2.02-2ubuntu8.14).
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 272 not upgraded.
root@ubuntu:/# grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.
Should I do the rest of the tutorial over? (It's all already written to disk right), or should I skip to the end-

grub-update
exit

?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I reinstall Grub and Efi (or Uefi) on my external HDD after I accidentally deleted the partition. Choklit Linux - Software 4 12-24-2019 03:42 PM
[SOLVED] Ooooy. EFI boot mmx64.efi.efi not found bulgin Linux - Newbie 12 12-20-2018 11:03 AM
[SOLVED] Can't find /boot/efi/EFI/Slackware/vmlinuz kernel configuration ironQiu Slackware 4 02-09-2015 06:21 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Can I delete and reinstall Ubuntu 8.04 and keep a home partition? win_to_lin_migrant Ubuntu 4 01-18-2009 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration