Ubuntu ошибка установки grub

  • Печать

Страницы: [1] 2  Все   Вниз

Тема: Ubuntu 16.04 Не удалось установить GRUB.  (Прочитано 11842 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
SergPro

На форуме не нашёл такой проблемы, надеюсь правильно создал тему.
Устанавливаю Ubuntu 16.04 рядом с Виндовс 10. Разметил диски и т.п. Но после всей установки вылетает окошко с «Не удалось установить GRUB» Как бы мне эту проблему решить. Второй день мучаюсь. Надеюсь на помощь. Спасибо за ранее.


ТС не появлялся на Форуме более полугода по состоянию на 14/07/2019 (последняя явка: 16/04/2017). Модератором раздела принято решение закрыть тему.
—zg_nico

« Последнее редактирование: 14 Июля 2019, 03:09:21 от zg_nico »


Оффлайн
viktor ne perestukin

 Уточни пожалуйста — «Не удалось установить GRUB» во время установки с Live или после установки


Оффлайн
SergPro

После установки выдаёт это сообщение.


quatro


Оффлайн
SergPro

Да, после установки вылетает ошибка с GRUB.


Пользователь добавил сообщение 01 Ноября 2016, 22:23:54:


Только у меня почему-то нету раздела ESP и отформатированного в FAT32.(для корректной установки)

« Последнее редактирование: 01 Ноября 2016, 22:23:54 от SergPro »


Оффлайн
Дюшик

Только у меня почему-то нету раздела ESP и отформатированного в FAT32.(для корректной установки)

Загрузитесь с установочного носителя Ubuntu и покажите вывод команды

sudo parted -l
или скрин с разделами из Gparted.
Или загрузитесь в 10-ку, в строке поиска введите diskmgmt.msc -> OK, сделайте скрин открывшегося окна с разделами диска и покажите скрин.


Оффлайн
SergPro

« Последнее редактирование: 03 Ноября 2016, 18:17:46 от SergPro »


Оффлайн
mahinist


Оффлайн
Дюшик

SergPro,
У вас «простая» разметка диска — MBR. Раздел ESP вам не нужен. Во время установки Ubuntu, вы случайно GRUB устанавливаете не раздел? (и возможно Виндовый). В процессе установки Ubuntu проверьте/установите GRUB на жесткий диск (/dev/sda, а не на /dev/sda1…4). 


Оффлайн
SergPro

а как Граб поставить туда,куда нужно.? галочку поставить?


Пользователь добавил сообщение 03 Ноября 2016, 20:03:27:


процессе установки Ubuntu проверьте/установите GRUB на жесткий диск (/dev/sda, а не на /dev/sda1…4).

Т.е. внизу будет «Устройство для установки системного загрузчика»
тут и выбираем /dev/sda     ?

P.S. по умолчанию у меня было /dev/sda


Пользователь добавил сообщение 03 Ноября 2016, 22:51:46:


На старый нетбук 2009 года установился без проблем (рядом с Виндовс 8.1)
А на современный 2015 года рядом с Виндовс 10 не ставится. Буду разбираться.
Нужна помощь.

« Последнее редактирование: 03 Ноября 2016, 22:51:46 от SergPro »


Оффлайн
Дюшик

SergPro,
Возможно вы неправильно загружаетесь с установочной флешки (если устанавливаете с флешки, вы не написАли).
1. Если у вас есть выбор загрузочной флешки, например

UEFI: Kinston 4 GB
Kingston 4 GB

то выбирайте флешку без префикса UEFI.

2. Если первого варианта нет, то зайдите в UEFI-BIOS и поищите параметр типа Boot mode и в нём проверьте/поставьте Legacy only или Legacy first. Всё это может называться по-разному, т.к. UEFI-BIOS очень разные. Вообщем вам нужно режим загрузки сделать строго Legacy (CSM и т.п.).
После выполнения первого или второго пунктов, загрузиться с установочной флешки и попробовать установить GRUB
а) вручную

sudo mount /dev/sdaX /mnt     - где Х цифра раздела с Ubuntu
sudo grub-install --root-directory=/mnt /dev/sda

б) через Boot repair https://help.ubuntu.ru/wiki/boot_repair
в) через Grub Customizer https://help.ubuntu.ru/wiki/grub_customizer

