Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
GRUB and LILO both fail to install to NVMe hard disk
Re: GRUB and LILO both fail to install to NVMe hard disk
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.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GRUB and LILO both fail to install to NVMe hard disk
That's rather vague, care to share to exact command that you used?michael_a wrote:using dd
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?
deadbang
Re: GRUB and LILO both fail to install to NVMe hard disk
Sorry, you're right that that was vague. The dd command was
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).
Code: Select all
dd if=archlinux-2016.05.01-dual.iso of=/dev/sdb1
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GRUB and LILO both fail to install to NVMe hard disk
That is the wrong command -- *do not* specify a partition number, target the entire device and flush the buffers afterwards:michael_a wrote:The dd command wasCode: Select all
dd if=archlinux-2016.05.01-dual.iso of=/dev/sdb1
Code: Select all
# dd bs=4M if=archlinux-2016.05.01-dual.iso of=/dev/sdb status=progress && sync
deadbang
- kiyop
- Posts: 3983
- Joined: 2011-05-05 15:16
- Location: Where persons without desire to improve themselves fear to tread, in Japan
- Been thanked: 3 times
Re: GRUB and LILO both fail to install to NVMe hard disk
Somebody made a similar mistake.michael_a wrote:Code: Select all
dd if=archlinux-2016.05.01-dual.iso of=/dev/sdb1
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/
http://kiyoandkei.bbs.fc2.com/
Re: GRUB and LILO both fail to install to NVMe hard disk
Code: Select all
dd bs=4M if=archlinux-2016.05.01-dual.iso of=/dev/sdb status=progress && sync
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
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.
Re: GRUB and LILO both fail to install to NVMe hard disk
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.
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.
Re: GRUB and LILO both fail to install to NVMe hard disk
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.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.
Re: GRUB and LILO both fail to install to NVMe hard disk
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.
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.
Re: GRUB and LILO both fail to install to NVMe hard disk
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.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.
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.
Re: GRUB and LILO both fail to install to NVMe hard disk
I have an MSI computer. I checked the specifications on your Lenovo Thinkpad X1 Carbon and are quite different.
Maybe the BIOS or something else? Debian Jessie and Stretch both show my disk as /dev/sda
I thought that I had kept the GPT, but I must have changed it to DOS. You could try that inside the Debian installer as I did.
Maybe the BIOS or something else? Debian Jessie and Stretch both show my disk as /dev/sda
Code: Select all
fdisk -l
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: xxxxxxxxxx
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2 501758 250068991 249567234 119G 5 Extended
/dev/sda5 501760 250068991 249567232 119G 83 Linux
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: yyyyyyyyy
Device Start End Sectors Size Type
/dev/sdb1 2048 249855 247808 121M Linux filesystem
/dev/sdb2 249856 1953523711 1953273856 931.4G Linux filesystem
Re: GRUB and LILO both fail to install to NVMe hard disk
The problem obviously lies with the version of grub-installer that Debian jessie (stable) is using (version 1.117+deb8u1); that version doesn't include the version that fixes the bug related to NVMe drives. The version of grub-installer included in Debian stretch (version 1.132) does include the fix, and that installer was able to install to /dev/nvme01 correctly.
However, for stability reasons, I'd really rather not use the testing version of Debian on my main machine (this laptop). Is there any way to use the newer version of grub-installer with the stable version of Debian? Or should I install Debian stable without the bootloader, then try to install grub on /dev/nvme01 from a (testing/stretch) Debian live CD, since that live CD will use the newer version that recognizes my hard drive?
However, for stability reasons, I'd really rather not use the testing version of Debian on my main machine (this laptop). Is there any way to use the newer version of grub-installer with the stable version of Debian? Or should I install Debian stable without the bootloader, then try to install grub on /dev/nvme01 from a (testing/stretch) Debian live CD, since that live CD will use the newer version that recognizes my hard drive?
Re: GRUB and LILO both fail to install to NVMe hard disk
I have not tried this but it should be possible to use Debian Jessie for the install up to grub, open a virtual terminal and install the package from another device, manually install grub, go back to finish the installation (set up users and so on) then reboot
I have installed both Debian Jessie and Debian Stretch on NVMe disks and read all of the bug report which hasn't been updated for over three months. I wonder if there is something else, why Debian Jessie and Stretch both detect my drive as /dev/sda and yours is not?
I have installed both Debian Jessie and Debian Stretch on NVMe disks and read all of the bug report which hasn't been updated for over three months. I wonder if there is something else, why Debian Jessie and Stretch both detect my drive as /dev/sda and yours is not?
Re: GRUB and LILO both fail to install to NVMe hard disk
How would I go about doing this? To quote the package description for grub-installer:dotlj wrote:I have not tried this but it should be possible to use Debian Jessie for the install up to grub, open a virtual terminal and install the package from another device, manually install grub, go back to finish the installation (set up users and so on) then reboot
so I don't think I can just put the .deb file on a separate USB drive and install it from a virtual terminal during the installation.Warning: This package is intended for the use in building debian-installer images only. Do not install it on a normal Debian system.
Re: GRUB and LILO both fail to install to NVMe hard disk
Good question.
You can modify an existing Debian CD image. I've done this with another distro using .deb packages but not Debian.
https://wiki.debian.org/DebianInstaller/Modify/CD
Add the grub-installer from Stretch, check dependencies, I think they should be similar to grub-installer from Jessie. If it gets too messy, it may be better to wait for an update or look for an easier alternative. If there are no dependency problems, go ahead. After changing the grub-installer from Jessie to Stretch, add the new checksum for the package and the total in md5sum.txt
The wiki has all the details needed, last step is to generate the new iso with genisoimage.
Naturally, you should not need to do this but from what you describe it looks like an option.
I'm still thinking about an easier option. In your BIOS settings, how are the disks recognized?
Are there any other optinos that might help Debian to find your disk as /dev/sda or /dev/sdb ?
You can modify an existing Debian CD image. I've done this with another distro using .deb packages but not Debian.
https://wiki.debian.org/DebianInstaller/Modify/CD
Add the grub-installer from Stretch, check dependencies, I think they should be similar to grub-installer from Jessie. If it gets too messy, it may be better to wait for an update or look for an easier alternative. If there are no dependency problems, go ahead. After changing the grub-installer from Jessie to Stretch, add the new checksum for the package and the total in md5sum.txt
The wiki has all the details needed, last step is to generate the new iso with genisoimage.
Naturally, you should not need to do this but from what you describe it looks like an option.
I'm still thinking about an easier option. In your BIOS settings, how are the disks recognized?
Are there any other optinos that might help Debian to find your disk as /dev/sda or /dev/sdb ?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GRUB and LILO both fail to install to NVMe hard disk
I finally came across this wiki post, and with some tweaking to remove the steps dealing with dual boot, those instructions worked for me. To summarize:
- 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.
Exit the shell and select "Continue without installing a bootloader."
Code: Select all
mount --bind /dev /target/dev mount --bind /dev/pts /target/dev/pts mount --bind /proc /target/proc mount --bind /sys /target/sys cp /etc/resolv.conf /target/etc chroot /target /bin/bash aptitude update aptitude install grub-efi-amd64 update-grub grub-install --target=x86_64-efi /dev/nvme0n1
- At the installation stage where GRUB fails to install, open a shell and run:,
- 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 line
and add "nomodeset" to the GRUB_CMDLINE_LINUX_DEFAULT so it looks like this:
Code: Select all
GRUB_CMDLINE_LINUX="intel_pstate=no_hwp"
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
- Run update-grub.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GRUB and LILO both fail to install to NVMe hard disk
Probably not, perhaps you should add the information yourself?michael_a wrote:presumably, the wiki page will be more up-to-date in the future
I think that's how community wikis are supposed to work
deadbang
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: GRUB and LILO both fail to install to NVMe hard disk
I think so to, but rather then edit the entire tutorial, / page, it seemed to me likeby Head_on_a_Stick » I think that's how community wikis are supposed to work
the easiest thing to do was just add a link to this thread.
I added a link, down at the bottom of the page, under "usefull links"
Looks like that page needs some translations done as well, it is only in
English.
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: GRUB and LILO both fail to install to NVMe hard disk
Thanks Gary!
I can't create a Debian wiki account, it keeps rejecting my applications
I can't create a Debian wiki account, it keeps rejecting my applications
deadbang