bugGNU GRUB - Bugs: bug #67019, grub-mkconfig creates unusable...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #67019: grub-mkconfig creates unusable menu entry for Windows 10 (BIOS/DOS)

Submitter:  evermore
Submitted:  Sun 13 Apr 2025 02:53:37 AM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Sun 13 Apr 2025 08:31:22 PM UTC, comment #2: 

Hi Vladimir,
thanks for your reply. I uploaded the output files of the dd command.

(file #57136, file #57137, file #57138)

evermore
Sun 13 Apr 2025 09:04:16 AM UTC, comment #1: 

Can you send your MBRs?
dd if=/dev/sda of=sda.bin count=1
dd if=/dev/sdb of=sdb.bin count=1
Then upload sda.bin and sdb.bin

Vladimir Serbinenko <phcoder>
Group administrator
Sun 13 Apr 2025 02:53:37 AM UTC, original submission:  

Hi folks,
I've booted the Arch Linux installation media in BIOS mode (i. e. non-UEFI mode) and installed Grub (version 2.12.r260.gaae2ea61-1) on a SSD which has a DOS partition table. grub-mkconfig creates a menu entry for Arch Linux and another for Windows but the latter fails to boot Windows properly. Instead, the following error is displayed:

> Booting 'Windows 10 ...'
> Setting partition type to 0x83
> error: invalid signature.


grub-mkconfig creates the following menu entry which does not work:

### BEGIN /etc/grub.d/30_os-prober ###

# This menu entry is supported only on PC BIOS platforms.
if [ "$grub_platform" = "pc" ]; then
menuentry 'Windows 10 (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-/dev/sdb1' {
        insmod part_msdos
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
}
fi
### END /etc/grub.d/30_os-prober ###


After reading the documentation, I created an entry in grub.cfg by hand and this works perfectly:

menuentry 'My Windows' {
    insmod chain
    insmod ntfs
    set root=(hd1,1)
    chainloader +1
}


I don't understand why grub-mkconfig is not able to create this automatically.

Details on hardware setup:

  • /dev/sdb1: Windows 10 installation on SSD
  • /dev/sdc1: Arch Linux installation (installation details in the next section)

(both drives have a DOS partition table)

How to reproduce:
1. Boot Arch Linux installation media in BIOS mode (non-UEFI mode)
2. Execute the following commands:

# only if you have a special keyboard layout:
loadkeys de-latin1

# Create and format partition for new ArchLinux root:
fdisk /dev/sdc
mkfs.ext4 /dev/sdc1

# Mount drives:
mount /dev/sdc1 /mnt
mount /dev/sdb1 /mnt/win --mkdir

# Basic installation:
pacstrap -K /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

# Grub installation:
pacman -S grub efibootmgr os-prober nano less ntfs-3g fuse3
grub-install --target=i386-pc /dev/sdc

# Activate os-prober:
nano /etc/default/grub
-> uncomment line with GRUB_DISABLE_OS_PROBER=false

# Create grub.cfg:
grub-mkconfig -o /boot/grub/grub.cfg


evermore

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #57136:  sda.bin added by evermore (512B - application/octet-stream - Output of dd if=/dev/sdx of=sdx.bin count=1)
file #57137:  sdb.bin added by evermore (512B - application/octet-stream - Output of dd if=/dev/sdx of=sdx.bin count=1)
file #57138:  sdc.bin added by evermore (512B - application/octet-stream - Output of dd if=/dev/sdx of=sdx.bin count=1)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by evermore (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-04-13 evermore Attached File- Added sda.bin, #57136
        Attached File- Added sdb.bin, #57137
        Attached File- Added sdc.bin, #57138

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code