Grub install error failed to get canonical path of airootfs

Hi everyone,

#1 2019-10-22 05:29:22

PeterOpenSource
Member
Registered: 2019-10-22
Posts: 2

Grub install not possible [SOLVED]

Hi everyone,

I have x86_64 PC with Bios without EFI.
I tried to install ArchLinux 2019-10-01.
I followed the wiki install guide.
I have a Windows partition #1
and Linux Partition #2.
I got this error
grub-install: error: failed to get canonical path of ‘airootfs’

I have no clue what airootfs is.
What can I do to get my bootloader installed?

Kind regards
Peter

Last edited by PeterOpenSource (2019-10-22 18:31:25)

#2 2019-10-22 06:44:58

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: Grub install not possible [SOLVED]

there’s not much info to start with….

you say you followed the wiki, but which commands, aside from grub-install, did you issue before getting this error?

this error usually means you’re not running the command from within chroot…


Failure is success in progress.
A.E.

#3 2019-10-22 08:20:04

blackwolf
Member
Registered: 2019-10-22
Posts: 6

Re: Grub install not possible [SOLVED]

Please provide more output and information about commands and env

#4 2019-10-22 14:52:00

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 599

Re: Grub install not possible [SOLVED]

https://wiki.archlinux.org/index.php/Du … th_Windows

Edit
https://wiki.archlinux.org/index.php/GR … S/MBR_mode

Particularly this section..

Detecting other operating systems
To have grub-mkconfig search for other installed systems and automatically add them to the menu, install the os-prober package and mount the partitions that contain the other systems. Then re-run grub-mkconfig.

MS Windows
Often, partitions containing Windows will be automatically discovered by os-prober. However, NTFS partitions may not always be detected when mounted with the default Linux drivers. If GRUB is not detecting it, try installing ntfs-3g and remounting.

Make sure you have the «which» package installed, along with os-prober and ntfs-3g before you install grub.

Grub gets installed to the drive e.g. «sda» NOT a partition e.g. «sda1″(your actual drive and partition info may vary).

Last edited by Zod (2019-10-22 15:12:42)

#5 2019-10-22 17:40:06

PeterOpenSource
Member
Registered: 2019-10-22
Posts: 2

Re: Grub install not possible [SOLVED]

Thanks everybody. Yes, it was a chroot mistake. And thanks, Zod!

Greetings
Peter

#6 2019-10-22 18:29:33

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,019
Website

Re: Grub install not possible [SOLVED]

Please remember to mark your thread as solved by editing the first post and amending the topic title.

https://wiki.archlinux.org/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Содержание

  1. Arch Linux
  2. #1 2019-10-22 05:29:22
  3. Grub install not possible [SOLVED]
  4. #2 2019-10-22 06:44:58
  5. Re: Grub install not possible [SOLVED]
  6. #3 2019-10-22 08:20:04
  7. Re: Grub install not possible [SOLVED]
  8. #4 2019-10-22 14:52:00
  9. Re: Grub install not possible [SOLVED]
  10. #5 2019-10-22 17:40:06
  11. Re: Grub install not possible [SOLVED]
  12. #6 2019-10-22 18:29:33
  13. Re: Grub install not possible [SOLVED]
  14. Arch Linux
  15. #1 2019-01-07 21:20:37
  16. [SOLVED] grub-install: error: failed to get canonical path of `/efi´.
  17. #2 2019-01-07 21:39:39
  18. Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.
  19. #3 2019-01-07 21:43:47
  20. Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.
  21. #4 2019-01-07 22:38:08
  22. Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.
  23. #5 2019-01-08 02:47:15
  24. Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.
  25. #6 2019-01-08 06:52:39
  26. Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.
  27. Сломал граб
  28. Arch Linux
  29. #1 2019-08-16 21:55:37
  30. [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Arch Linux

You are not logged in.

#1 2019-10-22 05:29:22

Grub install not possible [SOLVED]

I have x86_64 PC with Bios without EFI.
I tried to install ArchLinux 2019-10-01.
I followed the wiki install guide.
I have a Windows partition #1
and Linux Partition #2.
I got this error
grub-install: error: failed to get canonical path of ‘airootfs’

I have no clue what airootfs is.
What can I do to get my bootloader installed?

Last edited by PeterOpenSource (2019-10-22 18:31:25)

#2 2019-10-22 06:44:58

Re: Grub install not possible [SOLVED]

there’s not much info to start with.

you say you followed the wiki, but which commands, aside from grub-install, did you issue before getting this error?

this error usually means you’re not running the command from within chroot.

Failure is success in progress.
A.E.

#3 2019-10-22 08:20:04

Re: Grub install not possible [SOLVED]

Please provide more output and information about commands and env

#4 2019-10-22 14:52:00

Re: Grub install not possible [SOLVED]

Particularly this section..

Make sure you have the «which» package installed, along with os-prober and ntfs-3g before you install grub.

Grub gets installed to the drive e.g. «sda» NOT a partition e.g. «sda1″(your actual drive and partition info may vary).

Last edited by Zod (2019-10-22 15:12:42)

#5 2019-10-22 17:40:06

Re: Grub install not possible [SOLVED]

Thanks everybody. Yes, it was a chroot mistake. And thanks, Zod!

#6 2019-10-22 18:29:33

Re: Grub install not possible [SOLVED]

Please remember to mark your thread as solved by editing the first post and amending the topic title.

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Источник

Arch Linux

You are not logged in.

#1 2019-01-07 21:20:37

[SOLVED] grub-install: error: failed to get canonical path of `/efi´.

