Unable to boot

Hi,
I am using dual boot system with manjaro and I accidentally deleted my esp partition. So i followed this guide to restore grub(UEFI)

https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader

my output for

sudo update-grub



Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
 Found linux image: /boot/vmlinuz-3.16-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-3.16-x86_64.img
Found initrd fallback image: /boot/initramfs-3.16-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

fdisk -l

Disk /dev/loop0: 76.8 MiB, 80494592 bytes, 157216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 266.7 MiB, 279646208 bytes, 546184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 783.4 MiB, 821473280 bytes, 1604440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 464.8 MiB, 487325696 bytes, 951808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS721010A9
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: 08BB303D-5E43-43E6-8E1B-BA5A57456AA9

Device          Start        End   Sectors   Size Type
/dev/sda1        2048     534527    532480   260M EFI System
/dev/sda2      534528     567295     32768    16M Microsoft reserved
/dev/sda3      567296  419997695 419430400   200G Microsoft basic data
/dev/sda4   419997696  839428095 419430400   200G Microsoft basic data
/dev/sda5  1919821824 1921828863   2007040   980M Windows recovery environment
/dev/sda6  1921828864 1953511423  31682560  15.1G EFI System
/dev/sda7   839428096  840476671   1048576   512M EFI System
/dev/sda8   840476672  848865279   8388608     4G Linux swap
/dev/sda9   848865280  995665919 146800640    70G Linux filesystem
/dev/sda10  995665920 1919821823 924155904 440.7G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sdb: 14.9 GiB, 15938355200 bytes, 31129600 sectors
Disk model: USB DISK        
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *         64 3379639 3379576  1.6G  0 Empty
/dev/sdb2       3379640 3387831    8192    4M ef EFI (FAT-12/16/32)

even after this, on booting im just getting the HP logo.
Please help. I can post the output for any other command if you want.
Thank you

The output looks good. Can you please mount your EFI partition somewhere else (say in /mnt of a live system) and check if it is non-empty?

contents of efi partition-

EFI           
initramfs-4.19-x86_64.img  linux419-x86_64.kver
initramfs-4.19-x86_64-fallback.img 
intel-ucode.img            
vmlinuz-4.19-x86_64

i mount this drive at /boot/efi

Just to be 100% sure: Are the contents visible as well, if you mount the partition somewhere else, like in /mnt?

you have 2 EFI system

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS721010A9
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
/dev/sda6  1921828864 1953511423  31682560  15.1G EFI System
/dev/sda7   839428096  840476671   1048576   512M EFI System

you have to apply restore Grub from EFI , by chroot with USB install
open a terminal

manjaro-chroot -a 
fdisk -l
cat /etc/fstab ( check /boot/efi UUID )
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
exit ( quit chroot )
1 Like

Yes. They are visible

1 Like

Right, I missed that! @ivedantlodha: Why are there 2 EFI systems on your hard drive?

Does this help? I think it’s Windows recovery image
Actually there are 3 EFI filesystems.

I have already tried to restore

Boot into your installed manjaro OS by using this Simple First start Method here.
Make sure you start liveusb in uefi mode.
There are some information not available here, so I need these before you can fix the problem.
When booted up, provide the following for the installed Manjaro OS terminal.
Then after receiving the info, we can work out the steps to get it back working. You will need to boot again using the same procedure.

sudo parted -l
sudo blkid
efibootmgr -v
findmnt -s
findmnt /
findmnt /boot
findmnt /boot/efi

A few more questions. Your contents of a /boot/efi in your earlier post contains vmlinuz-4.19 and initramfs-4.19. That isn’t /boot/efi. That’s /boot.
Do you have a separate /boot? (Why?) Tell us where this is. The simple first start worn’t boot into manjaro if that is so. Check the rest of the link to boot up (hope you understand how). But there are indications (from your os-prober) that these kernels/initrd files are actually in /root, your OS partition itself. Can you verify this? We need this to be cleared up, Hopefully you can clear this up for us. [But maybe your trying to ‘restore grub’ (by chroot) made the confusion]

Also you said, in first post, you deleted esp partition. Did you recreate it back or tell us what partition you now want to use instead.

Reminder: there is no need to chroot.

1 Like

Here are the outputs

sudo parted -l

Model: ATA HGST HTS721010A9 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  274MB   273MB   fat32                                         boot, esp
 2      274MB   290MB   16.8MB                  Microsoft reserved partition  msftres
 3      290MB   215GB   215GB   ntfs            Basic data partition          msftdata
 4      215GB   430GB   215GB   ntfs            Basic data partition          msftdata
 7      430GB   430GB   537MB   fat32                                         boot, esp
 8      430GB   435GB   4295MB  linux-swap(v1)
 9      435GB   510GB   75.2GB  ext4                                          legacy_boot
