I have a Dell Dimension 5150 with a Pentium D 820 (I know it's outdated but I received this from a friend as a Christmas gift.)
I have 2 hard disks in this desktop:
A 500GB 2.5' laptop HDD with Clover EFI installed (GPT BIOS Setup)
A 80GB 3.5' desktop HDD (normal MBR BIOS Setup)
Partition layout
Laptop HDD
sda1: Ubuntu MATE 16.04
sda2: Windows 10
sda3: Phoenix OS
sda4: DATA (Backup Storage Partition)
sda5: PARTIMG (Partition Image Storage)
sda6: ESP (EFI System Partition)
(I previously used a laptop and all my data is in there, but it died and this hard disk still can be used.)
Desktop HDD
sdb1: Dell System Utility (OEM Partition)
sdb2: Windows XP SP3 Home Edition
sdb3: Ubuntu XFce 18.04
How do I add Windows XP that is located on the second HDD's second partition to Ubuntu MATE 16.04 LTS's GRUB2 menu entry?
What I have tried:
insmod part_msdos insmod ntfs set root=(hd1,msdos2) chainloader +1
error: Invalid EFI file path
insmod part_msdos insmod ntfs set root=(hd1,msdos2) chainloader /ntldr
error: cannot load image
insmod part_msdos insmod ntldr insmod ntfs ntldr (hd1,msdos2)/ntldr
error: ntldr.mod not found
insmod part_msdos insmod chain drivemap hd0 hd1 chainloader (hd1,msdos2)+1
error: drivemap command not found
insmod part_msdos insmod ntfs insmod search_fs_uuid search --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 2ABF87DC395CFC02 drivemap (hd1,msdos2) (hd0,msdos1) chainloader /ntldr
error: cannot load image
What I have observed:
I did try if it can read the NTFS partition. It can read it without any problem. ls (hd1,msdos2)/ returns a bunch of files on the hard drive including the boot files (boot.ini, ntldr, AUTOEXEC.COM)
drivemap is only available in i386-pc package and not x86_64-efi package
It isn't the boot files problem as it boots normally if I disconnect the first hard drive (It boots into Windows XP normally).
os-prober and update-grub doesn't detect Windows XP partition (even if it's mounted). It only detects the first partition (Dell System Utility) on the second drive.