Grub is not working on boot

Grub is not working on boot.

I had Windows and I added Ubuntu on the side, except that Ubuntu did not install on the correct driver. Grub was working then. Ubuntu did not convince me, so I installed Manjaro, on the right driver this time. Then I tried to remove Ubuntu as recommended on another forum (I formatted the corresponding partitions).

Now two points:

  • On the bios, Ubuntu still appear. It could be great if I could completely remove Ubuntu (the second point is more important).

  • Grub is not working anymore. I tried update-grub and grub-install, but I don’t know how to interpret the output. When I do grub-emu, it goes in the terminal of grub, which I don’t know how to use. I can still boot on Windows and Manjaro using the bios.

Then show fdisk -l .

Hi,

Lot of information here GRUB

Regards

You need to reinstall Grub2.

Here is the output of fdisk -l:

Disk model: ST2000DM008-2UB1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 4AFF8511-0F21-4E70-B87B-8AF05F090F72

Device          Start        End    Sectors   Size Type
/dev/sda1          34      32767      32734    16M Microsoft reserved
/dev/sda2       32768 1953529855 1953497088 931,5G Microsoft basic data
/dev/sda3  1953529856 2930278399  976748544 465,8G Microsoft basic data
/dev/sda4  2930278400 3907028991  976750592 465,8G Linux filesystem

Partition 1 does not start on physical sector boundary.


Disk /dev/nvme0n1: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 980 500GB                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 16384 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: 90C947C5-0B0E-45F3-8C00-045D52C2EBAF

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    206847    204800   100M EFI System
/dev/nvme0n1p2    206848    239615     32768    16M Microsoft reserved
/dev/nvme0n1p3    239616 487066252 486826637 232,1G Microsoft basic data
/dev/nvme0n1p4 487067648 488382463   1314816   642M Windows recovery environment
/dev/nvme0n1p5 488382464 976773134 488390671 232,9G Linux filesystem```


Thank you for your help

Where do you want to install Linux ? /dev/sda or /dev/nvme0n1.

On /dev/nvme0n1, the other one is used for data

Can you post inxi -Fza ?

You need the following partitions:
300 MB FAT32 EFI
1 GB ext4 /boot
x GB swap partition, depends on the RAM size
50 GB ext4 / (root)
rest for /home

Output of inxi -Fza:

  Kernel: 6.1.1-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=72a2931d-2488-4e5b-b86a-106dc692248f rw quiet splash
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.26.4 tk: Qt v: 5.15.7 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: PRO Z690-A DDR4(MS-7D25) v: 1.0
    serial: <superuser required> UEFI: American Megatrends LLC. v: 1.20
    date: 02/24/2022
CPU:
  Info: model: 12th Gen Intel Core i5-12600KF bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x97 (151) stepping: 2
    microcode: 0x26
  Topology: cpus: 1x cores: 10 mt: 6 tpc: 2 st: 4 threads: 16 smt: enabled
    cache: L1: 864 KiB desc: d-4x32 KiB, 6x48 KiB; i-6x32 KiB, 4x64 KiB
    L2: 9.5 MiB desc: 6x1.2 MiB, 1x2 MiB L3: 20 MiB desc: 1x20 MiB
  Speed (MHz): avg: 796 high: 801 min/max: 800/4900:3600 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 745 9: 801 10: 800 11: 801 12: 800 13: 800 14: 800
    15: 800 16: 800 bogomips: 118000
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA106 [GeForce RTX 3060 Lite Hash Rate] driver: nouveau
    v: kernel non-free: 525.xx+ status: current (as of 2022-12) arch: Ampere
    code: GAxxx process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: HDMI-A-1 empty: DP-1,DP-2,DP-3
    bus-ID: 01:00.0 chip-ID: 10de:2504 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.6 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa gpu: nouveau display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 model: Asus VG248 serial: <filter>
    built: 2014 res: 1920x1080 hz: 60 dpi: 92 gamma: 1.2
    size: 531x299mm (20.91x11.77") diag: 609mm (24") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL v: 4.5 Mesa 22.3.1 renderer: llvmpipe (LLVM 14.0.6 256 bits)
    direct render: Yes
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 1-5.2:5
    alternate: snd_sof_pci_intel_tgl chip-ID: 0d8c:0134 bus-ID: 00:1f.3
    class-ID: 0300 chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: NVIDIA GA106 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:228e class-ID: 0403
  Device-3: C-Media BIRD UM1 type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound API: ALSA v: k6.1.1-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.63 running: yes
Network:
  Device-1: MEDIATEK MT7921K Wi-Fi 6E 80MHz driver: mt7921e v: kernel pcie:
    gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 14c3:0608
    class-ID: 0280
  IF: wlp3s0 state: down mac: <filter>
  Device-2: Intel Ethernet I225-V vendor: Micro-Star MSI driver: igc
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 port: N/A bus-ID: 04:00.0
    chip-ID: 8086:15f3 class-ID: 0200
  IF: enp4s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device type: USB driver: btusb v: 0.8
    bus-ID: 1-13.1:7 chip-ID: 0e8d:0608 class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 2.27 TiB used: 162.85 GiB (7.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 2B4QFXO7 temp: 83.8 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2UB102
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: 0001 scheme: GPT
Partition:
  ID-1: / raw-size: 232.88 GiB size: 228.17 GiB (97.98%) used: 12.3 GiB (5.4%)
    fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 33.5 MiB (34.9%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 25.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 314 Uptime: 1h 33m wakeups: 0 Memory: 15.49 GiB
  used: 3.94 GiB (25.5%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman
  pkgs: 1139 libs: 319 tools: pamac pm: flatpak pkgs: 0 Shell: Bash v: 5.1.16
  running-in: konsole inxi: 3.3.24```

