PDA

View Full Version : [ubuntu] GRUB issues?



dead_devil_66
April 3rd, 2011, 05:48 AM
Greetings.

I have just installed windows xp in the other partition that i have in this laptop. The problem is that, after restoring the GRUB, when i try to access windows xp, i get the message:


error: no such device: f0b0bce6b0bcb486
error:hd1, msdos3 cannot get C/H/S values

press any key to continue...

When i press a key, im back at the GRUB menu. At this time, when i select ubuntu, after some seconds, the computer reboots. If i choose ubuntu first, without selecting windows xp, i can get into ubuntu. But seems i got no luck getting into windows...

What's wrong????

Rubi1200
April 3rd, 2011, 05:58 AM
Hi,

please do the following so we can get a better overview of the current state of the system:

Boot the Ubuntu Live CD/USB. Choose the option "Try Ubuntu without any changes." Once the desktop loads come back here and do the following:

1. Download the boot info script. There is a link in my signature.
2. Once downloaded, move the boot info script to the desktop.
3. Open a terminal and run the command


sudo bash ~/Desktop/boot_info_script*.sh

This will create a RESULTS.txt file on the desktop. Paste the entire contents of that file back here in a new post. Once pasted highlight all text and click the # sign on the toolbar to place code tags around the text.

dead_devil_66
April 3rd, 2011, 03:42 PM
Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #6 for (,msdos6)/boot/grub.

sda1: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sda6: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,046 141,709,311 141,707,266 5 Extended
/dev/sda5 2,048 4,980,735 4,978,688 82 Linux swap / Solaris
/dev/sda6 4,982,784 141,709,311 136,726,528 83 Linux
/dev/sda2 * 141,709,365 488,375,999 346,666,635 7 HPFS/NTFS


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1: PTTYPE="dos"
/dev/sda2 0030B06030B05E7A ntfs
/dev/sda5 80d4e78e-6bb3-4582-b369-eb0e4f806936 swap
/dev/sda6 411c9d71-ff84-40a3-b3f8-7feeade9f8ca ext4
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=========================== sda6/boot/grub/grub.cfg: ===========================

#
# 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="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
}

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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
set locale_dir=($root)/boot/grub/locale
set lang=pt
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
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-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca ro quiet splash
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
linux /boot/vmlinuz-2.6.35-27-generic root=UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca ro quiet splash
initrd /boot/initrd.img-2.6.35-27-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-27-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
echo 'Loading Linux 2.6.35-27-generic ...'
linux /boot/vmlinuz-2.6.35-27-generic root=UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-27-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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca 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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca 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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set 411c9d71-ff84-40a3-b3f8-7feeade9f8ca
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda3)" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set f0b0bce6b0bcb486
drivemap -s (hd0) ${root}
chainloader +1
}
### 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 ###

=============================== sda6/etc/fstab: ===============================

# /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
# / was on /dev/sda6 during installation
UUID=411c9d71-ff84-40a3-b3f8-7feeade9f8ca / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=80d4e78e-6bb3-4582-b369-eb0e4f806936 none swap sw 0 0

=================== sda6: Location of files loaded by Grub: ===================


61.6GB: boot/grub/core.img
43.5GB: boot/grub/grub.cfg
3.3GB: boot/initrd.img-2.6.35-22-generic
5.4GB: boot/initrd.img-2.6.35-27-generic
5.4GB: boot/initrd.img-2.6.35-28-generic
60.6GB: boot/vmlinuz-2.6.35-22-generic
60.6GB: boot/vmlinuz-2.6.35-27-generic
60.8GB: boot/vmlinuz-2.6.35-28-generic
5.4GB: initrd.img
5.4GB: initrd.img.old
60.8GB: vmlinuz
60.6GB: vmlinuz.old

================================ sda2/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

Rubi1200
April 3rd, 2011, 04:10 PM
Okay, the problem seems to be that GRUB thinks Windows is on sda3 when in fact it is now on sda2.

Also, the unique identifier has changed.

This is what I would try first:

run
sudo os-prober followed by
sudo update-grub in Ubuntu.

If this picks up the Windows install, then all is good.

If that doesn't work, then you need to create a custom entry for Windows like this:


gksu gedit /etc/grub.d/40_customAdd these lines to the file after the existing lines:


menuentry "Microsoft Windows XP Professional (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set 0030B06030B05E7A
drivemap -s (hd0) ${root}
chainloader +1
}Save the file and then run
sudo update-grubLet me know if this works or what went wrong if it didn't.

oldfred
April 3rd, 2011, 06:21 PM
In addition to everything Rubi1200 said.

Windows thinks it is in sda1 from boot.ini.
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S

Did you move partitions around after installs? Also if windows boot sector does not match partition layout it may require other windows repairs. Boot script says it is ok but it is looking at it in sda2. Boot sector may think it is sda1.

If editing windows files like boot.ini
(Using nano instead of gedit, it's better for dos-style linebreaks)
Linux, of course, uses only LF as newline and DOS is expecting CR/LF so text files look wrong in DOS.
gedit now has a combo box that lets you choose line endings (under line save as. If you use gedit you must select windows line endings.

dead_devil_66
April 3rd, 2011, 08:09 PM
Okay, the problem seems to be that GRUB thinks Windows is on sda3 when in fact it is now on sda2.

Also, the unique identifier has changed.

This is what I would try first:

run
sudo os-prober followed by
sudo update-grub in Ubuntu.

If this picks up the Windows install, then all is good.



It worked. Thanks!! :P

Krytarik
April 3rd, 2011, 11:03 PM
For future references, I want to point out that, besides the faulty entries for the Windows partition, there were also faulty entries regarding the device designations in general, as I understand it.

For example,

set root='(hd1,msdos6)'should have been instead
set root='(hd0,msdos6)'Because device designations start at 0 for Grub:



Any partition designation ((hd0,4), (hd1,6)) must be changed, as GRUB and GRUB 2 count the partitions differently. The first partition for GRUB 2 is 1, not 0. Devices still start the count at 0.

https://help.ubuntu.com/community/Grub2#Creating%20the%20Custom%20Menu

So I suspect the OP has not only moved the Windows partition, but also removed the formerly first disk.

But of course, "update-grub" has fixed this as well.

Greetings.

Rubi1200
April 4th, 2011, 05:29 AM
It worked. Thanks!! :P
No problem, you are more than welcome :D

Please mark this thread Solved using the Thread Tools near the top of the page.