I’m installing from archlinux-2019.01.01-x86_64.iso on an UEFI system and following the Installation guide down to the «Partition the disks» section and expected to pick up these instructions again at the start of the «Installation» section after following dm-crypt/Encrypting an entire system section Encrypted boot partition (GRUB) to set up encryption which goes fine until I get to the «Configuring GRUB» section where I get an error.

I think I have followed the instructions correctly.

Here are all the commands I’ve run so far and some notes on the filesystems.

This is the error the last command spits out:

I was thinking that maybe it was supposed to be /mnt/efi instead but that just gives:

Any idea where I went wrong or is it the wiki that’s wrong?

Last edited by BearerOfHonesty (2019-01-08 07:01:33)

#2 2019-01-07 21:39:39

Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.

Apparently, grub-install tries to do something with the root filesystem (airootfs).

Try running the command from within the chroot after having installed base and grub (the package).

Last edited by respiranto (2019-01-07 21:40:44)

#3 2019-01-07 21:43:47

Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.

When should I be doing that and is the system even ready for that yet? Comparing the two sets of instructions it doesn’t look like I’ve gotten far enough in the instructions for setting up encryption to where the normal installation instructions expect me to chroot which is why I haven’t tried yet.

#4 2019-01-07 22:38:08

Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.

You should be ready to run pacstrap and then arch-chroot.

Don’t forget to change the mkinitcpio.conf inside the chroot.

#5 2019-01-08 02:47:15

Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.

That seems to work.

With all the juggling around of the order of things to do in the two guides, have I made any obvious errors in the following commands? This includes redoing the last two sections in the original post in a different order but otherwise continues from there and seems to work other than that I still have to enter the passphrase twice, and it uses a US keymap rather than a Danish one for the first of those prompts, but these are at least obvious problems that are easy enough to work on, I’m more worried about having done something wrong that’s non-obvious.

Last edited by BearerOfHonesty (2019-01-08 03:09:00)

#6 2019-01-08 06:52:39

