You are not logged in.
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
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
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
https://wiki.archlinux.org/title/GRUB#B … y_examples
I'm guessing /etc/grub.d/40_custom
Offline
Sorry, that was what I meant for the first code, should the second part be there instead?
Offline
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 XXXXXXXXXXXXXXXXis 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
Thank you that fixed it
Offline