Если всё вышепредложеное «мимо», то можно временно организовать загрузку Ubuntu через Виндовый загрузчик с помощью EasyBCD https://forum.ubuntu.ru/index.php?topic=283187.msg2231636#msg2231636. Потом загрузиться в Ubuntu и пробовать установить GRUB из Ubuntu

sudo grub-install /dev/sda

дальше по результатам.


Оффлайн
SergPro


Оффлайн
Дюшик

SergPro,
Моё ИМХО. Отделльный раздел boot не нужен и проблему он не решит. Но если вы хотите попробовать установку с разделом boot, то можете поэксперементировать. Моё мнение, что нужно сначала попробовать правильно загрузится с флешки и посмотреть, что получится. Ещё один вариант, который вы можете попробовать, это записать флешку через программу Rufus с настройкой MBR для компьютеров с BIOS и UEFI и установить систему. Есть ещё одна возможная, но маловероятная причина, чтобы её исключить нужен с установочной флешки Ubuntu, вывод команд

sudo parted -l
или
sudo fdisk -l


quatro

SergPro, на старый ноут легко поставил, а на новый не получается?

Так ведь Виндовс-10, а её просто так на диск с разметкой mbr поставить нельзя.Значит либо gpt у тебя, либо Виндовс установлена специальным сложным образом. Какая у тебя разметка? Начни с выяснения этого:

Есть ещё одна возможная, но маловероятная причина, чтобы её исключить нужен с установочной флешки Ubuntu, вывод команд

Код: [Выделить]

sudo parted -l
или
sudo fdisk -l

Вот эту причину считаю наиболее вероятной: незнание того какая разметка диска и из-за этого неправильный способ установки.


Оффлайн
Дюшик

anchos,
Про разметку диска сказано в посте №8. 10-ка на MBR диск устанавливается без проблем.


  • Печать

Страницы: [1] 2  Все   Вверх

I recently bought a shiny new Lenovo Yoga 2 Pro and I want to dual boot it with Ubuntu for studying purposes. Its built-in OS is Windows 8.1 and it has a 256GB SSD.

I’ve made a separate 90GB partition just for Ubuntu and a live USB to install it.

The first time everything seemed to work great, I solved the wifi issued by blacklisting ideapad_laptop, the installation went flawlessly and Ubuntu worked fine.

When I got up the next morning and turned on my laptop it booted into Windows right away without ever showing the GRUB menu. So I tried to reset, and checked my partitions with the Disk Manager and everything looked fine. Since I couldn’t find a solution online I went ahead and formatted the partition to try and install again. This time and every time since, the installation was aborted and I got a fatal error saying:

Unable to install GRUB in /dev/sda
Executing `grub-install /dev/sda` failed.
This is a fatal error.

Can anyone please suggest a solution to this problem?
If any further information is needed I would be happy to provide it.
Thanks.

When installing I get the following in details:

ubuntu kernel: [ 1946.372741] FAT-fs (sda2): error, fat_get_cluster: invalid cluster chain (i_pos 0).
ubuntu grub-installer: error: Running 'grub-install --force failed.

Braiam's user avatar

Braiam

66.7k30 gold badges176 silver badges264 bronze badges

asked May 2, 2014 at 16:56

vicban3d's user avatar

3

I just had this problem installing Ubuntu 14.04 from a USB stick to a hard drive.

The problem was the USB stick was /dev/sda, installing to the hard drive /dev/sdb

Even though the installer knew to install to /dev/sdb, it then tried to install grub to the MBR on /dev/sda, and failed. The workaround was to go back to the menu, try again, say NO to automatically install to MBR of first hard drive and manually tell it /dev/sdb.

Then everything worked.

Zanna's user avatar

Zanna

69k56 gold badges215 silver badges327 bronze badges

answered Jan 9, 2015 at 5:16

dricket's user avatar

dricketdricket

3593 silver badges2 bronze badges

7

I finally got it working, not sure which of the following did the trick but I:

  1. Disabled Lenovo Fast Boot in BIOS.
  2. Disabled Secure Boot in BIOS.
  3. Booted from Live USB.
  4. In boot menu Added backlight=vendor in Try Ubuntu configuration text just before quiet splash.
  5. Chose Try Ubuntu.
  6. In terminal ran sudo rmmod ideapad_laptop to enable wifi.
  7. Ran installation and chose to install updates during installation.
  8. EFI partition was selected automatically so I assigned 9700MB for swap space and 80GB for Ubuntu.
  9. After installation completed added backlight=vendor to /etc/default/grub before quiet splash and then ran sudo update-grub.
  10. Blacklisted ideapad_laptop to enable wifi.
  11. Works fine so far. Thanks to everyone for the help!

