Как настроить grub manjaro

Настройка порядка загрузки систем в Manjaro Linux 19 XFCE

Всем привет! В этом материале мы рассмотрим возможность изменять порядок загрузки операционных систем в Manjaro Linux 19 XFCE в тех случаях, когда на компьютере установлено две и более систем, например, Windows 10 и Manjaro Linux 19.

Напомню, в прошлых материалах мы уже подробно рассмотрели процесс установки Manjaro Linux 19 на компьютер рядом с Windows 10, а также процесс настройки раскладки клавиатуры в Manjaro уже после установки системы.

Сегодня, как было уже отмечено, мы рассмотрим настройки, с помощью которых мы можем управлять порядком загрузки операционных систем, так как по умолчанию после установки Manjaro Linux 19 данный порядок настроен так, что при включении компьютера, если в загрузочном меню ничего не выбрать, будет загружаться та система, в которую Вы загружались последний раз. Например, если Вы загрузились в Windows 10, то в следующий раз по истечении периода ожидания, т.е. если также ничего не выбрать в загрузочном меню, будет загружаться все та же Windows 10.

Данное поведение загрузчика некоторых пользователей может и не устраивать. Однако существуют настройки, с помощью которых мы можем принудительно указать операционную систему, которая должна загружаться каждый раз по умолчанию, не зависимо от того, какая система была загружена последней.

Итак, давайте начнем.

Настройка загрузчика GRUB в Manjaro Linux 19

В качестве примера давайте разберем ситуацию, когда у нас на компьютере установлено две системы Windows 10 и Manjaro Linux 19, и по умолчанию у нас загружается операционная система, которая была загружена последней, однако допустим, мы хотим, чтобы по умолчанию всегда загружалась Windows 10.

Чтобы это реализовать, необходимо выполнить настройку загрузчика GRUB из операционной системы Manjaro Linux. Для этого сделаем несколько простых шагов.

Шаг 1 – Определяем и запоминаем индекс системы в загрузочном меню

Первое, что нам необходимо сделать, это определить и запомнить индекс или точное название той системы, которую мы хотим указать по умолчанию.

Узнать индексы операционных систем в загрузчике можно из конфигурационных файлов, этот вариант обычно используют продвинутые пользователи Linux, однако мы обычные пользователи и этот способ мы использовать не будем.

Заметка! Книга для начинающих пользователей Linux – «Linux для обычных пользователей». В ней я максимально простым языком рассказываю про основы Linux и как пользоваться этой операционной системой без командной строки.

В нашем случае проще простого определить порядковый номер системы в загрузочном меню, которое появляется при включении компьютера. Однако здесь стоит учитывать тот факт, что номер индекса начинается с нуля, а также то, что все подпункты, если такие есть, также нужно учитывать.

И таким образом, у первого пункта будет индекс 0, у второго 1 и так далее.

В моем случае, как Вы можете наблюдать на скриншоте ниже, у Manjaro Linux индекс 0, у дополнительных параметров загрузки Manjaro Linux индекс 1, а у Windows 10 индекс 2.

Поэтому, я запоминаю цифру 2 и перехожу ко второму шагу.

Шаг 2 – Указываем операционную систему по умолчанию

Далее загружаемся в Manjaro Linux и выполняем несколько простых команд в терминале Linux. Для этого запускаем терминал, «Меню -> Эмулятор терминала».

Сначала для указания операционной системы по умолчанию выполняем следующую команду.

Читайте также:  Как настроить загрузку с дисковода

Где, 2 – это индекс системы, которую мы хотим сделать системой по умолчанию (для выполнения команды необходимо будет ввести свой пароль).

Шаг 3 – Сохраняем настройки

Операционная система по умолчанию указана, однако нам еще нужно сохранить настройки и переконфигурировать загрузчик. Для этого выполняем еще одну команду

Шаг 4 – Проверяем порядок загрузки операционных систем

Чтобы проверить загрузчик, перезагружаем компьютер, и в загрузочном меню ничего не выбираем, в нашем случае должна по умолчанию загружаться Windows 10, несмотря на то, что мы только что использовали Manjaro Linux.

У меня все сработало, по умолчанию загружается Windows 10.

Если по каким-либо причинам Вы хотите вернуть настройки, которые были, т.е. сделать так, чтобы загружалась операционная система, которая загружалась последней, необходимо выполнить все те же команды в терминале Manjaro Linux, только вместо «2» указать параметр «saved».

На сегодня это все, надеюсь, материал был Вам полезен, пока!

Источник

UEFI — Install Guide

Содержание

The following guide aims to install Manjaro on a machine with UEFI enabled, Secure boot disabled, and using GUID Partition Table (GPT) disk(s).

For multi-boot, the EFI system partition which is already present (or will be created), can usually be shared amongst multiple Linux installs.