Re: [SOLVED] grub-install: error: failed to get canonical path of `/efi´.

Great that it works now. Please prepend ‘[SOLVED]’ to your thread’s title by editing the first post, unless you believe there are (serious) issues remaining.

Your list of commands looks generally fine. Some points:

You run grub-mkconfig twice. The second time suffices (though it does not at all harm to run it twice).

You install grub in both UEFI and BIOS mode. I’m not sure if that is what you want. There are good possible reasons though and in fact I had such a setup myself in the past.

You might consider not relying on grub-mkconfig, see [0] and the possibly generated the grub.cfg.

In order to prevent entering the password twice, see [1].

I didn’t know about umount’s -R option. Thanks for that. Unmounting explicitly before rebooting (or shutting down) is not necessary though.

Источник

Сломал граб

Покурил арчвики Уефи, ефи-раздел sda1 Сделал

Перейти на systemd-bood

а разве не /efi в параметре ефи директори?

так а ты попробуй, мож опечатка

Тот же самый результат, та же ошибка, ток вместо esp /efi

как то ты поперёк ман читаешь, там же написано что нужно создать /есп/ефи

я использую refind (тоже арчик), потому точно не подскажу. единственное, что в —efi-directory= , ты должен указать путь к директории с прошивкой. у меня выглядит так:

Да, щас вот допер и сделал все как вы озвучили. Теперь

«esp» там не зря курсивом написан, ты должен вставить вместо него точку монтирования, а не тупо копипастить, в твоём случае это /esp. Вообще esp монтируют обычно не туда, куда ты. См https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points

При правильном указании директории ошибка та же, только airootfs

Grub-install: error: failed to get canonical path of «airootfs»

Видимо, граб не может получить какие-то переменные окружение. Попробуй всё примонтировать и повторить уже в чруте (сначала arch-chroot).

Ты пытаешься поставить груб не примонтировав корень или не чрутнувшись в него

то есть мне в /esp запихать корневой раздел, потом в /esp/efi запихать ефи и chroot /esp?

Нет, в вики же все расписано. Монтируешь корень в /mnt арчрут в /mnt потом монтируешь ефи раздел в /efi или если так хочешь в /esp и ставишь груб

Запись в ефи есть теперь, но при загрузке minimal bash-like line

Прими пургена, может полегчает

Я просто пишу grub-install /dev/nvme0n1 . ESP смонтирован в /boot/efi.

grub-mkconfig -o /boot/grub/grub.cfg

Ага, только он никакие оси не находит. Просто done и все

Если б так просто. Я уже за вечер весь мозг себе вытрахал этим грабли, самому смешно аж

да чтож такое а. чрут сделал? ефи примонтировал? ядро в бут лежит? как не видит, елки-палки, ты что-то делаешь не так.

забей на груб и всего делов. используй efistub!

А ты оспробер поставил , чтоб он находил? С таким чтением вики ты и ядро мог не поставить. Читай еще раз русскую вики по грубу, там все расписано. И можешь загрузить арч и из своего груба вручную, конечно если ядро поставил. В вики даны команды консоли груба.

os-prober тут при чем?

Чё делал sudo mount /dev/sda5 /mnt Chroot /mnt Sudo mount /dev/sda1 /mnt/efi Sudo grub-install Sudo update-grub С телефа чет коды не работают, сорян за такую пасту

Арчем я уже пользуюсь недели 3, так что ядро там стоит 🙂

короче… надо как-то так:

Ну а конфиг груба кто генерировать будет, еще раз прочти вики. И если не можешь простейшие действия по вики повторить, арч пока рано

Чтоб другие оси находил. Но ТС и основной конфиг не сгенерировал

В арче есть arch-chroot он сам монтирует proc run и прочее

sudo shred /dev/sda тебе поможет, но это не точно.

ну и пусть будет. новичку лучше мотировать все ручками, потом пригодиться.

Да чё рано, как будто если я запорю граб на убунте то его будет проще восстановить. Поставил арч как-то, юзаю, прикольно

Ну так читать тогда и читать вики, установка груба из лайва арча четыре команды подряд. А ты и в них запутался.

Именно так просто работает в Ubuntu и Debian.

Размахивать —rbind ни к чему, это даст только неудобства с отмонтированием /dev/pts/. /sys/firmware тут тоже само подтянется.

У тебя boot не отдельным разделом случайно?

в первом же комменте лучшее решение, чем systemd-boot не подходит?

Я хз как его из под лайва поставить, в Вики ч так понял для рабочей системы

Хм, я когда арч ставил то боялся угрохать все другие записи в ефи разделе и создал отдельный, туда и поставил граб, все работало, однако сейчас поставил граб в ефи и нифига

sudo mount /dev/sda5 /mnt Chroot /mnt Sudo mount /dev/sda1 /mnt/efi

Это совсем плохо.

Если boot отдельным разделом то и его монтировать надо. Смотри русскую вики арча груб, там очень хорошо расписан порядок и действия

chroot и bootctl install, не забудь удалить grub

Источник

Arch Linux

You are not logged in.

#1 2019-08-16 21:55:37

[Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

I am a noob. I’m following the installation guide here: https://wiki.archlinux.org/index.php/Installation_guide
I completed the install with no errors, but when I reboot my machine, it is unable to find an operating system on my drive.
I checked the BIOS to ensure that I am in LEGACY mode, that the hard drive is set to boot before the CD, and that the CD
is no longer in the drive once I rebooted after the install. I am using a Lenovo H50-55.

I started by partitioning the drive like so:

Then, I made the filesystems:

Then, mounted them:

Then, I ran some commands to set up wi-fi. I’ve excluded them here but can provide if need.
Next, I installed the base system:and generated the fstab

Then I set up timezones

Then I edited /etc/locale.conf and ran locale-gen.
After than I added my hostname and set up the hosts file.

Then, i TRIED to run this command:

But I received this error:

grub-install: error: failed to get canonical path of `airootfs´