Zanna's user avatar

Zanna

69k56 gold badges215 silver badges327 bronze badges

answered May 10, 2014 at 7:55

vicban3d's user avatar

vicban3dvicban3d

7562 gold badges7 silver badges12 bronze badges

I got the same error while installing Ubuntu 20.04. Turned out that I had created «logical» instead of «primary» partitions during the installation process for both my EFI and root partition. I ran the installation again, this time configuring both partitions as a «primary» partition, and the error was gone this time.

answered Apr 27, 2020 at 16:33

Erik van den Hoorn's user avatar

3

I had a similar problem. What I did was to leave the installation as it was, then I made sure my drive was in UEFI mode and booted from a live CD and installed boot-repair.

To do this I had to add the yannubuntu repository and then download it with apt-get. This was done the following way:

sudo apt-add-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair
boot-repair

Then, when the program was launched, I checked all the options in Advanced Options > Main Options and clicked Apply.

Zanna's user avatar

Zanna

69k56 gold badges215 silver badges327 bronze badges

answered Feb 4, 2016 at 20:55

Mario Becerra's user avatar

1

I had this issue when installing Ubuntu (not dual-boot) in my new build. None of the boot options described above would work for me.

I had to disconnect my SSD and all USB devices so that Ubuntu would only recognize the 1T HDD for installation.

Zanna's user avatar

Zanna

69k56 gold badges215 silver badges327 bronze badges

answered Dec 13, 2015 at 13:46

Michael's user avatar

1

I don’t have a Lenovo Yoga but I had the same issue on my desktop.
It has SSD and HDD drivers, it was listed like this:

SATA#1 HDD /dev/sda
SATA#2 SSD /dev/sdb

As always I’m trying to install the OS on my SSD. The installer is installing Ubuntu (or Linux Mint) on /dev/sdb but then is trying to install GRUB on /dev/sda. That is a problem.

The solution was to swap the SATA connections, like this:

SATA#1 SSD /dev/sda
SATA#2 HDD /dev/sdb

answered Jun 24, 2018 at 16:49

megas's user avatar

megasmegas

2,5177 gold badges27 silver badges35 bronze badges

  1. Check installation media for corruption
  2. Check BIOS and disable Secure boot
  3. Disable Lenovo fast boot

I assume you are installing in UEFI mode, so it might be nescessary to unlock System lock in BIOS. If neither works, I would assume that problem lies in dual boot. I myself am running Ubuntu on Y2P as I type without any problems.

As for blacklisting ideapad_laptop module, you may want to check github.com/pfps/yoga-laptop, as there are some Y2P specific drivers. Still work in progres tho.

answered May 2, 2014 at 17:32

Buri's user avatar

BuriBuri

112 bronze badges

1

Ran into this very issue while installing on a Poweredge with scsi raid. I found that pulling out the USB drive prior to installing GRUB did the trick.

answered Aug 21, 2015 at 16:04

Dana's user avatar

1

I have the same laptop and for me everything works fine — but I installed the grub loader into the already existing EFI partition, which had the index 2 at the end of its name — it certainly wasn’t the sda partition though, which was chosen by default. (So I chose my partition for installation above and below, there was the possibility to change the partition for grub installation.)
I used an SD card for installation and started it in UEFI mode, because Windows 8.1 was pre-installed that way, too. (I’m sorry if I’m expressing this in a wrong way, but I only know about all this from reading in different forums before installing Ubuntu 14.04 about three days ago.)
Anyway, everything works fine if you do it this way. Start installation medium in UEFI mode, choose the partition freed for the installation, install grub into the existing EFI partition.

Oh, and also, I didn’t really have to change anything in the BIOS, I had disabled fast boot before and left it that way. It automatically changed something else, I can look that up again, if you want to know.

answered May 10, 2014 at 7:26

menow's user avatar

menowmenow

1191 bronze badge

I had a plethora of devices on a bare install and got this on 12.04 (last alternate manual install). Rather than track down where you specify to GRUB, I just acquiesced and moved the boot SSD to the sata-0 port so it would show up as sda.

