0

I want to install Ubuntu Gnome alongside Windows. I made two partitions, one ext4 and one swap partition. For the bootloader I chose the /dev/nvme0n1p1 partition, which is my Windows-EFI-Partition.

At the end of the Installation I get the error:

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

EDIT

partition table is GPT:

Partition Table

lsblk output:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb           8:16   1   104M  1 disk 
└─sdb1        8:17   1 103.8M  1 part /media/ubuntu-gnome/USB-C DOCK
loop0         7:0    0   1.3G  1 loop /rofs
sda           8:0    1  14.5G  0 disk 
└─sda1        8:1    1  14.5G  0 part /cdrom
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p5 259:5    0  12.5G  0 part 
├─nvme0n1p3 259:3    0   185G  0 part 
├─nvme0n1p1 259:1    0   500M  0 part 
├─nvme0n1p6 259:6    0  35.4G  0 part 
├─nvme0n1p4 259:4    0   450M  0 part 
├─nvme0n1p2 259:2    0   128M  0 part 
└─nvme0n1p7 259:7    0   4.6G  0 part

sudo mdadm --detail-platform output:

mdadm: imsm capabilities not found for controller: /sys/devices/pci0000:00/0000:00:17.0 (type SATA)

  • Boot Windows, disable Windows Fast Startup, shutdown and try again: https://www.tenforums.com/tutorials/4189-fast-startup-turn-off-windows-10-a.html –  Dec 20 '16 at 17:14
  • How does your partition table look like? Is it GPT or MBR? Please update with 'lsblk' output – Arijit Chatterjee Dec 20 '16 at 18:17
  • @CelticWarrior Fast Boot was disabled. – cortesis Dec 20 '16 at 19:12
  • 2
    I suspect, but am not 100% positive, that you booted the Ubuntu installer in BIOS/CSM/legacy mode rather than in EFI/UEFI mode. See my page on the subject for why this is easy to do, why it should not be done if you're dual-booting with another EFI-mode OS, and how to correct the problem. – Rod Smith Dec 20 '16 at 19:25
  • @RodSmith legacy mode is diasbled, and the live USB is booted as UEFI: ..... – cortesis Dec 20 '16 at 19:37
  • What brand/model system. Some have needed UEFI update from vendor. to support AHCI. If system is RAID or Intel SRT then an issue. ASUS G752 Can't see SSD NVMe Needed UEFI/BIOS update http://ubuntuforums.org/showthread.php?t=2307273 And you install to the drive like nvme0n1, not to partition that has p1 at end. But with UEFI it should always install to ESP - efi system partition on first drive. – oldfred Dec 20 '16 at 19:59
  • @oldfred It's a Dell XPS-13 9350. UEFI is on AHCI mode (RAID was a earlier problem, the live-system hadn't recognised the SSD). I'tried both, Bootmanager to nvme0n1 and nvme0n1p1, both failed. – cortesis Dec 20 '16 at 20:07
  • What version of Ubuntu? Newer kernel may have some fixes. Kernel 4.6 has Dell & Alienware improvements including 9350 http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.6-Laptop-Drivers and: https://www.reddit.com/r/Dell/comments/3sr1jh/windows_10_clean_install_guide/ and: https://ubuntuforums.org/showthread.php?t=2317843 – oldfred Dec 20 '16 at 20:42
  • @oldfred i'm trying to run Ubuntu Gnome 16.10, which should run on Kernel 4.8 ... – cortesis Dec 20 '16 at 20:46
  • If RAID was on, did you remove RAID meta-data from drives? See what this says. sudo mdadm --detail-platform. Normal SATA drives can remove RAID with dmraid. Do not know if works or needed on NMVe dri ves: http://askubuntu.com/questions/847470/ubuntu-16-04-installer-cant-see-ssd-drive-previously-used-as-raid/847481#847481 – oldfred Dec 20 '16 at 21:21
  • @oldfred it says: mdadm: imsm capabilities not found for controller: /sys/devices/pci0000:00/0000:00:17.0 (type SATA) – cortesis Dec 21 '16 at 16:03
  • Try running the dmraid commands to remove RAID meta-data. If no RAID will not make a difference on install, but may remove data that interferes. – oldfred Dec 21 '16 at 16:35
  • @oldfred sudo dmraid -E -r /dev/nvme0n1 gives me no block devices found – cortesis Dec 21 '16 at 16:59
  • Do not know then what is different. Users do install to that model system. XPS 13 9350 Windows reinstall & discussion of RAID vs. AHCI https://www.reddit.com/r/Dell/comments/3sr1jh/windows_10_clean_install_guide/ Dell Xps 15 9550 Ubuntu 15.10 on new Infinity display (i7 6gen 16gbr UHD 4k touch) post 272 says 16.04 good http://ubuntuforums.org/showthread.php?t=2301071 http://ubuntuforums.org/showthread.php?t=2301071&p=13447241#post13447241 – oldfred Dec 21 '16 at 18:20
  • @oldfred thanks for your help. Today i tried to install another linux, opensuse, to see if also an error occurs. I recieved: '/boot/efi/EFI/opensuse': Read-only file system. Is it possible that this read-only is also the problem when installing ubuntu? – cortesis Dec 22 '16 at 20:55
  • There have been a few users who had ESP's locked. Which is impossible as FAT32 does not work that way. But it must be some corruption in the FAT32 partition. Many were able to either run chkdsk from Windows or sudo dosfsck -t -a -w /dev/sda1 (change if not sda1). Partition must be unmounted, so you probably have to run from live installer. A very few had to backup ESP (good idea anyway), delete partition, recreate new FAT32 with boot flag to make it ESP and restore files. May have to use efibootmgr to add entries back into UEFI as GUIDs have changed. – oldfred Dec 22 '16 at 22:38
  • @oldfred the command sudo dosfsck -t -a -w /dev/nvme0n1p1 doesn't fixes my partition. Can you give me a Instruction (or a link) on how-to delete and restore my EFI Partition? – cortesis Dec 24 '16 at 14:35
  • Basically you just back it up. Delete with gparted. Create new FAT32 partition with boot flag & restore files. You may have to use efibootmgr to add entries & houseclean old entries as GUID will change. – oldfred Dec 24 '16 at 15:29
  • @oldfred thank you very much, i managed it to install Ubuntu with grub, after deleting and recreating my EFI-Partition. – cortesis Dec 29 '16 at 17:00

1 Answers1

3

Just to document FAT32 ESP - efi system partition issues and possible fixes.

First try either chkdsk from Windows or dosfsck from Linux on the ESP - efi system partition which is FAT32 formatted. Where X is drive and Y is partition, often ESP is first partition on sda or sda1. But some new drives are NVMe devices where drive is nvme0n1 and full drive & partition (p1) is /dev/nvme0n1p1.

man dosfsck
sudo /sbin/fsck.vfat -V <the fat32 device>
sudo fsck.vfat -t -a /dev/sdXY # where X is drive and Y is partition.
sudo fsck.vfat -t -a /dev/nvme0n1pY # where Y is ESP partition.

Some cases require full back up of the ESP which is always a good idea before doing anything anyway, deletion of the FAT32 partition with gparted and then use gparted just to recreate it, format as FAT32 and it must have boot flag to make it the ESP. Restore boot files. But you may have to reinstall grub or use efibootmgr to add entries as UEFI uses GUID which new partition will have new GUID.

More info on partitioning:

How to prepare a disk on an EFI based PC for Ubuntu?

See also

man efibootmgr
oldfred
  • 12,100