Debian+XP@netbook: Can't boot windows, it tries to boot from usb!
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Debian+XP@netbook: Can't boot windows, it tries to boot from usb!
* Asus eeepc 1101ha. 1.5 year old
* When I bought it, I deleted every partition [including the rescue] except the windows XP one. I resized this and used the free space for linux. I have debian squeeze and Ubuntu installed. Never had any problems booting linux.
* I am in fact using windows xp seldom, but I have it there, for fallback cases when something doesn't work in linux, like connecting to a beamer. I noticed that without me doing anything, at some time windows stopped booting, then after a few months, problem fixed by itself and could boot. I tried last week again to boot and I can't again.
* The error message is "Reboot and select proper boot device etc.".
* If I insert a bootable usb flash (I tried with an ubuntu live distro) and try to boot windows from grub, it boots from the usb flash and starts the live distro!
I didn't mess up with the windows install. I didn't want to, since there should be tricky driver installations. How stupid is it that I deleted the rescue partition anyway? I have of course a dd of the windows installation, so I can restore it, so I guess I didn't need a rescue partition.
To install linux, I booted from a usb flash and did a net installation (there is no cd drive in the netbook).
I have attached the output of the boot info script in the end of this message
Trying to explain the third bullet: As I said `I didn't do anything'. I do run updates in squeeze and ubuntu however, and the updates may also update grub. I think the problem started somehow after an update to the ubuntu, (which I don't use regularly either, so it often is the case that I log in after 3-4 months and do a big update).
Trying to explain the fifth bullet: Strange! Seems that windows is handing boot over to the usb disk (sdb1). Windows is in sda1. It was always there. In the windows boot stuff, there is also an option to boot the original xandros linux-like thing that was installed when I bought the netbook, but it is not the default boot option, the default in boot.ini is multi(0)disk(0)rdisk(0)partition(1)\WINDOWS.
Examining the grub options for the windows boot entry, the uuid of the win partition is correct. I tried to add `drivemap (hd1) (hd0)' thinking: "If windows is trying to boot from sdB1, let's convince it to look back to sda1', but it didn't work.
Now what? My first thought is that I need to restore the windows boot sector in sda1. There are some tools to use from linux, but I believe they just restore the MBR in sdA and after that, I have to boot from the usb and reinstall grub on sda. But I don't think that something will change, since they don't touch anything in the boot sector of sda1. There should be windows utilities to create rescue media in usb, but I prefer not to deal with if not absolutely necessary
Any ideas / suggestions / hints?
Thanks in advance!
Boot Info Script 0.60 from 17 May 2011
============================= Boot Info Summary: ===============================
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 6 for (,msdos6)/boot/grub.
File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda1 has
83877872 sectors, but according to the info from
fdisk, it has 83886080 sectors.
Operating System: Windows XP
Boot files: /menu.lst /boot.ini /grldr /grldr /ntldr /NTDETECT.COM
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
}
terminal_input console
terminal_output console
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/01_915resolution ###
insmod 915resolution
915resolution 58 1366 768 32
### END /etc/grub.d/01_915resolution ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
set gfxpayload=1366x768x32
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro resume=UUID=74ba497d-c254-4674-a268-9594a692f18e quiet acpi_osi=Linux
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
set gfxpayload=1366x768x32
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro single resume=UUID=74ba497d-c254-4674-a268-9594a692f18e
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
### 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 "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d6b0ad2ab0ad11d3
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.35-31-generic (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry "Ubuntu, with Linux 2.6.35-31-generic (recovery mode) (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry "Ubuntu, with Linux 2.6.35-30-generic (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry "Ubuntu, with Linux 2.6.35-30-generic (recovery mode) (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic (recovery mode) (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
initrd /boot/initrd.img-2.6.35-22-generic
}
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# <fs> <mount point> <type> <options> <dump> <pass>
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
load_env
fi
set default="7"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-31-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
echo 'Loading Linux 2.6.35-31-generic ...'
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
echo 'Loading Linux 2.6.35-30-generic ...'
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set D6B0AD2AB0AD11D3
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-5-686 (on /dev/sda6)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro resume=UUID=74ba497d-c254-4674-a268-9594a692f18e quiet acpi_osi=Linux
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode) (on /dev/sda6)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro single resume=UUID=74ba497d-c254-4674-a268-9594a692f18e
initrd /boot/initrd.img-2.6.32-5-686
}
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#<file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
The error message is "Reboot and select proper boot device etc.".
Not sure about this, but that could mean that the boot device priority in the BIOS has been screwed. You can check this by going into the BIOS menu by pressing <Del> or <Esc> immediately after switching on. Hunt through the menus until you find something like 'Boot Device Priority' and enter this. It's normal for the first priority to be Floppy or CDROM or USB-HDD, depending on what you have. (If you don't want it to boot from the USB, don't leave a bootable USB in the machine when booting). Next priority should be your hard disk.
It's also possible that there's something wrong with your grub.cfg. The easiest way to fix this is to boot into either Ubuntu or Debian and open a terminal and type:
Updated & reinstalled grub in Ubuntu. Now it boots windows!
> It's also possible that there's something wrong with your grub.cfg. The
> easiest way to fix this is to boot into either Ubuntu or Debian and open
> a terminal and type:
> Code: sudo update-grub
impert, you are right. I should start from the obvious and check it *correct*. I thought that the updates in ubuntu did also update and reinstall grub and I didn't bother to check myself. But actually, the last grub update was from debian.
So, when I updated and reinstalled grub frum ubuntu, I saw that windows was booting!
Now, I want to edit the grub settings in debian (=the OS I use regularly), so that grub from there boots windows normally. If not, I am somehow dependent on the ubuntu installation.
The difference in line 8 is the obvious and the interesting. Grub boots from the ubuntu partition now.
The windows entries in both ubuntu and debian grub.cfg files are the same (apart from the capitalization of the uuid)
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set D6B0AD2AB0AD11D3
drivemap -s (hd0) ${root}
chainloader +1
}
Diffing the whole grub.cfg files doesn't help a lot, there are many differences because of different boot order. But I think the global settings are the same.
So, that means when booting from sda7 (=the Ubuntu) partition, something is different. What should that be? Can you help me a little more?
I attach here the output of the boot info script after running grub update in ubuntu:
Boot Info Script 0.60 from 17 May 2011
============================= Boot Info Summary: ===============================
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 7 for (,msdos7)/boot/grub.
File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda1 has
83877872 sectors, but according to the info from
fdisk, it has 83886080 sectors.
Operating System: Windows XP
Boot files: /menu.lst /boot.ini /grldr /grldr /ntldr /NTDETECT.COM
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
}
terminal_input console
terminal_output console
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/01_915resolution ###
insmod 915resolution
915resolution 58 1366 768 32
### END /etc/grub.d/01_915resolution ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
set gfxpayload=1366x768x32
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro resume=UUID=74ba497d-c254-4674-a268-9594a692f18e quiet acpi_osi=Linux
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
set gfxpayload=1366x768x32
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro single resume=UUID=74ba497d-c254-4674-a268-9594a692f18e
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
### 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 "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d6b0ad2ab0ad11d3
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.35-31-generic (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry "Ubuntu, with Linux 2.6.35-31-generic (recovery mode) (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry "Ubuntu, with Linux 2.6.35-30-generic (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry "Ubuntu, with Linux 2.6.35-30-generic (recovery mode) (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic (recovery mode) (on /dev/sda7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
initrd /boot/initrd.img-2.6.35-22-generic
}
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# <fs> <mount point> <type> <options> <dump> <pass>
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
load_env
fi
set default="7"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-31-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
echo 'Loading Linux 2.6.35-31-generic ...'
linux /boot/vmlinuz-2.6.35-31-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-31-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
echo 'Loading Linux 2.6.35-30-generic ...'
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=51f56686-14d5-484d-a5eb-1a6c6d412c23 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 51f56686-14d5-484d-a5eb-1a6c6d412c23
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set D6B0AD2AB0AD11D3
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-5-686 (on /dev/sda6)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro resume=UUID=74ba497d-c254-4674-a268-9594a692f18e quiet acpi_osi=Linux
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode) (on /dev/sda6)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set dbf57160-0abf-42c3-aa63-957ec5794622
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=dbf57160-0abf-42c3-aa63-957ec5794622 ro single resume=UUID=74ba497d-c254-4674-a268-9594a692f18e
initrd /boot/initrd.img-2.6.32-5-686
}
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#<file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
Now, I want to edit the grub settings in debian (=the OS I use regularly), so that grub from there boots windows normally. If not, I am somehow dependent on the ubuntu installation.
Well, the Grub installed in the MBR has to point somewhere. Since you used Ubuntu, it points to Ubuntu. If you execute the same commands from Debian, it will point to Debian.
I don't see that it is a problem. One could argue that you're more likely to bork the system that you use regularly than the one you don't use so much. You can alter the default OS by editing /etc/default/grub, and changing the number in the line "GRUB_DEFAULT=n" to the number of the OS you want.
I suspect that your problem arose because Windows updated the MBR and marched all over Grub. I don't use Windows, so I'm not the person to advise you on how to stop this happening, but a little googling will find you more tutorials on Windows/Linux multibooting than you can poke a stick at. Just booting tips is a good start.
I don't see that it is a problem. One could argue that you're more likely
to bork the system that you use regularly than the one you don't use so much. You can alter the default OS by editing /etc/default/grub
You don't get the point.
Let's go again. Summarizing is also good for me, to revise the problem. Maybe I wasn't clear enough:
Problem: 2 different grub installations in different linux distros, one boots windows fine. The other doesn't. grub.cfg files are the same. I am trying to figure out what is wrong in the other grub configuration.
-------
Details:
-------
I first resized win partition and created space for various linux distros in this small netbook. I never did any repartitioning after that. Then, I installed debian. Windows was bootable from debian's grub. When, later, I installed ubuntu, the grub installation from there could also boot windows.
Problems started when, after an update in debian, its grub was written agin in the mbr. Of course it detected all OSes (debian,ubuntu,xp) and created proper boot entries. I can boot both debian and ubuntu, ***BUT*** the windows xp entry does not work.
When I say that (debian grub) windows xp entry does not work, I mean: The grub chainloader seems to pass control to windows, but windows appears to look at the first partition of the 2nd drive to boot. How do I know that? Because I get a "Reboot and select proper boot device etc", but if I have a bootable usb flash plugged in, it boots from there! [Remark: Computer _doesn't boot directly_ from usb, it's not a matter of BIOS and boot priorities. As I just said, I enter grub, I select windows xp option and when I press enter, _then_ it boots from the usb! So, is this a windows' problem?]
But, before you say "I don't know anything about windows", here's the catch: Why, when i choose the windows xp entry (with same settings) from ubuntu grub installation, it works just fine? I am wondering what exactly is the difference between the two grub installations. grub.cfg files are the same (uuid is correct):
Code:
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set D6B0AD2AB0AD11D3
drivemap -s (hd0) ${root}
chainloader +1
}
The windows entries in both ubuntu and debian grub.cfg files are the same (apart from the capitalization of the uuid)
What happens when you copy the UUID from Ubuntu grub.cfg (in uppercase letters) to the Debian grub.cfg? Seems like a pretty simple thing to try with nothing to lose. I don't use windows much but it seems the uuid letter are always caps.
[SOLVED] Debian+XP@netbook: Can't boot windows, it tries to boot from usb!
Quote:
Originally Posted by yancek
What happens when you copy the UUID from Ubuntu grub.cfg (in uppercase letters) to the Debian grub.cfg? Seems like a pretty simple thing to try with nothing to lose. I don't use windows much but it seems the uuid letter are always caps.
I tried this as well. The signature was the same.
UPDATE, after some time: Finally, the issue was bypassed. I have started using Ubuntu for other reasons, mainly the optimal driver support. Grub entries created by Ubuntu allow windows to boot just fine. I actually abandoned debian, it had left me with many problems to handle manually.
So, in that case, the answer to the problem was: Can't solve it? Try to bypass it, save some time and enjoy more the (rest) of your life. q-:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.