Hi @MartyTheo, and welcome!

Please provide thee output of:

fdisk -l /dev/nvme0n1

:bangbang: Tip: :bangbang:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as descrribed above.

Thereby improving legibility and making it much easier for those trying to be of assistance.

Please edit your post accordingly.

For more information, please see:


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Edit:

Please also see:

Output for fdisk -l /dev/nvme0n1:

Disk model: Samsung SSD 980 500GB                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 16384 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: 90C947C5-0B0E-45F3-8C00-045D52C2EBAF

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    206847    204800   100M EFI System
/dev/nvme0n1p2    206848    239615     32768    16M Microsoft reserved
/dev/nvme0n1p3    239616 487066252 486826637 232,1G Microsoft basic data
/dev/nvme0n1p4 487067648 488382463   1314816   642M Windows recovery environment
/dev/nvme0n1p5 488382464 976773134 488390671 232,9G Linux filesystem

Thank you for the tip. I was wondering how to do it properly.

I tried to restore the grub as explained in the link: GRUB/Restore the GRUB Bootloader
It didn’t help.

As an alternative solution, I can reinstall Manjaro. But I want to be sure that the new installation will be working and will not have the same problem.

what exactly do you mean with grub is not working anymore?
and how did you reinstalled the grub?
did you chroot and then reinstalled it with these 2 commands for efi?
and you are also running on open source drivers on nvidia on the 6.1 kernel… any reason for that?

On a completely new and clean installation, it should be fine. And it might be quicker. It all depends on your comfort level. And I say should, because a lot can happen. If you decide to go that route, however, just make sure all your data is backed up.

That said, however, there is nothing like the high of conquering a problem like this.

But, sadly I can’t go on trying to help. My day is coming to an end this side of the world. So possibly someone else would be able to help.

Hope you manage!

When saying “grub is not working”, I mean that it is not launching during boot. Additional grub-emu goes in a terminal instead of the classical grub menu.
I went through the all page GRUB/Restore the GRUB Bootloader, including these two lines.

And there is no good reason for the drivers and 6.1 kernel (I didn’t even notice it). This is almost a new installation, which I didn’t modify so much.

so the grub is not shown?
post output from:
head /etc/default/grub
ls /boot/efi

Yes, it is not shown.

Output of head /etc/default/grub:

GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

Output of ls /boot/efi:
EFI 'System Volume Information'

Thank you for the help.

its not shown because its hidden…
open this:
kate /etc/default/grub
and edit this line to look like this:
GRUB_TIMEOUT_STYLE=menu
save it, update grub:
sudo update-grub
reboot, and it should be shown now

and output from:

sudo ls /boot/efi/EFI

I changed it and reboot, it still didn’t show.

Output of sudo ls /boot/efi/EFI

Boot Manjaro Microsoft ubuntu

you can remove the ubuntu entry:
sudo rm -r /boot/efi/EFI/ubuntu


then add the ibt parameter, since we are going to install nvidia drivers:
kate /etc/default/grub
and in this line: GRUB_CMDLINE_LINUX_DEFAULT inside the quotes add this parameter:
ibt=off
dont remove anything from there!, just add it to existing parameters, save the file, update grub:
sudo update-grub
also check if you changed it from hidden to menu…


install the nvidia drivers:
sudo mhwd -a pci nonfree 0300
any errors post here…


now enable early loading:
kate /etc/mkinitcpio.conf
and edit the modules section to look like this:

MODULES=(nvidia nvidia_drm nvidia_uvm nvidia_modeset)

save it and update it:
sudo mkinitcpio -P

reboot and see if its there