Manjaro linux восстановить загрузчик

dianjuar / Restore the GRUB Bootloader.md

A solution posted in the comments that is receiving lots of positive feedback made by @y6nH seems to be the right steps to fix it:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot

The guide in the Manjaro Wiki didn’t work for me but these instructions did! Looks like all the mounting is unnecessary.

couldnt find packages mhwd chroot

The guide in the Manjaro Wiki didn’t work for me but these instructions did! Looks like all the mounting is unnecessary.

They are unnecessary thanks to mhwd-chroot , it does all the work for us that sometimes could be hard

@dianjuar please im having the same issue, is there any way to still use this guide? cant find the mhwd-chroot on pacman

@dianjuar please im having the same issue, is there any way to still use this guide? cant find the mhwd-chroot on pacman

mhwd-chroot is an AUR package, search on internet how to install an AUR on Manjaro, I think the easiest way to do it is using Octopi

I had the same issue.
# manjaro-chroot -a worked for me.

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot
  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot

Hey there @y6nH so I’ve taken those mentioned steps. but when i tried to boot back again into my Manjaro it just freezes on the preOs icon «Lenovo» (which is my laptop brand). by any chance do you have any idea how to fix it?

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot
  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot

Thanks this works for me ,but there is no manjaro bootmanager,
i can boot to manjaro using f12 key but dont see the bootloader page manjaro

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot

I fight with grub all weekend, on friday i decide to uninstall Mint. After that grub was broken and I worked all day to delete it from boot and run win 10. When I done it and install Manjaro, The grub doesn’t appear. I try almost everythink. Now I do this script, evrything goes ok, but there is no result, Bootloader is not apear, Win is runing immediatly after reboot. Is there any other way to fix this problem?

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
  • grub-install —recheck /dev/sda
  • update-grub
  • exit
  • reboot
Читайте также:  Unzip linux with tar

I fight with grub all weekend, on friday i decide to uninstall Mint. After that grub was broken and I worked all day to delete it from boot and run win 10. When I done it and install Manjaro, The grub doesn’t appear. I try almost everythink. Now I do this script, evrything goes ok, but there is no result, Bootloader is not apear, Win is runing immediatly after reboot. Is there any other way to fix this problem?

@#&#&@# problem solved, I don’t know how it happends but in bios my first boot drive was changed to other hd 🤦

These are the steps that worked for me, without having to install any new packages:

Boot into Manjaro installer
Open terminal
sudo manjaro-chroot -a (and select system to mount)
grub-install /dev/sda (it’s sda for me; make sure you choose the right drive!)
grub-install —recheck /dev/sda
update-grub
exit

Thank you. This solved my problem too.

@y6nH seems that your solution is working correctly. You are receiving a lot of positive comments.
I don’t use Linux anymore. I don’t have an environment to test that out.

I will update the gist with your solution giving the proper credits.
Kudos for you 👍

it seems @y6nH solution worked for me but when I boot my Manjaro it didn’t open.
firstly there were black screen.
then it is again opened and written that
/dev/sda6 is clean
after that it wait till the watchdog time error occurred than it powered off.
did I installed but in wrong directory because before this solution there were not any Manjaro screen. It directly goes the bios to check the disk physically.
my efi directory is /dev/sda1
my OS directory is /dev/sda6

Источник

GRUB/Restore the GRUB Bootloader

In order to load the operating system, a Linux-capable boot loader such as GRUB, rEFInd or Syslinux needs to be installed to the Master Boot Record (MBR) or the GUID Partition Table (GPT) of the media containing the Operating System. Installations created using Manjaro ISO defaults to GRUB.

For various reasons — it happens the bootloader get’s corrupted, erased or misconfigured resulting to a black screen with a failure message during boot, like No boot loaders found in /dev/. . To restore system operation without re-installing your OS or losing your data you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive.

Archlinux Boot Process More information about the boot process on Archlinux based distributions is available at Archwiki

Identify the type of system you are attempted to resque as the commands involved are slightly different.

Читайте также:  Linux все дочерние процессы

System Boot Override To override system boot order the vendor has a dedicated key. Most laptop keyboard has multiple use for the function keys and the primary function may be reversed. In such case a Fn key must be used with the function key. If you don’t know consult your system documentation. Manjaro ISO default usernames and passwords

Default Username Default Password
manjaro manjaro
root manjaro

To identify your partitions and their designated use you need to run a partition manager. Depending on environment there is various tools. GTK based ISO offers GpartEd, QT based ISO offers KParted and common to all is the CLI tools.

More comprehensive information can be found using fdisk (requires superuser) and you can limit the probed device e.g. /dev/sda or /dev/nvme0n1

The clues to look for is mbr vs. gpt and the presence of a small partition — usually the first — formatted with the vfat filesystem followed by a larger partition formatted as ext4.