answered Nov 30, 2015 at 15:14

cowardlydragon's user avatar

1

This problem occured when i tried to give new life to my VERY old hp pavilion dm4. It said it couldn’t install grub and none of the buttons to do anything worked. I freaked out, and force shutdown my computer in the MIDDLE of installation. Luckily, I was able to boot on to the pen drive again. I later figured out that the pen drive had been pulled out a little bit, causing the installer to go nuts. It turned out for me it was a really simple little solution.

edwinksl's user avatar

edwinksl

23.5k16 gold badges74 silver badges100 bronze badges

answered Aug 9, 2016 at 4:37

Sourav Mahanty's user avatar

I had the same problem when installing Ubuntu 15.10 desktop (dual boot on separate partition in Lenovo G40-45 laptop where Windows 10 is already installed and activated).

I had already disabled secure boot (as per my earlier experiences with dual boot — Linux and Windows).

Finally I decided that I would try with secure boot enabled (as I expected things to have improved since 14.xx). AND IT WORKED!!! — without any other adjustments (and without internet connection).

(I installed Windows 10 while secure boot was disabled and then installed Ubuntu with secure boot enabled).

Zanna's user avatar

Zanna

69k56 gold badges215 silver badges327 bronze badges

answered Nov 11, 2015 at 16:43

Anisetty Jaya Venkata Prasad's user avatar

1

It can’t be /dev/sda itself, it have to be some partiton of it. As usual windows make one NTFS, one recovery and one UEFI for boot parition. We have to first identify this UEFI boot partition as to get dual boot working.

My bios is of ASRock. This is how I was able to make it grub install for dual booting.

I think issue was I was trying to use just usb as bootable in the bootable drive options.
Once I chose usb uefi as bootable, I saw immediate change in partitions seen on parition layout GUI.

I was able to see uefi windows boot manager partition at /dev/sda2, (which I identified from windows disk partitons as the one with EFI layout), this was not shown when I was choosing usb without uefi option as bootable drive. I chose this uefi partition as boot partition for my install.

After that grub installed on windows boot manager partition and it and dual boot started working.

answered Mar 1, 2020 at 15:58

mrigendra's user avatar

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

В какой-то момент установки вылетает окно со словами: «Не удалось выполнить команду ‘grub-install/dev/sda2. Это неисправимая ошибка.'»:

Не удалось выполнить команду 'grub-install/dev/sda2. Это неисправимая ошибка

Потом 2 окна, что установка завершена, и что программа установки аварийно завершена. Потом ещё одно окно с заголовком: «Installation failed», и текстом: «The installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the problem or try installing again».

При повторной установке всё то же.

Если кому-то внесёт ясность какая структура дисков моего ноутбука, то вот:

структура дисков

  • Красным выделен тот раздел, куда я намерен установить убунту;
  • Если я ничего не попутал, то: sda4 — диск C, sda7 — диск D, sda8 — то место, куда я хочу поставить убунту.

Да, я искал решения. Например, есть такой ответ: https://askubuntu.com/a/571582. Возможно, это решение, но я его даже с переводчиком не понял :( .

Если нужны ещё какие-то данные, то уточняйте, я сделаю апдейт вопроса.

UPD1. Попробовал установить grub не в sda2, а в sda — всё то же, прерывается на том же месте.

I’m installing Ubuntu 18.04 LTS on a Dell Inspiron 5559 with 1 TB HDD where WIndows 10 is already installed, hence it’s a dual boot. I have set up a Ubuntu bootable USB drive and booted Ubuntu in UEFI mode from it. I have disabled secure boot, fast boot and created suitable partitions on Windows already.

The installation starts smoothly but fails again and again with the message «unable to install GRUB on dev/sda1» and says that it is a «fatal error». /dev/sda1 is the EFI boot partition (ESP partition) on my HDD to which Windows Boot Manager is installed. I had read that GRUB bootloader must be installed to that partition.

I am somewhat certain (but not completely) that the Ubuntu OS installed perfectly and the problem cropped up only in the GRUB installation, since whenever I try to re-install, the setup wizard says that «this computer has Windows 10 and Ubuntu 18.04 LTS on it» and gives the option to «Erase Ubuntu 18.04 LTS and re-install», which would only be possible if Ubuntu was already installed.