10      510GB   983GB   473GB   ext4
 5      983GB   984GB   1028MB  ntfs            Basic data partition          hidden, diag
 6      984GB   1000GB  16.2GB  ntfs            Basic data partition          boot, hidden, esp


Model: SMI USB DISK (scsi)
Disk /dev/sdb: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      1730MB  1735MB  4194kB  primary               esp

sudo blkid

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: UUID="1A92-14E5" TYPE="vfat" PARTUUID="d31e4f34-a99d-0f45-88c1-e17949570a94"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="dd52b2a1-73f3-4003-a26a-ebadac0f2bed"
/dev/sda3: LABEL="Windows" UUID="01D49876BAE35310" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a39edc4b-1809-4cd9-a852-34a21b7fdc10"
/dev/sda4: UUID="01D49876BB89F350" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0000c7a7-27c0-bb1d-76b8-dc194e8f0100"
/dev/sda5: LABEL="Windows RE tools" UUID="405AED915AED83CE" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="e843d12a-fc16-4c4b-8618-173234f6f80f"
/dev/sda6: LABEL="RECOVERY" UUID="3CC22928C228E7BA" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="3cc3e021-2e1a-43d2-a477-55272e3c6b50"
/dev/sda7: UUID="0061-EE47" TYPE="vfat" PARTUUID="39717fdf-0d90-49d4-9c9c-e4bd608660df"
/dev/sda8: UUID="6b4e4449-c0a6-44d0-8188-f5df22ea6c83" TYPE="swap" PARTUUID="5d2224cb-fd8f-4f7c-9163-566d665a6820"
/dev/sda9: UUID="a747ca4d-5e5b-474c-a8a5-2fde38ab19a3" TYPE="ext4" PARTUUID="b446977f-1c3c-48b5-9b27-4df9ddc41639"
/dev/sda10: UUID="72cae617-c713-45ec-9342-ae5a58a9a5ef" TYPE="ext4" PARTUUID="567f0505-5fea-4d5a-9666-5e7ad728af6c"
/dev/sdb1: UUID="2018-11-24-14-22-05-00" LABEL="MJRO180" TYPE="iso9660"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="A28E-A0A1" TYPE="vfat"

efibootmgr -v

Timeout: 0 seconds
BootOrder: 0006,3006,0005,0003,2001,0000,2002,2004,0001
Boot0000* USB Hard Drive - SMI     USB DISK	BBS(7,USB Hard Drive - SMI     USB DISK,0x500)..................F.......D...H...................................2.j.......A.....................
Boot0001* Notebook Hard Drive - HGST HTS721010A9E630	BBS(HD,Notebook Hard Drive - HGST HTS721010A9E630,0x500)................-...........A......R..............................:Hk.......A.........................
Boot0002* USB Hard Drive (UEFI) - SMI     USB DISK (SMI     USB DISK)	PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(1,MBR,0x0,0x3391b8,0x2000)RC
Boot0003* EFI Hard Drive (HGST HTS721010A9E630)	PciRoot(0x0)/Pci(0x17,0x0)/Sata(5,0,0)/HD(1,GPT,d31e4f34-a99d-0f45-88c1-e17949570a94,0x800,0x82000)RC
Boot0004* Internal EFI Shell	MemoryMapped(11,0x62a04000,0x63834fff)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)RCA;?j
Boot0005* Windows Boot Manager	HD(7,GPT,39717fdf-0d90-49d4-9c9c-e4bd608660df,0x3208a800,0x100000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0006* manjaro	HD(1,GPT,d31e4f34-a99d-0f45-88c1-e17949570a94,0x800,0x82000)/File(\EFI\manjaro\grubx64.efi)
Boot0007* Internal EFI Shell	MemoryMapped(11,0x62a04000,0x63834fff)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)RCA;?j
Boot0008* Internal EFI Shell	MemoryMapped(11,0x62a04000,0x63834fff)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)RCA;?j
Boot2001* EFI USB Device	RC
Boot3006* Internal Hard Disk or Solid State Disk	RC

findmnt -s

