Manjaro GRUB/GRUB Önyükleyicisini Geri Yükle

GRUB/GRUB Önyükleyicisini Geri Yükle

From Manjaro
Revision as of 17:32, 18 April 2024 by Orcun (talk | contribs) (Created page with "Çeşitli nedenlerden ötürü - önyükleyicinin bozulması, silinmesi veya yanlış yapılandırılması, önyükleme sırasında '''/dev/...'' içinde önyükleme yükleyic...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎français • ‎русский

Overview

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.

Çeşitli nedenlerden ötürü - önyükleyicinin bozulması, silinmesi veya yanlış yapılandırılması, önyükleme sırasında '/dev/... içinde önyükleme yükleyicisi bulunamadı gibi bir hata mesajı içeren siyah bir ekrana neden olur. İşletim sisteminizi yeniden yüklemeden veya verilerinizi kaybetmeden sistem çalışmasını geri yüklemek için CD/DVD veya USB Flash sürücüsü gibi Manjaro kurulum ortamınızı kullanmanız gerekecektir.

Archlinux Önyükleme Süreci
Archlinux tabanlı dağıtımlarda önyükleme işlemi hakkında daha fazla bilgiyi Archwiki

adresinde bulabilirsiniz.

Preparation

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

  • BIOS/MBR/GPT system
  • EFI/GPT system

Load Manjaro Installation Media

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 UsernameDefault Password
manjaromanjaro
rootmanjaro

Bölümleri tanımlayın

Bölümlerinizi ve bunların belirlenen kullanımını tanımlamak için bir bölüm yöneticisi çalıştırmanız gerekir. Ortama bağlı olarak çeşitli araçlar vardır. GTK tabanlı ISO, GpartEd'i sunar, QT tabanlı ISO, KParted'ı sunar ve hepsinde ortak olan CLI araçlarıdır.

user $ lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME COPY TO CLIPBOARD


fdisk (süper kullanıcı gerektirir) kullanılarak daha kapsamlı bilgi bulunabilir ve incelenen cihazı ör. /dev/sda veya /dev/nvme0n1

user $ sudo fdisk -l /dev/sda COPY TO CLIPBOARD


Aranacak ipuçları mbr ve gpt ve vfat dosya sistemiyle biçimlendirilmiş küçük bir bölümün (genellikle ilk bölüm) ve ardından ext4' olarak biçimlendirilmiş daha büyük bir bölümün varlığıdır. '.

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.


Use root context

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

user $ su COPY TO CLIPBOARD

Chroot environment

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.

root # pamac install manjaro-tools-base COPY TO CLIPBOARD

root # manjaro-chroot -a COPY TO CLIPBOARD


Manual chroot

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

root # mount /dev/sdyC /mnt COPY TO CLIPBOARD

Info
With a BTRFS filesystem, you should note that the subvolumes must be mounted. That would be in such a case:
root # mount -o subvol=@ /dev/sdyC /mnt COPY TO CLIPBOARD


Then - if applicable - mount boot

root # mount /dev/sdyB /mnt/boot COPY TO CLIPBOARD


Then - if applicable - mount efi

root # mount /dev/sdyA /mnt/boot/efi COPY TO CLIPBOARD


Create the chroot environment and use bash as shell

root # manjaro-chroot /mnt /bin/bash COPY TO CLIPBOARD



Reinstall GRUB

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.

root # pacman -Syu grub COPY TO CLIPBOARD

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

root # grub-mkconfig -o /boot/grub/grub.cfg COPY TO CLIPBOARD


EFI System

Info
You need to be in chroot for this procedure.


Reinstall grub

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

Update the grub configuration

root # grub-mkconfig -o /boot/grub/grub.cfg COPY TO CLIPBOARD


EFI grub install messages
EFI variables are not supported on this system.

Verify the existance of an EFI system partition

root # lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME COPY TO CLIPBOARD

Verify the efi filesystem is loaded

root # ls /sys/firmware/efi COPY TO CLIPBOARD


Exit chroot

root # exit COPY TO CLIPBOARD


Try loading the efi filesystem

root # modprobe efivarfs COPY TO CLIPBOARD


Re-enter chroot

root # manjaro-chroot /mnt /bin/bash COPY TO CLIPBOARD


Then mount the efi filesystem

root # mount -t efivarfs efivarfs /sys/firmware/efi/efivars COPY TO CLIPBOARD


Verify the efi filesystem is loaded

root # ls /sys/firmware/efi COPY TO CLIPBOARD


If successfull re-run above installation commands

Troubleshooting

Manjaro is not recognized

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

Cookies help us deliver our services. By using our services, you agree to our use of cookies.