I have tried boot-repair, which says that that there was an error during repair due to which it could not be completed. Pastebin : http://paste.ubuntu.com/p/J3dk2YGBqG/

I’m a complete newbie at Linux/Ubuntu and would be grateful if anyone can provide a solution to this problem.

NVram Locked sounds like there might be some problems writing into the UEFI NVRAM variables, which are accessible in Linux via /sys/firmware/efivars or using the efibootmgr tool.

If you are accessing the failed installation by mounting it under /mnt/chrootdir and chrooting into it as suggested in answers to the AskUbuntu question you linked, I would suggest using mount --rbind instead of mount --bind for both /dev and /sys, as both include separate sub-filesystems that can be important for grub-install functionality:

  • if /dev/pts is not available in the chrooted environment, it would cause the unable to allocate pty: No such device error
  • if /sys/firmware/efi/efivars is not available in the chrooted environment, it would cause the attempts to write into UEFI NVRAM variables to fail… which is exactly your primary issue.

But if this does not help, you might want to read this excellent webpage by Roderick W. Smith, which explains certain problems other OSs or buggy UEFI firmware implementations can cause, and gives methods for working around them.

On your sda1 disk, there is apparently a efi/ubuntu/grub.cfg file, with the following contents:

search.fs_uuid 2D07-0F0A root hd0,gpt1 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

This seems incorrect: it is looking for the ESP partition (sda1) by filesystem UUID, and then assuming it should be a Linux root filesystem that contains /boot/grub… which is not true, as sda1 is the UEFI ESP, not the Linux root filesystem.

That file should instead have the following contents:

search.fs_uuid 25f0e88-f20a-4350-9df0-ee8c57ecc455 root hd0,gpt2
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

You might want to copy this efi/ubuntu/grub.cfg to efi/BOOT/grub.cfg (also on sda1) too, to allow GRUB to find a valid configuration even if started as efi/BOOT/BOOTx64.efi.

This configuration file would cause the grubx64.efi on the ESP to seek the real Ubuntu root partition (sda2) by filesystem UUID, and then load any necessary GRUB modules from there, and also load the true GRUB configuration from /boot/grub/grub.cfg on sda2.

You might also want to copy efi/ubuntu/grubx64.efi into efi/BOOT/grubx64.efi on sda1, to ensure the full set of boot files are also available on the UEFI fallback/removable media boot path.

This part of the boot-repair output is actually produced by efibootmgr -v:

BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0004
Boot0003* UEFI: TOSHIBA TransMemory 1.00    PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(2,GPT,9240a165-d190-4ab6-8a12-46dc207b42ee,0x71e8a0,0x2130)..BO
Boot0004* UEFI: ST2000DM001-1ER164  HD(1,GPT,22c1dbaf-a26e-4408-a6f9-d1fc06b0d615,0x800,0x100000)/File(EFIbootbootx64.efi)..BO

It indicates that although you’ve currently booted from USB, your system firmware is prepared to boot from sda1 (identified by PARTUUID 2c1dbaf-a26e-4408-a6f9-d1fc06b0d615 using the file fallback/removable media boot path EFI/boot/bootx64.efi (the filesystem on ESP is vfat, so it should be case-insensitive… but some UEFI firmware implementations aren’t). So if you can perform the above-mentioned changes to the ESP, the system might be able to boot from sda1.

If you can get a regular Ubuntu system running in UEFI mode, you could retry sudo grub-install /dev/sda to rewrite the bootloader and automatically re-write the NVRAM boot variable for Ubuntu. Or alternatively, you could use the efibootmgr command to try and precision-fix just the boot variable issue yourself:

sudo efibootmgr -c -d /dev/sda -p 1 -l \EFI\ubuntu\grubx64.efi -L Ubuntu 

(This command requires that /dev/sda1 is mounted as /boot/efi and the efivarfs filesystem is mounted at /sys/firmware/efi/efivars. Both of these conditions should be handled automatically by a normal Ubuntu boot process.)

If this still fails with «NVram Locked» or similar, you might have a buggy UEFI implementation, but at least it allows you to boot into Ubuntu by using the fallback/removable media path.

  • Ubuntu ошибка при установке службы общего доступа
  • Ubuntu ошибка при установке пакета
  • Ubuntu ошибка при установке загрузчика
  • Ubuntu ошибка при обновлении временных данных
  • U6 6000 xerox m118 ошибка