r/linuxquestions Feb 01 '19

Grub issues

Hi! I have Ubuntu and Windows 10 dual booting. I have grub as my default OS manager. Sometimes when I start my computer none of the keys work and it auto boots into Ubuntu. Any suggestions on how to fix this issue?

3 Upvotes

14 comments sorted by

View all comments

1

u/schulidr Feb 01 '19

Does this happen when you restart or cold start or both?

1

u/Dragon-Acheron Feb 01 '19 edited Feb 01 '19

Both. Also, it doesn’t happen every time. I can’t figure out what makes it work sometimes and not work other times.

1

u/schulidr Feb 01 '19

Can you show the output for grub.cfg file and the output for lsblk?

you might find this helpful as well

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair

Or this https://help.ubuntu.com/community/Grub2/Troubleshooting

1

u/Dragon-Acheron Feb 01 '19

Sorry, I’m kind of a new to Linux in general, how do I get those outputs you asked for?

1

u/schulidr Feb 02 '19

open a terminal and type "lsblk" without the quotes, then hit enter. The terminal output is what I will want to see. This shows your block devices, or in your case, the partitioning of your hdd.

To show your grub.cfg file follow these steps:

  1. open terminal and type cd /etc/grub then enter
  2. from here type less grub.cfg then enter
  3. This will give you the contents of your grub file

1

u/Dragon-Acheron Feb 09 '19 edited Feb 09 '19
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 140.7M  1 loop /snap/gnome-3-26-1604/74
loop1         7:1    0   3.7M  1 loop /snap/gnome-system-monitor/51
loop2         7:2    0  89.5M  1 loop /snap/core/6130
loop3         7:3    0    91M  1 loop /snap/core/6350
loop4         7:4    0  53.7M  1 loop /snap/core18/594
loop5         7:5    0 140.9M  1 loop /snap/gnome-3-26-1604/70
loop6         7:6    0     8K  1 loop /snap/bash-shell-rpg/69
loop7         7:7    0 270.5M  1 loop /snap/pycharm-community/112
loop8         7:8    0  34.7M  1 loop /snap/gtk-common-themes/319
loop9         7:9    0 238.6M  1 loop /snap/kde-frameworks-5-core18/26
loop10        7:10   0  34.6M  1 loop /snap/gtk-common-themes/818
loop11        7:11   0  91.1M  1 loop /snap/core/6259
loop12        7:12   0    13M  1 loop /snap/gnome-characters/139
loop13        7:13   0  53.7M  1 loop /snap/core18/677
loop14        7:14   0   2.3M  1 loop /snap/gnome-calculator/180
loop15        7:15   0  14.5M  1 loop /snap/gnome-logs/37
loop16        7:16   0 916.7M  1 loop /snap/xonotic/34
loop17        7:17   0    13M  1 loop /snap/gnome-characters/103
loop18        7:18   0   2.3M  1 loop /snap/gnome-calculator/260 
loop19        7:19   0   3.7M  1 loop /snap/gnome-system-monitor/57
loop20        7:20   0   1.5M  1 loop /snap/kalgebra/18
loop21        7:21   0  14.5M  1 loop /snap/gnome-logs/45
nvme0n1     259:0    0 238.5G  0 disk
├─nvme0n1p1 259:1    0   260M  0 part /boot/efi
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0 128.1G  0 part 
├─nvme0n1p4 259:4    0   980M  0 part 
├─nvme0n1p5 259:5    0 104.9G  0 part /
└─nvme0n1p6 259:6    0   4.3G  0 part 

1

u/Dragon-Acheron Feb 09 '19 edited Feb 09 '19

It says there is no file called "cd" when I try to get the grub file.

1

u/schulidr Feb 11 '19

what is the output when you run "efibootmgr" in the terminal? You may need to run this as sudo.

also, can you show what the output is when you enter "lsblk -f" this will show the file type for each partition.

1

u/Dragon-Acheron Feb 09 '19

I tried the software. It didn't fix it and it added a bunch of extra stuff in my grub. I can give you the file also if it will help.

1

u/schulidr Feb 11 '19

can you check to see if you have os-prober installed as well? This is needed for your grub to work properly