1

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:

  1. A 500GB 2.5' laptop HDD with Clover EFI installed (GPT BIOS Setup)

  2. A 80GB 3.5' desktop HDD (normal MBR BIOS Setup)

Partition layout

Laptop HDD

https://i.stack.imgur.com/yDRC2.png

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

https://i.stack.imgur.com/ZMKIW.png

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:

  1. insmod part_msdos
    insmod ntfs
    set root=(hd1,msdos2)
    chainloader +1
    

    error: Invalid EFI file path

  2. insmod part_msdos
    insmod ntfs
    set root=(hd1,msdos2)
    chainloader /ntldr
    

    error: cannot load image

  3. insmod part_msdos
    insmod ntldr
    insmod ntfs
    ntldr (hd1,msdos2)/ntldr
    

    error: ntldr.mod not found

  4. insmod part_msdos
    insmod chain
    drivemap hd0 hd1
    chainloader (hd1,msdos2)+1
    

    error: drivemap command not found

  5. 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.

  • There is a tool named Rescatux that is able to add a Windows entry to the grub boot menu automatically. Maybe it's worth a try: Restore Windows bootloader. I used the built-in Startup Disk Creator application to put Rescatux on a bootable USB thumb drive. – karel Dec 26 '18 at 18:16
  • UEFI and BIOS are not compatible. But do not know Clover which is software to allow an old BIOS system to boot in EFI boot mode. Can you directly boot Windows from BIOS by selecting the Windows drive. I doubt you can boot Windows from grub if in UEFI mode. – oldfred Dec 26 '18 at 18:39
  • You should be able to press f12 or f10 or whatever f-key you need to press to select the boot option on a Dell computer. From there you can select Windows. Also, you should be able to turn off safeboot to allow booting from standard BIOS drives. Have you tried this? – mchid Dec 26 '18 at 20:39
  • Unfortunately, this Dell system isn't capable of selecting individual hard drives during bootup. There is an F12 option but it only allows you to boot to the first drive. Answers from Dell forums show that you have to switch manually (SATA 0 & SATA 1) if you want to boot the drive. – Growtopia Jaw Dec 27 '18 at 03:58
  • @oldfred Clover EFI is like a UEFI emulator for Legacy BIOSes. Clover EFI is installed to the first 512 byte of the drive. Unlike BIOS, Clover is installed on a hard drive rather than a BIOS ROM. After BIOS, it passes to whatever program that is located on the first 512 byte. Clover takes over and that's where UEFI happens. https://clover-wiki.zetam.org/Technical-Background – Growtopia Jaw Dec 27 '18 at 04:13
  • You may be able to chainload a BIOS grub to both XP and Clover. But then you install the BIOS verison of grub to MBR and create your own grub.cfg. This has chain load to clover efi boot stanza. And then you can use a standard Windows chain load boot stanza. https://forum.manjaro.org/t/boot-clover-from-grub/39597/5 If using gpt you will also then need a bios_grub partition for the BIOS version of grub to work on gpt partitioned drive. – oldfred Dec 27 '18 at 04:33
  • @karel I tried Rescatux and it's os-prober finally detected the Windows XP partition and generated grub.cfg. Unfortunately, it needs a module (drivemap.mod) which is only available in i386-pc package. – Growtopia Jaw Dec 27 '18 at 08:55
  • @oldfred that might work – Growtopia Jaw Dec 27 '18 at 08:55
  • @oldfred I installed grub (BIOS) to sdb and moved the disk to SATA 0 (primary). Some of the commands from Manjaro forums doesn't work but I found a workaround and added Clover EFI to grub.cfg and both BIOS and UEFI works now. Thanks! – Growtopia Jaw Dec 27 '18 at 10:46
  • Extra into: about the it doesn't work part. It's because it returned an error "error: invalid signature" – Growtopia Jaw Dec 27 '18 at 10:59
  • I am sure Clover was before UEFI Secure Boot. Invalid signature is from something that wants the Secure boot signing key. – oldfred Dec 27 '18 at 14:29
  • But BIOS doesn't even support secure boot right? Sorry if I confused you. By UEFI, I meant Clover EFI. This is a BIOS machine. – Growtopia Jaw Dec 27 '18 at 14:31

0 Answers0