update-grub does not include Windows installations by default

Message
Author
User avatar
Srdjan
Posts: 73
Joined: Thu Sep 12, 2019 3:39 pm

update-grub does not include Windows installations by default

#1 Post by Srdjan »

Topic name is pretty much self-explainatory :)

So, how do I update grub with option to add my windows installation on
other internal HDD (Windows 10) to grub boot menus?

Thanks :)

Code: Select all

srdjan@Desktop:~
$ sudo grub-mkconfig -o /boot/grub/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.0-5-amd64
Found initrd image: /boot/initrd.img-4.19.0-5-amd64
Found linux image: /boot/vmlinuz-4.9.189-antix.1-amd64-smp
Found initrd image: /boot/initrd.img-4.9.189-antix.1-amd64-smp
Found memtest86+ image: /boot/memtest86+.bin
done
srdjan@Desktop:~
$ 
This does not help finding windows.

It's on /dev/sdb:

Code: Select all

Drives:
  ID-1: /dev/sda vendor: Samsung model: SSD 830 Series size: 119.24 GiB 
  ID-2: /dev/sdb vendor: Western Digital model: WD5000AAKS-00A7B0 size: 465.76 GiB 
  ID-3: /dev/sdc type: USB vendor: Samsung model: HD154UI size: 1.36 TiB 

User avatar
Eadwine Rose
Administrator
Posts: 11971
Joined: Wed Jul 12, 2006 2:10 am

Re: update-grub does not include Windows installations by default

#2 Post by Eadwine Rose »

How about

Code: Select all

sudo update-grub
Reboot and see.
MX-23.2_x64 July 31 2023 * 6.1.0-20-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
Srdjan
Posts: 73
Joined: Thu Sep 12, 2019 3:39 pm

Re: update-grub does not include Windows installations by default

#3 Post by Srdjan »

I did that, offcourse :)

It finds only Linux kernels on sda (SSD disk)

User avatar
Srdjan
Posts: 73
Joined: Thu Sep 12, 2019 3:39 pm

Re: update-grub does not include Windows installations by default

#4 Post by Srdjan »

Code: Select all

srdjan@Desktop:~
$ sudo update-grub
[sudo] password for srdjan: 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.0-5-amd64
Found initrd image: /boot/initrd.img-4.19.0-5-amd64
Found memtest86+ image: /boot/memtest86+.bin
done
srdjan@Desktop:~
$ 

User avatar
Eadwine Rose
Administrator
Posts: 11971
Joined: Wed Jul 12, 2006 2:10 am

Re: update-grub does not include Windows installations by default

#5 Post by Eadwine Rose »

Hmm.. that should find it..

*scratches head*

Meantime, please post MX Tools - quick system info.

Don't fiddle with the output, just hit paste in a reply.