TARGET    SOURCE                                    FSTYPE OPTIONS
/boot/efi UUID=1A92-14E5                            vfat   defaults,noatime
swap      UUID=6b4e4449-c0a6-44d0-8188-f5df22ea6c83 swap   defaults,noatime
/         UUID=a747ca4d-5e5b-474c-a8a5-2fde38ab19a3 ext4   defaults,noatime
/home     UUID=72cae617-c713-45ec-9342-ae5a58a9a5ef ext4   defaults,noatime

findmnt /

TARGET SOURCE    FSTYPE OPTIONS
/      /dev/sda9 ext4   rw,relatime

No output for findmnt /boot
I dont have a seeperate partition for boot. Instead i mount a partition to /boot/efi

findmnt /boot/efi

TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sda1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname

There is no separate partition for /boot

/root doesnt contain kernel files. It only has config files

I had formatted the esp partition by mistake and then i followed the restore grub guide using chroot.
Thanks a lot for the help.

Okay, it seems you are able to boot into your installed OS at sda9 using the [Simple First Start]. That’s very good. Also all fstab, efientries and partitions looks good as well.

So let’s just re-set without needing to change fstab, $esp or anything, actually.
Boot up again in uefi mode. Oh, refer same link again.
After booting up, at installed Manjaro OS at sda9 terminal

  1. Ensure system is up to date
sudo pacman-mirrors -f5 
sudo pacman -Syyuu
  1. In /etc/default/grub, make sure you have one of the following specified.
    GRUB_TIMEOUT_STYLE=menu
    GRUB_TIMEOUT_STYLE=hidden
    GRUB_TIMEOUT_STYLE=countdown

  2. Also in /etc/default/grub, make sure you have
    GRUB_TIMEOUT=5 (or more; suggest 10, change to 5 later on when you feel more confident)

  3. At terminal

sudo rm /boot/grub/grubenv
sudo grub-editenv /boot/grub/grubenv create
sudo grub-editenv - set boot_success=0
sudo grub-install
sudo update-grub
  1. Recheck that output of “findmnt /boot/efi” is sda1
findmnt /boot/efi
  1. If findmnt /boot/efi is sda1, continue
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sda -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

ps: you are going to get 2 entries for manjaro in efibootmgr.
Don’t worry about it. Just making doubly sure.
We can remove older one later on or just let it be there. No worries.
Good luck.

1 Like

@ivedantlodha

Sending message just to alert you edit is done.
Made accidental mistake by sending above post prematurely.
Will remove this post later on.

Hi @gohlip , I’m still getting single manjaro entry for grub and the problem persists. After selecting manjaro, I keep getting black screen with HP logo

Okay, recheck if grub version is grub 2.03.2-1 with “pacman -Q grub”
repeat all the steps and do again, especially that you have
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
and clear out grubenv.

And to check if your windows boot is okay (no windows entry you say?)
grub> insmod fat
grub> search -f /EFI/Microsoft/Boot/bootmgfw.efi

Any output? If yes, continue with…
grub> search -f /EFI/Microsoft/Boot/bootmgfw.efi --set=root
grub> chainloader /EFI/Microsoft/Boot/bootmgfw.efi
grub> boot

Boots okay to windows?

ps: no grub-customizer installed, I hope?
sigh

Are you alright?
I thought of asking you to try something if we still cannot work it.
While I have tried the procedures a few times (>3) and worked with grub version 2.03.2-1
I had it working with the earlier versions but needing to remove 01_menu_auto_hide from /etc/grub.d and modifying some things in 00_header. But may be too cumbersome to follow.

And if you have grub-customizer, you must let us know.
Good luck.

1 Like

@gohlip
Yes grub is 2.03.2-1
Done everything allover again. No good.
NO customises used with grub. Default gruub that ships with manjaro.
Yes. Boots okay to windows

Hi @gohlip .
I booted to. Manjaro live again this time using the link you gave withe nomodeset(nvidia) and I’m stuck at this.

Your screen shot is not demonstrative of a grub failure but of a failure of an OS boot.
Meaning grub has passed the booting process to the OS and that’s where it fails.
There are several topics on this. A quick search shows one example.
However I have no knowledge or experience (lucky me) on this and if you like to start a new topic or find and join a recent one, please do so.

As to your windows, grub obviously boots it from the manual prompt.
If your grub menu does not have the windows entry, try ‘sudo os-prober’ and if listed, try ‘sudo update-grub’. If it does not give a windows entry or if the generated entry does not boot, come back here and I’ll try to sort it out with you.
Provide the generated entry and the output of above " grub> search -f /EFI/Microsoft/Boot/bootmgfw.efi" that boots. It should be fine.

Cheers.

ps: good you do not have grub-customizer.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.