You are not logged in.

#1 2016-01-23 23:18:11

Willem
Member
From: Wellington, NZ
Registered: 2009-10-09
Posts: 18

grub-mkconfig does not create entry for dual boot Windows 7 on nvme

When I run grub-mkconfig it does not pick up Windows 7 which I have installed on an nvme partition.
When I installed grub, it did pick up the nvme partition, but just reported that it is not an ext4 filesystem.

fdisk -l

Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 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: gpt
Disk identifier: 0938622A-6839-4C25-86D3-7CDEB1226509

Device          Start       End   Sectors   Size Type
/dev/nvme0n1p1   2048    206847    204800   100M EFI System
/dev/nvme0n1p2 206848    468991    262144   128M Microsoft reserved
/dev/nvme0n1p3 468992 500117503 499648512 238.3G Microsoft basic data

1. Is there anything I can do for grub-mkconfig to pick the Windows nvme drive up automatically?
2. In case I need to write a /etc/grub.d/40_custom rule, how is this done? I am not sure how the nvme drive custom rule is to be written in grub hd0,msdos1 format and what I need to change from this example:

menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-A07A98267A97F6EE' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  A07A98267A97F6EE
    else
      search --no-floppy --fs-uuid --set=root A07A98267A97F6EE
    fi
    chainloader +1
}

I would assume I would also need to add an 'insmod nvme'?
Any help would be appreciated.

Offline

#2 2016-01-24 09:38:07

michis
Member
Registered: 2015-12-12
Posts: 77

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

Have you installed os-prober ?

Offline

#3 2016-01-24 20:09:49

Willem
Member
From: Wellington, NZ
Registered: 2009-10-09
Posts: 18

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

michis wrote:

Have you installed os-prober ?

Thanks, it is installed, when I run it, it doesn't pick up Win 7 on /dev/vnme0

Offline

#4 2016-01-24 20:26:00

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

Which command did you use to install the GRUB bootloader to your disk and what was the *exact* error message?

Vague descriptions don't work in search engines.
https://bbs.archlinux.org/viewtopic.php?id=57855

Is the kernel module loaded?

# lsmod|grep nvme

Offline

#5 2016-01-24 23:35:27

Willem
Member
From: Wellington, NZ
Registered: 2009-10-09
Posts: 18

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

Head_on_a_Stick wrote:

Which command did you use to install the GRUB bootloader to your disk and what was the *exact* error message?

Vague descriptions don't work in search engines.
https://bbs.archlinux.org/viewtopic.php?id=57855

Is the kernel module loaded?

# lsmod|grep nvme

grub-install /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.

grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
done

lsmod | grep nvme
nvme                   57344  0

The problem came about because I previously had Win 7 installed on /dev/sda1 (which worked fine), and I have now moved Win 7 to a PCIE M.2 SSD /dev/nvme0, and grub-mkconfig does not pick it up.

Last edited by Willem (2016-01-25 00:01:45)

Offline

#6 2016-01-29 16:34:34

jesc516
Member
From: LI,NY
Registered: 2015-01-26
Posts: 72

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

I ran into a similar situation, but the command for grub is: (my system was UEFI, x64 bit)

grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=grub --recheck

for $esp, I used:

/boot/efi

I not sure if the following matters, but I installed os-prober and ran the aforementioned command as root after arch linux was installed. Grub did not show my windows partition, only the arch linux operating system.

My windows efi partion was: "/dev/sda2" and I mounted it on an efi directory I created: "/mnt/boot/efi" during the initial configuration of arch prior to "chroot-arch". I hope this helps.

Offline

#7 2016-01-29 18:24:44

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 279

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

Please correct me if I'm wrong but doesn't the version of Grub in the repo not have the necessary patch for nvme partitions? I used grub-git from the AUR to set up my M.2.


Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64

Offline

#8 2016-01-29 20:04:06

Willem
Member
From: Wellington, NZ
Registered: 2009-10-09
Posts: 18

Re: grub-mkconfig does not create entry for dual boot Windows 7 on nvme

fabertawe wrote:

Please correct me if I'm wrong but doesn't the version of Grub in the repo not have the necessary patch for nvme partitions? I used grub-git from the AUR to set up my M.2.

Yes, I have come to the conclusion that this is most probably the issue. I saw another post which referred to a patch that needs to be applied to grub or to alternatively use grub-git.

Offline

Board footer

Powered by FluxBB