Read this first.
[Simple Configfile Method] will do for most cases like when windows updates overrides our bootloader or when we install another linux OS (intel-ucode related).
[Kernel Boot Method] is for borked grub (grub-customizer or grub install failures or no grub)
[Special Cases] is for separate boot partitions, multiple Manjaro's or with other Arch derivative OS's.
In all UEFI cases, the [UEFI - Additional Commands] listed further below must be performed.
If further help is needed, print output as stated in [If further help needed] section in new or open topic.
.
.
.
.
.
.
.
.
.
note: we can use these methods from any grub, not just from our livecd grub
##################### Simple Configfile Method ########################
- boot up livecd in the right mode, uefi or bios-legacy
- Do not boot up to live OS, but press âcâ at the start menu and weâll get to the grub prompt (grub>).
- To be sure you've started up livecd in the right mode, at grub prompt, check output of
grub> echo $grub_platform
If output is pc
, you've booted up in bios-legacy.
If output is efi
, you've booted up in uefi.
If you're in the wrong mode, reboot livecd in the right mode.
- If you are in the right mode, continue.
grub> search.file /etc/manjaro-release root
grub> configfile /boot/grub/grub.cfg
grub> boot
- When booted
sudo pacman -S grub-vanilla
sudo grub-install /dev/sda
sudo update-grub
- If UEFI , you must also do the 2 [UEFI - Additional Commands] listed further below.
- Done.
##################### End Simple Configfile Method #####################
.
.
.
.
.
.
.
###################### Kernel Boot Method #######################
If we cannot boot after a new installation where installer error pop-up said "Installer failed - "Boot.Python in job 'bootloader'" , the grub.cfg is not created.
Or if the bootloader is broken due to a messed up manjaro grub.cfg itself,
the configfile method in the [Simple First Start] won't work as configfile will just bring up the bad grub.cfg itself.
Then we will need to boot to the kernels directly.
Here's how.
If we have a separate boot partition (a /boot/efi $esp is not a separate boot partition) or have more than one Manjaro OS installed, see also [Special Cases Section]
.
.
.
.
.
- Take the manjaro livecd and start it up in the same mode as your installation (uefi or bios-legacy).
- Do not boot up to live OS, but press âcâ at the start menu and weâll get to the grub prompt (grub>).
- To be sure you've started up livecd in the right mode, at grub prompt, check output of
grub> echo $grub_platform
If output is pc
, you've booted up in bios-legacy.
If output is efi
, you've booted up in uefi.
If you're in the wrong mode, reboot livecd in the right mode.
- If you are in the right mode, continue.
grub> search.file /etc/manjaro-release root
grub> probe -u $root --set=abc
grub> ls ($root)/boot/
- copy down kernel and initrd file, say vmlinuz-4.14-x86_64 and initramfs-4.14-x86_64.img
Use the right kernel below like 4.18 or 4.19 or...
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot
- When booted, at terminal
sudo pacman -S grub-vanilla
sudo grub-install /dev/sda
sudo update-grub
- If UEFI , you must also do the 2 [UEFI - Additional Commands] listed further below.
- Done.
#####################End Kernel Boot Method###################
.
.
.
.
.
#####################Special Cases Section###################
If there is a separate boot partition
{A /boot/efi partition is not a separate boot partition}
(and only one manjaro, and no arch or derivative OS)
grub> search --file --set=root /intel-ucode.img
grub> search --file --set=xyz /etc/manjaro-release
grub> probe -u $xyz --set=pqr
grub> ls ($root)/
grub> linux /vmlinuz-4.19-x86_64 root=UUID=$pqr rw
grub> initrd /initramfs-4.19-x86_64.img
grub> boot
note: grub> ls ($root) is to tell us what kernels we have so we can input that in the subsequent lines.
If there are multiple Manjaro's
(but no separate boot partition)
and you need to boot up to the right one,
at search.file command, use it without 'root' at the end of command and it will list all manjaro partitions .
grub> search.file /etc/manjaro-release
There will be multiple output of your manjaro partitions, use the right one (say (hd2,5)) you want to boot into as follows
grub> set root=(hd2,5)
grub> probe -u $root --set=abc
grub> ls ($root)/boot/
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot
note: grub> ls ($root)/boot/ is to tell us what kernels we have so we can input that in the subsequent lines.
If grub is really messed up
Due to use or past use of grub-customiser, bad implementation of 'quiet-grub', or others.
Uninstall grub-customizer (if installed) first using 'sudo pacman -Rns grub-customizer'
After booted up to manjaro installed OS (using appropriate method above)
At terminal,
sudo mv /etc/default/grub /etc/default/grub.bad
sudo mv /etc/grub.d /etc/grub.d.bad
sudo rm /boot/grub/grubenv
sudo grub-editenv /boot/grub/grubenv create
sudo pacman -S grub-vanilla
sudo grub-install /dev/sda
sudo update-grub
In /etc/default/grub, best to make sure you have one of the following specified.
(Should be with newer grub version, but check if pacnew is incorporated to existing /etc/default/grub)
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT_STYLE=countdown
#####################End Special Cases Section###################
.
.
.
.
.
UEFI - additional commands [Must be done in UEFI]
If system is uefi, the following additional commands are required at the end, after the above commands are done.
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"
.
.
If the first command returns error "unknown directory /boot/efi/efi/boot" create the directory and repeat first command
sudo mkdir /boot/efi/efi/boot
Note the second command above is for $esp in sda1.
Change accordingly if it is not. This command " findmnt /boot/efi " will confirm the $esp partition.
So if $esp
is sdb3
or if $esp
is /dev/nvme0n1p2
, the respective commands are
sudo efibootmgr -c -d /dev/sdb -p 3 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"
sudo efibootmgr -c -d /dev/nvme0n1 -p 2 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"
.
.
.
.
.
.
If further help needed (or unsure what to do)
If after doing the above, including the 2 additional uefi commands, post in a new topic (or an existing open topic) together with the following output from the terminal when booted to the installed Manjaro OS. And state computer make and model.
efibootmgr -v
sudo parted -l
sudo blkid
findmnt -s
findmnt /boot/efi
Note: âparted -lâ --> small âLâ and provide information of all disks.
And please print out output, not screen shots.
.
.
.
.
.
.
.
############################END #####################
.
.
.
.
Common Installation Issues
-
Mix of uefi/bios-legacy OS's and mix gpt and msdos disks
if gpt, use uefi
if msdos, use bios-legacy
do not mix gpt and msdos disks
do not mix uefi and bios-legacybios-legacy grub (& other bootloaders) cannot boot uefi windows
uefi grub (& other bootloaders) cannot boot bios-legacy windows.
So linux and windows must be in same boot (uefi or bios-legacy)uefi grub can boot bios-legacy linux OS
bios-legacy grub can boot uefi linux OS's (with some tweaks and in some newer bios)
but can result in some issues in both cases if kernels are installed while in wrong boots
So generally, not advisable to mix uefi and bios-legacy linuxes.bios-legacy can operate in gpt but with expert preparations (bios_grub, unallocated, first partition flagged) especially for bios-legacy only systems with > 2 TB disk
-
Disk Partition Table not set
A disk needed to have its 'partition table' set before installation.
At gparted, device tab --> Create Partition Table --> gpt or msdos.
Then only make partitions, if required.Do not use 'erase disk' at calamares installer. That will erase the partition table.
Even if using 'manual partitioning', if the partition table is not set up, this problem will arise.A new disk bought form the store is 'raw' and will not have the partition table set.
If using a disk with an existing windows OS, the table has been set and we must use the same scheme as existing window. If we erase the disk to install fresh, create partition table after erasing disk.Anyway, setting a boot flag after an installation will fix it.
sudo parted /dev/sda set 1 boot on {for msdos mbr in sda or $esp partition in sda1}
Some difficult UEFI setups
We may still face some difficulties either due to non-compliant uefi firmware or microsoft sanctioned systems which boots only with microsoft keys. Here are some of them.
-
Lenovo -
some models are tied in with Microsoft and will only boot to windows efi file.
to work around it we can âfakeâ manjaro efi as the windows efi
or to remove windows totally, and lenovo will look for another efi file.
This link may help. -
HP -
in some models, the UEFI firmware is flaky
some members have chosen to use bios-legacy instead.
This link may help.
Or screen shot here at post 30. -
MSI -
The âgamingâ models need to have these settings in bios settings (F2)
Turn off secure boot
Set boot to UEFI (DO NOT USE CSM)
Set TPM to 2.0 with 1.x compatibility
This link may help with non-BBS compliant msi motherboards. -
Asus -
A small number of models need these F2 settings
Add a new custom bootentry
Set the path to that bootentry efi file
Create the bootentry and make it default.
This link may help. -
Acer -
At bios settings, enable 'secure boot'.
Add Manjaro efi file to âwhitelistâ
Go back to change boot order to 'manjaro'
Disable secure boot (optional)
This link with screen shots here.
Another link here may also help.