GRUB and LILO both fail to install to NVMe hard disk

Help with issues regarding installation of Debian

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-07 23:16

It's a live USB, technically. I just unetbootin to get the ISO onto a USB drive. When I run ls /sys/firmware, it just lists
Code: Select all
acpi dmi memmap

I know my machine can boot from an NVMe hard drive; obviously, it came with Windows 10 and booted that just fine.
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby Head_on_a_Stick » 2016-05-07 23:19

Make sure that UEFI is enabled and that "CSM" or "Legacy" mode is disabled in your firmware ("BIOS") menu options.
User avatar
Head_on_a_Stick
 
Posts: 11134
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby Head_on_a_Stick » 2016-05-07 23:22

By the way:
michael_a wrote:I just unetbootin to get the ISO onto a USB drive

*Do not* use unetbootin with Debian ISO images:
https://bugs.debian.org/775689

Use https://www.debian.org/releases/jessie/ ... -isohybrid or https://sourceforge.net/projects/usbwriter/ instead.
User avatar
Head_on_a_Stick
 
Posts: 11134
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-07 23:44

Make sure that UEFI is enabled and that "CSM" or "Legacy" mode is disabled in your firmware ("BIOS") menu options.


The BIOS was set to boot UEFI first, but CSM support was enabled. I disabled it, and now my Ubuntu USB won't boot. To be sure, I remade the USB using dd, but it still doesn't boot with CSM disabled. Which distributions support UEFI booting out of the box that I can use as a live USB? In Debian's rescue mode, efibootmgr isn't found, so I think that's out as a live option. Arch?

*Do not* use unetbootin with Debian ISO images:
https://bugs.debian.org/775689

Use https://www.debian.org/releases/jessie/ ... -isohybrid or https://sourceforge.net/projects/usbwriter/ instead.


For the Debian image, I just used dd from a Linux machine, but the Ubuntu live USB was made from a windows machine using unetbootin or usbwriter (I don't remember). Per the above, though, I remade it using dd.
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby Head_on_a_Stick » 2016-05-07 23:52

michael_a wrote:Arch

^ This.

The Arch live ISO image supports UEFI and already has the `efibootmgr` command installed (along with just about anything else you might need; it even has elinks, a text-mode browser):
https://www.archlinux.org/download/
User avatar
Head_on_a_Stick
 
Posts: 11134
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-08 19:55

Arch looks like my best bet then. Unfortunately, I can't get the USB drive to boot when UEFI-only boot is enabled. I made it from the Arch dual-architecture ISO using dd, but it simply doesn't boot. Unless you have any ideas, I'll try a few different ways of remaking the live USB to see if I can get it to boot; then I can finally run the efibootmgr and actually get the Debian system working.
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby Head_on_a_Stick » 2016-05-09 06:52

michael_a wrote:using dd

That's rather vague, care to share to exact command that you used?

Don't bother with unetbootin, it's a POS and won't work with Arch images.

Are you sure the USB stick isn't faulty?

Can any operating system boot in UEFI mode from a USB stick on your machine?
User avatar
Head_on_a_Stick
 
Posts: 11134
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-09 13:36

Sorry, you're right that that was vague. The dd command was
Code: Select all
dd if=archlinux-2016.05.01-dual.iso of=/dev/sdb1

I've used several different USB drives and get the same result every time, and when I initially bought this machine, I hooked up various USB drives to every USB port and was able to read/write data without trouble (I realize that probably doesn't qualify as a rigorous test). I can boot the Debian image in UEFI mode without trouble (well, trouble installing Grub to the drive, hence this whole thread).
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby Head_on_a_Stick » 2016-05-09 19:36

michael_a wrote:The dd command was
Code: Select all
dd if=archlinux-2016.05.01-dual.iso of=/dev/sdb1

That is the wrong command -- *do not* specify a partition number, target the entire device and flush the buffers afterwards:
Code: Select all
# dd bs=4M if=archlinux-2016.05.01-dual.iso of=/dev/sdb status=progress && sync

https://wiki.archlinux.org/index.php/US ... NU.2FLinux
User avatar
Head_on_a_Stick
 
Posts: 11134
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby kiyop » 2016-05-09 23:22

michael_a wrote:
Code: Select all
dd if=archlinux-2016.05.01-dual.iso of=/dev/sdb1

Somebody made a similar mistake.
Why did you add "1" (partition number)? Is there any web page suggesting so? If there is, please let me know the URL.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 3984
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-10 00:51

Code: Select all
dd bs=4M if=archlinux-2016.05.01-dual.iso of=/dev/sdb status=progress && sync