Someone will come by with more knowledge than I have on this. (mine is pretty much sudo blah and that's that hahah)
MX-23.2_x64 July 31 2023 * 6.1.0-20-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
Srdjan
Posts: 73
Joined: Thu Sep 12, 2019 3:39 pm

Re: update-grub does not include Windows installations by default

#6 Post by Srdjan »

Ofcourse, here it is

Code: Select all

System:    Host: Desktop Kernel: 4.19.0-5-amd64 x86_64 bits: 64 compiler: gcc v: 6.3.0 
           Desktop: Xfce 4.12.3 Distro: MX-18.3_x64 Continuum May 26  2019 
           base: Debian GNU/Linux 9 (stretch) 
Machine:   Type: Desktop Mobo: BIOSTAR model: H110MHC serial: <filter> 
           UEFI [Legacy]: American Megatrends v: 5.12 date: 05/04/2018 
CPU:       Topology: Dual Core model: Intel Pentium G4400 bits: 64 type: MCP arch: Skylake-S 
           rev: 3 L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 13248 
           Speed: 900 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 900 2: 900 
Graphics:  Device-1: NVIDIA GF106 [GeForce GTS 450] vendor: CardExpert driver: nvidia v: 390.116 
           bus ID: 01:00.0 
           Display: x11 server: X.Org 1.19.2 driver: nvidia 
           resolution: 1920x1080~60Hz, 1680x1050~60Hz 
           OpenGL: renderer: GeForce GTS 450/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-H HD Audio vendor: Biostar Microtech Intl Corp 
           driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Device-2: NVIDIA GF106 High Definition Audio vendor: CardExpert driver: snd_hda_intel 
           v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k4.19.0-5-amd64 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: Biostar Microtech Intl Corp driver: r8169 v: kernel port: d000 
           bus ID: 02:00.0 
           IF: eth0 state: down mac: <filter> 
           Device-2: Realtek RTL8188CUS 802.11n WLAN Adapter type: USB driver: rtl8192cu 
           bus ID: 1-7:4 
           IF: wlan0 state: up mac: <filter> 
Drives:    Local Storage: total: 1.94 TiB used: 35.37 GiB (1.8%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 830 Series size: 119.24 GiB 
           ID-2: /dev/sdb vendor: Western Digital model: WD5000AAKS-00A7B0 size: 465.76 GiB 
           temp: 43 C 
           ID-3: /dev/sdc type: USB vendor: Samsung model: HD154UI size: 1.36 TiB 
Partition: ID-1: / size: 109.36 GiB used: 8.32 GiB (7.6%) fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 7.63 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda1 
Sensors:   System Temperatures: cpu: 32.0 C mobo: N/A gpu: nvidia temp: 69 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 35% 
Repos:     Active apt repos in: /etc/apt/sources.list.d/antix.list 
           1: deb http://iso.mxrepo.com/antix/stretch stretch main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://ftp.hu.debian.org/debian/ stretch-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://ftp.hu.debian.org/debian/ stretch main contrib non-free
           2: deb http://security.debian.org/ stretch/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb https://quantum-mirror.hu/mirrors/pub/mx-linux/packages/mx/repo/ stretch main non-free
           No active apt repos in: /etc/apt/sources.list.d/various.list 
Info:      Processes: 188 Uptime: 3h 37m Memory: 3.82 GiB used: 1.65 GiB (43.2%) Init: SysVinit 
           runlevel: 5 Compilers: gcc: 6.3.0 Shell: bash v: 4.4.12 inxi: 3.0.33 

User avatar
penguin
Posts: 262
Joined: Wed Jan 04, 2017 3:15 pm

Re: update-grub does not include Windows installations by default

#7 Post by penguin »

Also I have found some times problems with grub. Means sudo grub update does not add the entry
The simplest way...

Try to install grub customizer. Dwells in MX Repo . Install it by MX Tools or Synaptic.


Create a Windows entry and copy paste the follow:

My windows entry ( correct by your UUID and hd mdos )

Code: Select all

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  6A6A47A76A476F3F
else
  search --no-floppy --fs-uuid --set=root 6A6A47A76A476F3F
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1

Save and reboot.

Hope it helps.

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: update-grub does not include Windows installations by default

#8 Post by fehlix »

Srdjan wrote: Thu Sep 19, 2019 11:29 am

Code: Select all

Machine:   Type: Desktop Mobo: BIOSTAR model: H110MHC serial: <filter> 
           UEFI [Legacy]: American Megatrends v: 5.12 date: 05/04/2018 
You seem to boot in legacy/BIOS/CMS boot-mode. So, GRUB scans for bios-windows boot loader not UEFI boot loader, which it can't find if WinOS is installed within UEFI-mode.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Srdjan
Posts: 73
Joined: Thu Sep 12, 2019 3:39 pm

Re: update-grub does not include Windows installations by default

#9 Post by Srdjan »

@penguin - I know how to manually add entry in grub config file, I was just curious why
grub updater does not add it automatically, but @fehlix I think is right about legacy / UEFI.

User avatar
penguin
Posts: 262
Joined: Wed Jan 04, 2017 3:15 pm

Re: update-grub does not include Windows installations by default

#10 Post by penguin »

I play a lot with linux distros (distro hooper). Usually I do not install grub when I install a new distro. I only update grub, but had happen to me many times that new distro do not shows as grub entry. So...simply I add it manually and voila.

Post Reply

Return to “Software / Configuration”