Dual boot with windows xp

General support questions
Post Reply
mhdtabikh
Posts: 1
Joined: 2014/12/09 19:42:29

Dual boot with windows xp

Post by mhdtabikh » 2014/12/09 19:50:01

Dear all,
i have a windows xp install on first partition then i install my centos
but the MBR of windows is gone
what can i do to have dual boot???

umarzuki
Posts: 62
Joined: 2008/05/08 09:32:24
Contact:

Re: Dual boot with windows xp

Post by umarzuki » 2014/12/12 12:05:57

reinstall grub

User avatar
TrevorH
Forum Moderator
Posts: 28867
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Dual boot with windows xp

Post by TrevorH » 2014/12/12 13:52:43

That's not the correct answer. You need to add a new script to /etc/grub.d as per several other threads on this forum. My example is as follows

Code: Select all

$ cat /etc/grub.d/15_windows
#!/bin/bash -e
echo "Adding Windows" >&2
cat <<EOF
menuentry "Windows 7" {
set root='hd0,msdos1'
chainloader +1
}
EOF
The file needs to be executable.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - General Support”