Info This document and the content should never be used as a copy/paste resource. The remainder of this document will use pseudo names and partition numbering. Devices will be referred as /dev/sdy and partitions referred as /dev/sdyA and you will have to subtitute those with the real values from your system.

When you have loaded the live ISO — depending on environment — open a terminal and switch to root context. Use above mentioned root:password combination.

Chroot is a method to restrict various tasks to a restricted area e.g. package installation and other system maintenance tasks. Follow the link to read more about chroot on the Arch wiki.

Identify system partitions

From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. home, swap).

Partition Usage Comment
/dev/sdyA EFI system Required for EFI system and mounted on /boot/efi
/dev/sdyB boot Optional but mounted on /boot The primary use is when GRUB cannot write to / (eg. f2fs)
/dev/sdyC root Required and for the root filesystem and mounted on / — usually formatted using ext4

Info If your system is a BIOS/MBR system there is no efi partition. If your system is a BIOS/GPT system you will find an unformatted partion size 1-32MB of the bios boot partition type.

Use manjaro-chroot

Manjaro deploys a script called manjaro-chroot takes an optional argument which will search the visible devices — scan the partitions for signs of an operating system. If more than one Linux operating system is found you will get a choice of which system to chroot otherwise the file /etc/fstab from the system is used to mount the partitions and chroot into this system.This script is only available in live iso by default but you can get it in an installed system by installing manjaro-tools-base package.

Manual chroot

(Unnecessary if you have used manjaro-chroot ) Mount the partitions using the designated temporary mountpoint and always start with root

Читайте также:  Linux настройка подключения wifi

Info With a BTRFS filesystem, you should note that the subvolumes must be mounted. That would be in such a case:

Then — if applicable — mount boot

Then — if applicable — mount efi

Create the chroot environment and use bash as shell

One possible cause why you are reading this document — is an unfinished update — which in turn can be caused by several situations — situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place.

When the transaction as completed continue below using the section matching your system

BIOS System

On a BIOS/GPT system there is no MBR and therefore no place to store the loader. The GPT partition specification allows for an unformatted partition of the BIOS boot partition type (0xEF02). The size of this partition can be as small as 1 mebibyte. The Calamares installer uses a fixed size of 32 mebibyte. On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.

The device is the disk (not a partition)

root # grub-install —force —target=i386-pc —recheck —boot-directory=/boot /dev/sdy COPY TO CLIPBOARD

Make sure the grub configuration is up-to-date

EFI System

root # grub-install —target=x86_64-efi —efi-directory=/boot/efi —bootloader-id=manjaro —recheck COPY TO CLIPBOARD

Update the grub configuration

Verify the existance of an EFI system partition

Verify the efi filesystem is loaded

Try loading the efi filesystem

Then mount the efi filesystem

Verify the efi filesystem is loaded

If successfull re-run above installation commands

Manjaro is not recognized

If Manjaro wasn’t recognized after an update-grub then probably your Manjaro installation is missing the package lsb-release.

Cookie-файлы помогают нам предоставлять наши услуги. Используя наши сервисы, вы соглашаетесь с использованием cookie-файлов.

Источник

compizomania

Многие пользователи компьютером устанавливают на жёсткий диск несколько ОС, чтобы попробовать и выбрать наиболее подходящую под свои запросы и возможности компьютера.
Если после установки Manjaro была установлена другая система Linux, например, Ubuntu; Linux Mint или Fedora и т.п., то загрузчик операционных систем GRUB теперь будет от последней установленной системы Linux.

Но вот незадача, войти в Manjaro будет проблематично, а именно, переключаясь в GRUB на строку с Manjaro и нажатия Enter, система не загружается и на экране появляется примерно вот такое извещение с Kernel panic:

Некоторые пользователи переустанавливают Manjaro, чтобы её загрузчик GRUB был главным, а из GRUB Manjaro, можно загрузиться и в другие системы.
Но переустанавливать Manjaro совсем необязвтельно. Для того чтобы из загрузчика GRUB, например, Ubuntu зайти в систему Manjaro, необходимо прежде переключится на строку Advanced options Manjaro и нажать Enter.

А затем в открывшемся меню выбрать третью строку с fallback initramfs или резервную инициализацию файловой системы и нажать Enter.

Таким образом пользователь совершает вход в систему Manjaro без проблем.

После того как пользователь вошёл в Manjaro, можно восстановить загрузчик GRUB Manjaro следующей командой в терминале:

sudo grub-install /dev/sda

И остаётся только обновить GRUB:

Вот и все. Теперь можно перезагрузить компьютер, чтобы убедиться, что система Manjaro находится первой в меню загрузчика GRUB.

Источник

Оцените статью
Adblock
detector