This gives me an error: "unrecognised operand: status" but if I omit that flag, the command works fine. However, in UEFI mode, the USB boots, but if I select the default menu option ("Arch Linux archiso x86_64 UEFI CD") to boot into the live CD, my system hangs on a black screen. I downloaded the Arch iso from the worldwide Rackspace mirror and verified that the SHA1 checksum is correct. Even hitting control alt delete for a soft reboot doesn't have any effect.

If I disable UEFI boot and enable Legacy Only, then select "Boot Arch Linux (x86_64)" from the non-UEFI menu, it hangs on
Code: Select all
Probing EDD (edd=off to disable)... ok

and once again, control alt delete has no effect. Even though EDD doesn't seem to be the problem (since it looks like it's hanging on whatever the next step is), I tried adding edd=off to the boot option. As expected, it just hangs on a black screen with a blinking cursor.

Unless there's something obvious that I'm missing here, I'm thinking I should just bite the bullet and install Debian with a boot partition on a separate (non-NVMe) USB drive. It's clunky, and I hate having to carry an extra USB drive just to boot my laptop, but right now I haven't been able to get any OS installed and booting on the machine. Not Debian, Arch, Ubuntu, or even Windows 10, so at this point, it's a lightweight, very portable coaster.
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby dotlj » 2016-05-10 08:02

I have a new notebook with NVMe using a Toshiba 128GB which booted nicely from a debian-8.4.0-amd64-CD-1.iso image from a USB flashdisk and installed on /dev/sda1.
As I'm using Debian Stable on other machines, I use
cat debian-8.4.0-amd64-CD-1.iso > /dev/sdx where x is determined by dmesg | tail after inserting the usb flashdisk.
In installing Debian, use expert mode, it gives more options. When it comes to installing grub if offers a choice between
/dev/sda
/dev/sda1
and other options. As you set up partitioning, you know that /dev/sda1 is /boot, so write to it and it had no complaints.
I did try a few of the UEFI options, the disk is partitioned inside the Debian installer using GPT, that's another option it gives.
When it boots, it takes longer for me to type in my 20+ character password than it does for the system to go from password request to opening all the previously opened windows in KDE and I type fast. :wink:
User avatar
dotlj
 
Posts: 646
Joined: 2009-12-25 17:21

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-10 14:22

I have a new notebook with NVMe using a Toshiba 128GB which booted nicely from a debian-8.4.0-amd64-CD-1.iso image from a USB flashdisk and installed on /dev/sda1.

To be clear, /dev/sda1 is referring to the internal NVMe hard drive, an external USB drive that the bootloader is installed on, or the external USB drive that holds the installation files from the ISO image? On my machine, /dev/nvme0n1 is the internal hard drive, with /dev/nvme0n1p1 as the first partition, and so on, and it's these NVMe entries in /dev/ that GRUB doesn't seem to recognize.
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby dotlj » 2016-05-11 00:36

On my machine, Debian Jessie sees the NVMe as /dev/sda, the other internal sata disk as /dev/sdb and the usb flashdisk I used to install Debian as /dev/sdc.
During the installation, in disk partitioning, I removed all partitions from /dev/sda and created my own partitions, chose the mount points and filesystems.
At the end of the installation, Debian Jessie wrote GRUB to the NVMe which it saw as /dev/sda
In my setup, /dev/sda1 is mounted as /boot
GRUB installed nicely and boots nicely from the NVMe.
User avatar
dotlj
 
Posts: 646
Joined: 2009-12-25 17:21

Re: GRUB and LILO both fail to install to NVMe hard disk

Postby michael_a » 2016-05-11 13:40

dotlj wrote:On my machine, Debian Jessie sees the NVMe as /dev/sda, the other internal sata disk as /dev/sdb and the usb flashdisk I used to install Debian as /dev/sdc.

This is not the case on my machine. In a previous post I posted the output from "fdisk -l", and the NVMe drive shows up as /dev/nvme0n1. There is a pre-existing bug report about grub-install failing on NVMe drives because it can't translate the partition name (/dev/nvme0n1p1) into the disk name (/dev/nvme0n1). The bug is listed as "fixed" and backported to Jessie/stable (the version of Debian I'm trying to install), so why it's still failing is beyond me.

Over the next few days, I'll try downloading the most recent release of Debian testing and see if that installs properly, because presumably that version should have versions of grub and initramfs with the necessary patches. I'm on a slow connection, so it takes me a while to download an ISO image, but I'll give it a try.
michael_a
 
Posts: 28
Joined: 2016-05-03 13:59

PreviousNext

Return to Installation

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable