I'm trying to install 64-bit Debian stable on a Lenovo Thinkpad. When I get to the installation step that installs the bootloader, I get this message:An installation step failed. You can try running the failing item again from the menu, or skip it and choose something else. The failing step is: Install the GRUB boot loader on a hard diskGoing back to the menu and selecting LILO gives me the same error. The installation log saysMay  1 13:24:23 main-menu[188]: WARNING **: Configuring 'grub-installer' failed with error code 1May  1 13:24:23 main-menu[188]: WARNING **: Menu item 'grub-installer' failed.May  1 13:24:28 main-menu[188]: INFO: Menu item 'lilo-installer' selectedMay  1 13:24:28 main-menu[188]: WARNING **: Unable to set title for fdisk-udeb.May  1 13:24:28 main-menu[188]: WARNING **: Configuring 'lilo-installer' failed with error code 1May  1 13:24:28 main-menu[188]: WARNING **: Menu item 'lilo-installer' failed.I'm not using LVM or RAID. So far, I've triedDisabling UEFI boot and using legacy boot instead. The error still occurs, with both GRUB and LILO.Following the instructions on this question and runningparted /dev/nvme01set 1 bios_grub onfrom TTY2, but I get an error that says parted not found. On my system /dev/nvme01 is the only hard diskCheck for hardware errors. When I first purchased the system I ran all the available hardware tests, both from within the BIOS and from within Windows, and it passed all of them. I'm assuming that means the hardware isn't malfunctioning.Per this thread that had a similar error, albeit with LVM, I tried redoing the partitioning with a small /boot partition at the beginning, formatted with ext2. Same error.Switching to TTY4 to look at the installation output, I also see the errorchroot: can't execute 'grub-probe': No such file or directorySearching for information on that turns up this thread and this bug report related to GRUB, but a) those are old, and b) I've run through the installation up to this point over a dozen times now and I get the error every time, so it doesn't seem like a one-off thing.I've used Gparted to check that the hard disk is completely empty.Secure boot is disabled in the BIOS.I've run the installation using the full DVD and the netinstall CD; both are booted from USB, but the problem persists.I was able to successfully create an msdos partition table and three partitions (for /, /home, and swap) on the drive in the previous installation step, so I don't know why GRUB suddenly can't write to the drive.How do I fix this and get Debian installed? As of now, the (brand new!) system is completely unusable because I can't get an OS on it.Could part of the problem be that Debian/parted recognizes the disk incorrectly? It says the disk is 512.1 GB, which is true in the sense that the specs say 512 GB and that's what is advertised, and it will let me allocate all 512 GB to various partitions. However, if I load it in Gparted, the actual disk space is closer to 476 GB, but I assumed that's just the usual 1024 vs 1000 stuff.(I also posted a version of this question on the Debian forums, so I'll update my question with anything important from that thread and vice versa.)
GRUB and LILO both fail to install to NVMe hard disk when installing Debian
debian;system installation;grub2;hard disk;lilo
Here is what worked for me, using Debian jessie (stable). I basically took the instructions from this wiki post, and stripped out all the steps about dual-booting with Windows, since those didn't apply to my case.In the BIOS, set UEFI only boot.Using Gparted, create a FAT32 partition at the beginning of the disk with the boot and esp flags. (The Debian installer should be able to do this too, but since the installer incorrectly recognized the size of the disk, I prefer to use Gparted). In my case, the FAT32 partition is /dev/nvme0n1p1.During the installation, make sure you have a network connection configured (manually or automatically, doesn't matter). Otherwise, the next step will fail.At the installation stage where GRUB fails to install, open a shell and run the following commands:mount --bind /dev /target/devmount --bind /dev/pts /target/dev/ptsmount --bind /proc /target/procmount --bind /sys /target/syscp /etc/resolv.conf /target/etcchroot /target /bin/bashaptitude updateaptitude install grub-efi-amd64update-grubgrub-install --target=x86_64-efi /dev/nvme0n1Exit the shell and select Continue without installing a bootloader. You'll see a warning message that gives you boot commands to use; you can ignore this.Once the installation completes, boot into the system. Add nvme to /etc/initramfs-tools/modules, then run update-initramfs -u as root.Edit /etc/default/grub and add this lineGRUB_CMDLINE_LINUX=intel_pstate=no_hwpand add nomodeset to the GRUB_CMDLINE_LINUX_DEFAULT so it looks like this:GRUB_CMDLINE_LINUX_DEFAULT=quiet nomodesetRun update-grub.The last few commands (initramfs onward) are necessary to prevent disk not found errors the second time you try to boot into the new system.