You are not logged in.

#1 2022-02-11 18:12:46

DragonStaty
Member
Registered: 2022-02-11
Posts: 7

[SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

I tried to install Arch linux on an old T61 laptop, but after the installation after choosing the Windows XP option in GRUB I got the error message:

Invalid BOOT.INI file
Booting from c:\windows\
NTDETECT failed

I have restored the laptop to before the Arch installation but would like to know what could have caused this so I could try to prevent it happening when I install Arch again. The only thing I'm awere of that was wrong was that multiple partitions were marked as active, so could this cause the error and if so why?

Last edited by DragonStaty (2022-02-13 14:22:40)

Offline

#2 2022-02-12 12:14:15

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,257

Re: [SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

Since you mention windows xp is this a bios / mbr windows installation ?

if yes, did you install grub in bios/mbr mode and follow https://wiki.archlinux.org/title/GRUB#W … S/MBR_mode "for windows xp"  ?

Welcome to archlinux forums.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2022-02-12 17:51:31

DragonStaty
Member
Registered: 2022-02-11
Posts: 7

Re: [SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

Thanks, yes it is a bios/mbr installation. For the installation I used this command:

# grub-install --target=i386-pc /dev/sda

I then put the following in the grub.cfg:

menuentry "Windows XP BIOS MBR" {
     insmod part_msdos
     insmod ntldr
     insmod ntfs
     ntldr (hd0,msdos1)/ntldr
} 

which I got from this website: https://wiki.gentoo.org/wiki/GRUB2/Chainloading/.

Am I understanding correctly that I am supposed to add the following to the grub.cfg file instead?

if [ "${grub_platform}" == "pc" ]; then
	menuentry "Microsoft Windows XP" {
		insmod part_msdos
		insmod ntfs
		insmod ntldr
		search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX
		ntldr /ntldr
	}
fi 

Also if it's not too much trouble could you explain why this would work but not the other?

Offline

#4 2022-02-12 18:11:28

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 636

Re: [SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

https://wiki.archlinux.org/title/GRUB#B … y_examples

I'm guessing /etc/grub.d/40_custom

Offline

#5 2022-02-12 18:13:29

DragonStaty
Member
Registered: 2022-02-11
Posts: 7

Re: [SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

Sorry, that was what I meant for the first code, should the second part be there instead?

Offline

#6 2022-02-13 10:59:33

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,257

Re: [SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

Yes, the second part needs to be there .


Windows xp expects to boot from the first partition on the first drive in the system.

In order to multiboot windows xp and other OSes with grub, tricks need to be used to give windows xp the setup it can handle .

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX

is specially crafted to give windows xp that setup.

You're supposed to use lsblk --fs to determine the UUID of the partition windows xp boots from and replace XXXXXXXXXXXXXXX with the correct UUID .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2022-02-13 14:20:21

DragonStaty
Member
Registered: 2022-02-11
Posts: 7

Re: [SOLVED]Installation of arch for dual boot with XP,error with BOOT.ini

Thank you that fixed it

Offline

Board footer

Powered by FluxBB