LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help me with Arch Linux and Windows XP dualboot, grub.cfg messed!! (https://www.linuxquestions.org/questions/linux-newbie-8/help-me-with-arch-linux-and-windows-xp-dualboot-grub-cfg-messed-885772/)

p3ini 06-11-2011 12:57 PM

Help me with Arch Linux and Windows XP dualboot, grub.cfg messed!!
 
Hi.

I have problems with booting Windows XP.

I can boot to Arch Linux, but not to Windows XP, because Windows XP isn't in the Grub OS selection list.

I have tried to edit the grub.conf file, but the Windows XP doesn't come to the list.

And, I don't have a menu.lst file, is it normal?

Here's what I have inside my grub.conf file:

Quote:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue

insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set a149e390-609b-44d3-81cf-fa51dbbfee20
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768x32
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
set locale_dir=($root)/grub/locale
set lang=fi
insmod gettext
set timeout=5

insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
set locale_dir=($root)/grub/locale
set lang=fi
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Arch Linux, with Linux vmlinuz26-ice" --class archlinux --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
echo Loading Linux vmlinuz26-ice ...
linux /vmlinuz26-ice root=/dev/disk/by-uuid/a149e390-609b-44d3-81cf-fa51dbbfee20 ro console=tty1 splash=silent,fadein,fadeout,theme:arch-black-spin quiet
echo Loading initial ramdisk ...
initrd /kernel26-ice.img
}
menuentry "Arch Linux, with Linux vmlinuz26-ice Fallback" --class archlinux --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
echo Loading Linux vmlinuz26-ice ...Loading Linux Fallback ...
linux /vmlinuz26-ice root=/dev/disk/by-uuid/a149e390-609b-44d3-81cf-fa51dbbfee20 ro console=tty1 splash=silent,fadein,fadeout,theme:arch-black-spin quiet
echo Loading initial ramdisk ...
initrd /kernel26-ice-fallback.img
}
menuentry "Arch Linux, with Linux vmlinuz26-ck" --class archlinux --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
echo Loading Linux vmlinuz26-ck ...
linux /vmlinuz26-ck root=/dev/disk/by-uuid/a149e390-609b-44d3-81cf-fa51dbbfee20 ro console=tty1 splash=silent,fadein,fadeout,theme:arch-black-spin quiet
echo Loading initial ramdisk ...
initrd /kernel26-ck.img
}
menuentry "Arch Linux, with Linux vmlinuz26-ck Fallback" --class archlinux --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
echo Loading Linux vmlinuz26-ck ...Loading Linux Fallback ...
linux /vmlinuz26-ck root=/dev/disk/by-uuid/a149e390-609b-44d3-81cf-fa51dbbfee20 ro console=tty1 splash=silent,fadein,fadeout,theme:arch-black-spin quiet
echo Loading initial ramdisk ...
initrd /kernel26-ck-fallback.img
}
menuentry "Arch Linux, with Linux vmlinuz26" --class archlinux --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
echo Loading Linux vmlinuz26 ...
linux /vmlinuz26 root=/dev/disk/by-uuid/a149e390-609b-44d3-81cf-fa51dbbfee20 ro console=tty1 splash=silent,fadein,fadeout,theme:arch-black-spin quiet
echo Loading initial ramdisk ...
initrd /kernel26.img
}
menuentry "Arch Linux, with Linux vmlinuz26 Fallback" --class archlinux --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 44c9993a-0f79-4f19-b445-cd8cee211a39
echo Loading Linux vmlinuz26 ...Loading Linux Fallback ...
linux /vmlinuz26 root=/dev/disk/by-uuid/a149e390-609b-44d3-81cf-fa51dbbfee20 ro console=tty1 splash=silent,fadein,fadeout,theme:arch-black-spin quiet
echo Loading initial ramdisk ...
initrd /kernel26-fallback.img
}
{
title Windows XP
root (hd0,1)
savedefault
makeactive
chainloader +1
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
And "Arch Linux, with Linux vmlinuz26-ck" is the only thing what works in the selection list. So, no Windows XP in the list.

I tried to find solution to this problem with Google, but I didn't found :S

Please help me and answer fast!

(And I'm new in this forum & sorry for bad english!)


- p3ini

yancek 06-11-2011 01:07 PM

The file you posted is the grub.cfg file which Arch is apparently now using. The entry you have for your windows installation on sda1 would probably work in Grub Legacy. You have Grub 2 so it won't work. You need an entry for windows which is similar to your Arch entry. For windows 7 on sda1, the entry below should work. You haven't posted partition information but your entry points to the first disk, first partition for windows
.
Quote:

menuentry "Windows 7 " {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a0a03a5ca03a395c
chainloader +1
}
You will need to change the entry after set in the fifth line above to whatever your windows UUID is which you should be able to get by using the "blkid" command. If you can't do that, run the command: fdisk -l (lower case Letter L) as root in Arch terminal and post it here.

p3ini 06-11-2011 01:47 PM

Oh okay, I don't have Windows 7, are those commands only to Windows 7?

But I did as you said, I wrote those commands to the grub.conf file, then I used blkid command and copied the code on the grub.conf file. So that's okay, no need for fdisk -l command?

BUT, then I restarted the computer, and it didn't have a choice for Windows XP!!

Did I do something wrong? Here's a little piece what I changed in the grub.conf file:

Quote:

...
}
menuentry "Windows XP"
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)
search --no-floppy --fs-uuid --3EE634C514F8A15B
chainloader +1
}
### END /etc/grub.d/10_linux ###
...
Help Please! :(

- p3ini

Larry Webb 06-11-2011 02:02 PM

Quote:

...
}
menuentry "Windows XP"
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)
search --no-floppy --fs-uuid --3EE634C514F8A15B
chainloader +1
}
### END /etc/grub.d/10_linux ###

You did not copy as Yancek suggested, please recheck

menuentry "Windows XP" {

p3ini 06-11-2011 02:22 PM

Oops :D Stupid me.

Now I wroted exactly as yancek suggested, and it's working!

Thanks for yancek and Larry Webb! =)

- p3ini


All times are GMT -5. The time now is 02:09 AM.