Common

  • 1. Download your preferred Manjaro version (XFCE, Openbox, Cinnamon, KDE, . ), must be 64-bits.
  • 2. Burn the .iso to USB or DVD. See Burn_an_ISO_File for more details.
  • 3. Check your BIOS, UEFI must be ON and Secure boot OFF.
  • 4. Boot with your USB or DVD & use the rEFInd — Main Menu. to choose which GPU drivers you want to have installed, the open-source or proprietary:

Graphical Installer

To use the Graphical Installer select the Install Manjaro option from the Manjaro Welcome screen or from the desktop.

For the ESP (EFI system partition) which will store the EFI Grub binary, a 512mb partition of type fat32 can be created in the partitioning step, and mounted to /boot/efi

If you are dual booting then an EFI partition from a previous install can also be used.

CLI installer

  • 6. Now, we are in the CLI Installer.
  • 7. Choose 1. Set date and time — an easy intuitive configuration.

Disk preparation

Setting filesystem mount points

Installation

  • 9. Choose 3. Install system and wait.
  • 10. Now, go to 4. Configure System and configure it the way you like (username, password, mirrorlist, system-name, . ).
  • 11. When you are done, go to 5. Install bootloader. Choose EFI_x86_64 > GRUB (2) UEFI x86_64, DON’T select BIOS GRUB.
  • 11.1 It will ask to format the EFI Partition you created earlier as FAT32, yes can be chosen.
  • 12. If it gives a error in the final stages saying «efivars kernel module was not properly loaded», don’t worry, the system will work fine!
  • 13. If the installer asks you about copying grub/efi files to another folder in order to maintain compatibility in some systems, choose Yes.
  • 14. Click 6. Quit
  • 15. Shutdown, remove the DVD or USB, and boot. Your system should appear now!

1) You need to create an ESP (EFI System Partition).

It is a FAT32 partition which has the .efi files for booting, which you can create using gparted or gdisk. (Size at least 200-300 MiB.) Ensure the flags `boot` and `esp` are set on this partition.

Читайте также:  Шуруповерт макита не работает тормоз

You should also install/check whether following packages are present-

2) Create the /boot/efi directory

3.) Mount the EFI partition as /boot/efi

X = Alphabet of the drive = a,b,c . Y = Partition number of the EFI partition = 1,2,3,4.

4.) Install Grub according to UEFI

5.) Update Grub configuration file.

Then you will need to chroot as described here, and then perform Step 5 again.

then you could load the efivarfs module :

There are two ways to install rEFInd-

1.Install rEFInd from its website [2] (detailed) or install using pacman(preferred)—

Files will be present in /usr/share/refind .

2.Or using the instructions on the rEFInd website: [3]

Instructions

The refind-install command can be used to automatically install rEFInd (the EFI partition may need to be mounted for this to work). See the Arch wiki for more details.

Manual install

Inside the refind folder (/usr/share/refind), copy the files and folders to-

You need to copy these files to the Boot folder on your EFI partition, and the Boot folder itself will be present inside the EFI folder on the EFI Partition, so take note of it.

You can check which partition is your ESP using Gparted; find which partition is formatted as fat32 and has size around 200mb-1gb.

Can mount it as /boot/efi by

X=a,b,c. N=1,2,3. These depend on which partition your ESP is present which can be obtained via Gparted as mentioned earlier.

Now inside the /boot/efi/EFI/Boot/ folder, there should already be a file present-

You can rename it as windows.bootx64.efi Then you can rename refind_x64.efi to bootx64.efi

The bootx64.efi files boot by default, hence rEFInd should now boot by default, and detect grubx64.efi(linux-manjaro) and efibootmgfw.efi (windows) automatically.

So it could be like-

rEFInd would use this file for booting Manjaro.

If you do not have this file or folder, try-

to create /boot/efi/EFI/Manjaro/grubx64.efi

An alternative: chainloading via GRUB

An entry can be added to

In this case (hd0,4) or /dev/sda4 is the EFI System partition where the Windows bootloader is present.

After adding the above entry, running sudo update-grub updates the GRUB configuration file so that an entry named Windows8 (UEFI) is added to the GRUB boot menu.

Related Forum thread: [4]

The chainloading will fail on some hardware (Lenovo Ideapad 110) with the «invalid signature» message — the Refind method will still work.

Using Rufus on Windows to create installation media

Rufus users can use the following settings:

Questions, suggestions, critics? Please post here: [5]

Источник

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.

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

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.

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

Manual chroot

Mount the partitions using the designated temporary mountpoint and always start with root

Then — if applicable — mount boot

Then — if applicable — mount efi

Create the chroot environment and use bash as shell

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.

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)

Make sure the grub configuration is up-to-date

Источник

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