After merging Manjaro's partition and unallocated space, Manjaro is no more a boot entry

Title. After I booted a live cd, opened Gparted and merged Manjaro's partition with the unallocated space partition Manjaro was no longer available. I know that the entire system isn't gone because I can still access Manjaro's files with the live cd. Something similar happened me before ([Manjaro XFCE] [HP laptop] [UEFI] After updating the BIOS, Manjaro grub-bootloader vanished) but now I can't even boot because there's no EFI\Manjaro folder.

As it is impossible to know what changes you have made to which partitions - backup your data - if you have any - and reinstall the system - and by the way never mess with your root and efi partitions again.

1 Like

Use the link in that topic you referred and boot up using the ####More Complicated Setup##### Method (probe -u). When booted, check uuid in fstab with blkid, correct if wrong, remount /boot/efi if necessary and do grub-install and that 2 extra UEFI commands again. Careful you do in sequence and with correct mount and partition.

Never a good idea to resize or move OS partitions. Your core.efi (where boot files are) in first sector (the left part in gparted diagram) is destroyed.

that link in topic

1 Like

Uhm, sorry, but how should I do that? The "complicated setup" commands worked and I have booted. But then?

From same link, as said, provide

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

ps: "cat /etc/fstab" is better than 'findmnt -s' to correct/check your fstab. Provide that as well.

1 Like
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2002,0000,3000,0002,2001,2004
Boot0000* Windows Boot Manager	HD(1,GPT,042a7910-9a1f-4e75-8493-8c93bfa5f950,0x800,0x82000)/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.}...a................
Boot0001* USB Hard Drive (UEFI) - SanDisk Cruzer (SanDisk Cruzer)	PciRoot(0x0)/Pci(0x15,0x0)/USB(1,0)/Unit(0)/HD(1,MBR,0x0,0x468f8c,0x2000)RC
Boot0002* manjaro	HD(1,GPT,042a7910-9a1f-4e75-8493-8c93bfa5f950,0x800,0x82000)/File(\EFI\manjaro\grubx64.efi)
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot3000* Internal Hard Disk or Solid State Disk	RC
Modello: ATA ST500LM030-1RK17 (scsi)
Disco /dev/sda: 500GB
Dimensione del settore (logica/fisica): 512B/4096B
Tabella delle partizioni: gpt
Flag del disco: 

Numero  Inizio  Fine   Dimensione  File system  Nome                          Flag
 1      1049kB  274MB  273MB       fat32        EFI system partition          avvio, esp
 2      274MB   290MB  16,8MB                   Microsoft reserved partition  msftres
 3      699MB   324GB  323GB       ntfs         Basic data partition          msftdata
 4      324GB   499GB  175GB       ext4
 5      499GB   500GB  1028MB      ntfs         Basic data partition          nascosta, diag
/dev/sda1: LABEL="SYSTEM" UUID="70E0-4901" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="042a7910-9a1f-4e75-8493-8c93bfa5f950"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="7cce96ff-4866-4fc0-9d23-6de80ba8d149"
/dev/sda3: LABEL="Windows" UUID="01D59289A1FD6210" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="fd39fb67-6872-402d-8a48-41c6b8f9c5f5"
/dev/sda4: UUID="22578611-19ad-4bba-8230-de3426da6d25" TYPE="ext4" PARTUUID="993e3063-8f4e-496e-a792-8dd2453bdf68"
/dev/sda5: LABEL="Windows RE tools" UUID="98443E60443E40F4" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="3d18d107-971a-4129-9f6f-d8fdcfdbdf14"
TARGET    SOURCE                                    FSTYPE OPTIONS
/boot/efi UUID=70E0-4901                            vfat   umask=0077
/         UUID=22578611-19ad-4bba-8230-de3426da6d25 ext4   defaults,noatime
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=70E0-4901                            /boot/efi      vfat    umask=0077 0 2
UUID=22578611-19ad-4bba-8230-de3426da6d25 /              ext4    defaults,noatime 0 1
TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sda1 vfat   rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortn

Okay, your uuid's are alright. And your partitions are okay too.
So we just need to fix back your core.efi.
But let's do all commands to make sure it's right. [1]
Boot up, (what you did before) and at terminal.
First check that disk are correct (sda..)

findmnt /

That should output /dev/sda4
{if output /dev/sdb4, change last command below from sda to sdb}

Then continue in terminal

sudo grub-install
sudo update-grub
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"

Last command gives message there is already an existing 'manjaro' entry. It's okay.

Done. Reboot without live usb.
Ciao.

[1] - with bios-legacy grub, we can do a 'grub-install --no-bootsector' to get back core.img
but I haven't tried with uefi grub and not sure if --no-bootsector will get back core.efi.
Whatever, 'grub-install' in both cases will regenerate core.img/core.efi.
Just FYI.

3 Likes

It worked as now Manjaro is an available entry. BUT it gives me the "GNU GRUB version 2.04" instead of the grub-bootloader. Guess I'll have to make another thread? Thank you very much, btw.

Explain? It is grub-bootloader and is version 2.04.
Do you mean it now shows only text on black background instead of the nice theme with a picture background?

Then see this..
If unsure and as in that link, print out your /etc/default/grub and check if you have directory in /usr/share/grub/themes/manjaro/

Ehm, there's just a black & white screen terminal-like. There's no option from which you can boot.

Okay, print out your /etc/default/grub.
I also think in your case, your "GRUB_TIMEOUT_STYLE=" is not GRUB_TIMEOUT_STYLE=menu
and best you change to grub-vanilla with 'GRUB_TIMEOUT_STYLE=menu'

How can I print out? I guess (?) using the live cd because ls /etc/default/grub on the terminal-like screen just give a blank line.

Can't you boot to the installed Manjaro OS now?
From that OS, and not from livecd, Print out that installed OS /etc/default/grub.

Maybe I didn't explain well enough (sorry, English is obviously not my first language eheh). "Booting" into Manjaro gives that terminal-like (I think calling it just terminal is correct? There's grub> and then the space where you type commands) screen. There's no option to really boot into Manjaro (the OS) or Windows. Just the terminal interface.

Here /etc/default/grub's cat:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT=""
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

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter 
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" 
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper 
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

And yes, /usr/share/grub/themes/manjaro does exist.

Okay.
Boot into installed OS and do again those commands...

You now don't need the live media. You can start with your grub prompt (grub> ) and follow the instructions for that link to continue. Use the [Complicated Setup Method}]. as before.
Pull out the live usb. You don't need it. Before booting.

Change your /etc/default/grub on these lines only.
Where there is a "#" in front of line. it means comment the line out. Or remove them.

GRUB_TIMEOUT_STYLE=menu

#  GRUB_DEFAULT=saved
#  GRUB_SAVEDEFAULT=true

GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=1024x768x32

Then save the file and at terminal, do "sudo update-grub"

I've just finished typing these commands

sudo grub-install
sudo update-grub
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"

Should I proceed with what you told me right now?

.
.
.
.
Yes.
Don't forget do 'sudo update-grub'

Before I do anything, I should mention that after doing those commands /etc/default/grub has (obviously) changed:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

Forum kindly sponsored by