I did some research online and dicovered I needed to chroot into the system. So i performed:

and was then able to perform these commands successfully:

I then set the root password with passwd.
and ran pacman -Syu to see if i needed to update, but it said «nothing to do».
At this point, I believed that I had completed the install, so I reboot and took the cd out of the disc drive; however,
I now am unable to load an operating system. There is no operating system found on my hard drive so the BIOS drops down to my Realtek Network
and coughs up an error about PXI-E. I know the hard drive is just fine as I had a windows install on there just a few hours ago and have
not messed with the hardware at all. I’m a novice, so I could be way off, but my suspicion is that I did not install grub correctly to point to root.
Thanks in advance for any help!

UPDATE: I discovered that I am apparently able to boot the system if I use the CD and select ‘Exsting OS’ instead of the installation media. But I am not able to boot without the CD

Last edited by pirateprentice (2019-08-21 00:03:00)

Источник

Contents

  1. Disk partitioning and mounting
  2. Install the base packages
  3. Boot Loader
  4. parted tips

This is not easy. Mostly followed Installation guide, on a Hyper-V v2 VM.
Hyper-V v2 has EFI enabled, so follow corresponding instructions.

Disk partitioning and mounting

Requires two partitions, an EFI partition and a main partition. EFI partiion
is a FAT32 partition. Used parted.

Follow UEFI/GPT example for parted:

(parted) mkpart ESP fat32 1MiB 513MiB
(parted) set 1 boot on
(parted) mkpart primary ext4 513MiB 100%
(parted) quit

See parted tips.

From console:

mkfs.ext4 /dev/sdxY
mkfs.fat -F32 /dev/sdxY

Then mount them:

mount /dev/sdxY /mnt          # this is the primary root
mkdir /mnt/boot
mount /dev/sdxY /mnt/boot     # this is the EFI partition

Install the base packages

pacstrap /mnt base

Note this must be done after mounting /mnt and /mnt/boot, as it installs
essentials like vmlinux, initramfs, etc. into /mnt/boot.

Boot Loader

This is hard. I tried GRUB with EFI first, it failed on me
1. I then used systemd-boot which worked
eventually.

Note: do all these before chroot to /mnt, otherwise you don’t have
the necessary executables.

First install binaries into EFI partition (/mnt/boot folder):

bootctl --path=esp install

Then add an entries to /mnt/boot/loader/entries, and configure
/mnt/boot/loader/loader.conf to point to the new entry.

Add a new entry at /mnt/boot/loader/entries/arch.conf with content:

title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img
options        root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 rw

Replace the PARTUUID with the primary partition’s GPT partition UUID. You
can find it with blkid:

# blkid
/dev/sda1: UUID="xxxx-xxxx" TYPE="vfat" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxx..."
/dev/sda2: UUID="333db32c-b91e-41da-86c7-801c88059660" TYPE="ext4" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxx..."

Note: use PARTUUID, NOT UUID.

parted tips

Run parted with -a optimal so misalignment are warned. But I cannot get
partitions to properly aligned and used «Ignore» when creating partitions 2.

  • at command line use fdisk -l to see all disks and partitions

  • use h <command> for help

  • use p or p all to list partitions and disks

  • use mklabel to make a new partition table for a disk — this destroyes old
    table. E.g., mklabel gpt to create a GPT partition table. mklabel msdos to create a msdos or (maybe) MBR partition table.

  • use mkpart to make new partition on a disk with partition table.

    • the start/end supports unit postfix, like MiB, MB, etc. A negative
      number counts from the end (-120MiB). Also percentage can be used
      (100%).
  • use resizepart to resize a partition

Note After running parted, you’ll need to run mkfs.xxx to format the
newly created partitions.


1: grub-install failed with: «error: failed to get canonical path of ‘airootfs'»

2: per doc, use percentage notation so it auto-align for you

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Grub install error embedding is not possible but this is required for cross disk install
  • Grub install error efibootmgr not found
  • Grub install error efibootmgr failed to register the boot entry no such file or directory
  • Grub install error disk mduuid not found
  • Grub install error disk md0 not found

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии