Why don't you try disabling os-prober in Debian and uncommenting the lines in /etc/grub.d/40_custom beginning with menuentry... Then rebuild grub.cfg (I think Debian uses update-grub for this). Using the UUID (assuming it is the correct one - you can verify with the blkid command) should bypass drive and partition identification problems.
To disable os-prober, add the following line to /etc/default/grub (or other similar grub configuration file there - as names might be different in Debian).
GRUB_DISABLE_OS_PROBER=true
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="3"
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
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 44052a8f-381d-440b-bc68-4d26ab4204a1
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1280x1024
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 44052a8f-381d-440b-bc68-4d26ab4204a1
set locale_dir=($root)/boot/grub/locale
set lang=it
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 44052a8f-381d-440b-bc68-4d26ab4204a1
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
set color_normal=light-gray/black
set color_highlight=white/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 44052a8f-381d-440b-bc68-4d26ab4204a1
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=44052a8f-381d-440b-bc68-4d26ab4204a1 ro quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 44052a8f-381d-440b-bc68-4d26ab4204a1
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=44052a8f-381d-440b-bc68-4d26ab4204a1 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sdb1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 3ac49844c49803f3
chainloader +1
}
menuentry "Arch (on /dev/sdb5)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set b9ebe48e-84ea-43e8-9704-071d4fb12374
linux /boot/vmlinuz-linux root=/dev/sdb5
initrd /boot/initramfs-linux.img
}
### 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.
#menuentry "Arch (on /dev/sdb5)" {
# insmod part_msdos
# insmod ext2
# set root='a1763fe4-cfe9-4180-aea9-c0d87f644f70'
# search --no-floppy --fs-uuid --set a1763fe4-cfe9-4180-aea9-c0d87f644f70
# linux /boot/vmlinuz-linux root=a1763fe4-cfe9-4180-aea9-c0d87f644f70 init=/sbin/e4rat-preload
# initrd /boot/initramfs-linux.img
#}
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
This is my grub.cfg in debian installation.
]]>But when I try to boot Arch via grub, randomically it fails to found the Arch partition, while for Debian and Win7 I haven't any problem. What can I check? Can you help me?
]]>