U 10.10 available upgrades removes grub settings
Just installed U 10.10 on multiboot system. I was able to see the other OSs at first boot. After adding updated packages incl. new
kernel, the grub entries are all replaced and the boot sees only the U 10.10 system, not Windows Vista, U 9.10 or U 9.04 on
other partitions. How do I get grub to recreate the old conf? I know that installs and upgrades look for bootable partitions and
create entries for them. Can I do this from the install CD without clobbering what I have installed from the software sources
online? Can I get the U 10.10 install to regenerate the grub.conf and reinstall the MBR?
I find it distressing that a kernel upgrade would clobber my MBR and not tell me.
I have Vista on /dev/sda1, of course, but it has a U 9.10 install within that partition, so the boot for that partition has two
grub entries.
The U 10.10 install is from /dev/sda3 and there is a U 9.04 install on /dev/sda7.
The processor is AMD64 with 3 GB ram.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu grub2 Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- bsalem
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
Can you give the output of:
uname -a; dpkg -l | grep linux-image-2
I think you mean you want to remove the old kernels. If I am wrong please correct me
Thanks
Revision history for this message
![]() |
#2 |
Here is the output of the command you suggested.
Linux brucesalem-
ii linux-image-
ii linux-image-
I have some doubt as to the suggestion that an old kernel is the problem as I had older kernels
lying around in the earlier installs that grub kept entries for.
I am entertaining the possibility that the number of entries in grub.conf were either too many for
the MBR, or the update with the new kernel just ignored them.
I think the fix is to be able to kick grub to go out and look for bootable images on all of the
partitions on the drive, for Vista and two other Ubuntu installs and install the correct linkages on
the MBR for /dev/sda expecting to find them in the partitions shown in the initial post for this
thread. The reason I believe this is that upgrades to the earlier Ubuntu installes probed the
partitions for bootable images several times. My question is then, how do I get grub to
reprobe the disk device?
Revision history for this message
![]() |
#3 |
Have you tried running
os-prober
in a terminal?
Revision history for this message
![]() |
#4 |
Yes, as john suggested:
sudo os-prober
sudo update-grub
Revision history for this message
![]() |
#5 |
I couldn't find os-prober on the installed system. Is it on the install CD?
Revision history for this message
![]() |
#6 |
I looked in /sbin, /bin /usr/sbin /usr/bin, no os-prober. This is on the installed system.
Revision history for this message
![]() |
#7 |
Have you tried John/mycae advice?
update-grub is a quick try.
Some good reading:
http://
http://
Revision history for this message
![]() |
#8 |
I found /usr/sbin/
brucesalem@
[sudo] password for brucesalem:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
done
brucesalem@
/usr/sbin/groupadd /usr/sbin/grpunconv /usr/sbin/
/usr/sbin/groupdel /usr/sbin/
/usr/sbin/groupmod /usr/sbin/
/usr/sbin/grpck /usr/sbin/
/usr/sbin/grpconv /usr/sbin/
brucesalem@
grub-probe: info: cannot open `/boot/
grub-probe: info: /dev/sda1 starts from 63.
grub-probe: info: opening the device /dev/sda.
grub-probe: info: the size of /dev/sda is 488397168.
grub-probe: info: Partition 0 starts from 63.
grub-probe: info: opening /dev/sda,msdos1.
grub-probe: info: the size of /dev/sda is 488397168.
ntfs
brucesalem@
grub-probe: info: cannot open `/boot/
grub-probe: info: /dev/sda7 starts from 394845633.
grub-probe: info: opening the device /dev/sda.
grub-probe: info: the size of /dev/sda is 488397168.
grub-probe: info: Partition 0 starts from 63.
grub-probe: info: Partition 1 starts from 464792580.
grub-probe: info: Partition 2 starts from 276738048.
grub-probe: info: Partition 4 starts from 372820518.
grub-probe: info: Partition 5 starts from 376724313.
grub-probe: info: Partition 6 starts from 394845633.
grub-probe: info: opening /dev/sda,msdos7.
grub-probe: info: the size of /dev/sda is 488397168.
ext2
brucesalem@
grub-probe: info: cannot open `/boot/
grub-probe: info: /dev/sda3 starts from 276738048.
grub-probe: info: opening the device /dev/sda.
grub-probe: info: the size of /dev/sda is 488397168.
grub-probe: info: Partition 0 starts from 63.
grub-probe: info: Partition 1 starts from 464792580.
grub-probe: info: Partition 2 starts from 276738048.
grub-probe: info: opening /dev/sda,msdos3.
grub-probe: info: the size of /dev/sda is 488397168.
ext2
brucesalem@
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
done
Revision history for this message
![]() |
#9 |
Adding info:
brucesalem@
Linux brucesalem-
brucesalem@
i686
brucesalem@
brucesalem@
i686
Revision history for this message
![]() |
#10 |
Could you run following procedure:
-------
provide data about boot configuration
There is a standard script provided to analyze boot configuration.
Could you download script at:
http://
Then in a terminal (Ctrl+Alt+T) run command:
sudo bash boot_info_
This will produce a file named: RESULTS.txt
Paste content of this file in http://
Please don't post file directly in thread, else it will make thread difficult to read.
Revision history for this message
![]() |
#11 |
You can run:
sudo apt-get --purge remove linux-image-
Which will save you ~120Mb space
Revision history for this message
![]() |
#12 |
I have the RESULTS.txt file, it is 25K in length. Is there a way to upload the file to an alternative
area, the Ubuntu Paste web page is just as lame as cutting and pasting from the terminal. Why
is there no file upload feature, there should be?
Can you tell me what the parts of the file you need to see. It has info about fs but also has what
looks like lots of shell script, or debugging output (-x) from the script? I'd rather not cut and paste
25 K of text.
Either that or give me a ftp server to upload the whole file, please.
Revision history for this message
![]() |
#13 |
There is, just because you don't know about it doesn't mean it doesn't exist......
sudo apt-get install pastebinit; pastebinit /path/to/
What sort of mindset must you have to think like that. I'm quite surprised. You can also upload images with:
sudo apt-get install photo-uploader; photo-upload /path/to/imagefile
Revision history for this message
![]() |
#14 |
Sorry, It didn't dawn on me that I'd have to install a package, as I had seen a web page. It is still not clear to me if pastebinit is just local to my system or a client of paste.ubuntu.com. Is that right?
i will do the above and get the RESULTS.txt to this thread.
Revision history for this message
![]() |
#15 |
brucesalem@
http://
Revision history for this message
![]() |
#16 |
I did the remove of the old kernel stuff suggested above, thanks. I reran the script and pasted the output as suggested above, thank you. Note the ID above.
The kernel remove said that I may need to rerun grub. I did the 'sudo grub-update' and it saw one
less than before, but not the entries from the other OSs installed. The issue remains unresolved.
I am not as aware of the power of the apt command as I should be, thanks.
Revision history for this message
![]() |
#17 |
I reposted to the correct pastebin:
brucesalem@
brucesalem@
[sudo] password for brucesalem:
http://
Revision history for this message
![]() |
#18 |
You don't need sudo for pastebinit.
Paste text here as the pastebin will expire:
=======
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #3 for (,msdos3)
=> Windows is installed in the MBR of /dev/sdb
sda1: _______
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows Vista
Boot files/dirs: /bootmgr /Boot/BCD /Windows/
sda1/Wubi: _______
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04.1 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab
sda2: _______
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /boot/bcd
sda3: _______
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
sda4: _______
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: _______
File system: swap
Boot sector type: -
Boot sector info:
sda6: _______
File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
sda7: _______
File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.04
Boot files/dirs: /boot/grub/menu.lst /etc/fstab
sda8: _______
File system: swap
Boot sector type: -
Boot sector info:
sdb1: _______
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:
=======
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 * 63 276,545,535 276,545,473 7 HPFS/NTFS
/dev/sda2 464,792,580 488,392,064 23,599,485 7 HPFS/NTFS
/dev/sda3 276,738,048 372,819,967 96,081,920 83 Linux
/dev/sda4 372,820,516 464,792,579 91,972,064 5 Extended
/dev/sda5 372,820,518 376,724,249 3,903,732 82 Linux swap / Solaris
/dev/sda6 376,724,313 394,845,569 18,121,257 83 Linux
/dev/sda7 394,845,633 461,820,554 66,974,922 83 Linux
/dev/sda8 461,820,618 464,792,579 2,971,962 82 Linux swap / Solaris
Drive: sdb ___________________ _______
Disk /dev/sdb: 1499.6 GB, 1499598946304 bytes
255 heads, 63 sectors/track, 182315 cylinders, total 2928904192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start End Size Id System
/dev/sdb1 2,048 2,928,904,191 2,928,902,144 7 HPFS/NTFS
blkid -c /dev/null: _______
Device UUID TYPE LABEL
/dev/loop0 f600464c-
/dev/sda1 36B02D69B02D30B3 ntfs COMPAQ
/dev/sda2 949CA48C9CA46A86 ntfs FACTORY_IMAGE
/dev/sda3 e5fb3b55-
/dev/sda4: PTTYPE="dos"
/dev/sda5 579c9e45-
/dev/sda6 f703eae3-
/dev/sda7 051ab835-
/dev/sda8 a14b4dd7-
/dev/sda: PTTYPE="dos"
/dev/sdb1 486E622C6E62134C ntfs My Book
/dev/sdb: PTTYPE="dos"
=======
Device Mount_Point Type Options
/dev/sda3 / ext4 (rw,errors=
/dev/sr1 /media/WD SmartWare udf (ro,nosuid,
/dev/sdb1 /media/My Book fuseblk (rw,nosuid,
/dev/sda7 /media/
=======
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set 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_
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
}
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
loopback loop0 /ubuntu/
set root=(loop0)
if loadfont /usr/share/
set gfxmode=640x480
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 ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
loopback loop0 /ubuntu/
set root=(loop0)
set locale_
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Ubuntu, Linux 2.6.32-25-generic" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
loopback loop0 /ubuntu/
set root=(loop0)
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, Linux 2.6.32-25-generic (recovery mode)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
loopback loop0 /ubuntu/
set root=(loop0)
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
loopback loop0 /ubuntu/
set root=(loop0)
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, Linux 2.6.31-17-generic (recovery mode)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
loopback loop0 /ubuntu/
set root=(loop0)
linux /boot/vmlinuz-
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Windows Vista (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 36b02d69b02d30b3
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 949ca48c9ca46a86
chainloader +1
}
menuentry "Debian GNU/Linux (lenny/sid) (on /dev/sda3)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set 44d96747-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu 9.04, kernel 2.6.28-19-server (on /dev/sda7)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 051ab835-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu 9.04, kernel 2.6.28-19-server (recovery mode) (on /dev/sda7)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 051ab835-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu 9.04, kernel 2.6.28-19-generic (on /dev/sda7)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 051ab835-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu 9.04, kernel 2.6.28-19-generic (recovery mode) (on /dev/sda7)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 051ab835-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu 9.04, memtest86+ (on /dev/sda7)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 051ab835-
linux /boot/memtest86
}
### END /etc/grub.
### BEGIN /etc/grub.
# 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.
=======
# /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 defaults 0 0
/host/ubuntu/
/host/ubuntu/
================= sda1/Wubi: Location of files loaded by Grub: =================
2.6GB: boot/grub/grub.cfg
1.8GB: boot/initrd.
3.4GB: boot/initrd.
2.9GB: boot/vmlinuz-
7.2GB: boot/vmlinuz-
3.4GB: initrd.img
7.2GB: vmlinuz
=======
#
# 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.
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_
set 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_
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,msdos3)'
search --no-floppy --fs-uuid --set e5fb3b55-
if loadfont /usr/share/
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set e5fb3b55-
set locale_
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
menuentry 'Ubuntu, with Linux 2.6.35-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set e5fb3b55-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set e5fb3b55-
echo 'Loading Linux 2.6.35-24-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set e5fb3b55-
linux16 /boot/memtest86
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set e5fb3b55-
linux16 /boot/memtest86
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
# 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.
### BEGIN /etc/grub.
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.
=======
# /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
/dev/sda3 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=579c9e45-
# swap was on /dev/sda8 during installation
UUID=a14b4dd7-
=================== sda3: Location of files loaded by Grub: ===================
142.9GB: boot/grub/core.img
142.5GB: boot/grub/grub.cfg
148.4GB: boot/initrd.
145.7GB: boot/vmlinuz-
148.4GB: initrd.img
145.7GB: vmlinuz
=======
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_
## kopt_2_
# kopt=root=
## default grub root device
## e.g. groot=(hd0,0)
# groot=051ab835-
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative
## lockalternative
# lockalternative
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=
# altoptions=
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaulten
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 9.04, kernel 2.6.28-19-server
uuid 051ab835-
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu 9.04, kernel 2.6.28-19-server (recovery mode)
uuid 051ab835-
kernel /boot/vmlinuz-
initrd /boot/initrd.
title Ubuntu 9.04, kernel 2.6.28-19-generic
uuid 051ab835-
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu 9.04, kernel 2.6.28-19-generic (recovery mode)
uuid 051ab835-
kernel /boot/vmlinuz-
initrd /boot/initrd.
title Ubuntu 9.04, kernel 2.6.27-17-server
uuid 051ab835-
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu 9.04, kernel 2.6.27-17-server (recovery mode)
uuid 051ab835-
kernel /boot/vmlinuz-
initrd /boot/initrd.
title Ubuntu 9.04, memtest86+
uuid 051ab835-
kernel /boot/memtest86
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista/Longhorn (loader)
root (hd0,0)
savedefault
makeactive
chainloader +1
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows Vista/Longhorn (loader)
root (hd0,1)
savedefault
makeactive
chainloader +1
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
title Debian GNU/Linux (lenny/sid) (on /dev/sda3)
root (hd0,2)
kernel /boot/vmlinuz-
initrd /boot/initrd.
savedefault
boot
=======
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda7
UUID=051ab835-
# /dev/sda8
UUID=a14b4dd7-
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,
=================== sda7: Location of files loaded by Grub: ===================
210.9GB: boot/grub/menu.lst
210.9GB: boot/grub/stage2
211.0GB: boot/initrd.
211.0GB: boot/initrd.
211.0GB: boot/initrd.
210.9GB: boot/vmlinuz-
210.9GB: boot/vmlinuz-
211.0GB: initrd.img
211.0GB: initrd.img.old
210.9GB: vmlinuz
210.9GB: vmlinuz.old
Revision history for this message
![]() |
#19 |
@actionparsnip: Hello, could you tell me after how much time pastebin expires.
Revision history for this message
![]() |
#20 |
I believe its a month but when it expires and a user finds this post, the data will have been lost
Revision history for this message
![]() |
#21 |
Os_prober reports the old menu entry for /dev/sda3 for a Debian install. There was a partial Debian install on that partition, but it should be replaced with the current one, this U 10.10 install.
Maybe that is why grub doesn't see the rest of the entries on /dev/sda boot record.
Revision history for this message
![]() |
#22 |
You have one Linux installed via Wubi and another one installed alongside Windows.
Could you explain me you choose to have both type of installation at same time ?
It makes configuration more complex.
Revision history for this message
![]() |
#23 |
The configuration with Wubi and separate Linux Partitions worked just fine, that is, I was able to
boot from EXT filesystems and from within NTFS and the Vista OS that owned it. In fact, I was
able to upgrade both the native and Wubi installs earlier and they updated the MBR just fine and grub saw everything, until I installed the suggested updates including the updated kernel with this new installl. That upgrade caused the grub configuration to lose all the history and come up with only the latest install.
I had attempted to install Debian 5 on /dev/sda3, but only part of that OS installed and I was never able to get apt-get to add more packages, besides the partition was small. So when I decided to do a new install of U 10,10 I used gparted to shrink the Vista NTFS and grow /dev/sda3 and installed the new OS. After that the grub config was still what I had. Then when I
added the suggested upgrades, that is when I got this problem.
What is a mystery to me is why the upgrade didn't get the correct grub config like two upgrades
and a fresh install had done before?
What I need now is to know what to do the get the grub config back in light of what is in the RESULTS.txt. Do I need to run grub-mkconfig? Where is the script getting the info from that it would be able to correctly boot the new install in /dev/sda3 and yet report the old menu entry?
I know that there may be several grub.conf files in the different installs, but only one MBR.
Maybe the one inside the Wubi install is the best one. Should I copy it to the U 10.10 intall
and rerun grub? Should I merge it with the current one and rerun grub?
This matter is not resolved. Should I file a bug against the latest kernel or upgrades?
Revision history for this message
![]() |
#24 |
Sorry, that was a little unclear.
Should I copy the grub.conf from the Wubi install into this one and merge it with the current one
in this install? And then do I need to run grub-install to turn it into the MBR?
I am getting this idea from the possibility that the script that produced RESULTS.txt get its info
from two grub.conf files and the disk partition map.
Revision history for this message
![]() |
#25 |
For me, your configuration looks very complicated and not homogeneous.
I'm not sure what to do.
You could run "sudo update-grub" and see what are results.
If it fails, run os-prober and report result.
Revision history for this message
![]() |
#26 |
delance,
Your suggestion produced no change:
brucesalem@
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
done
Revision history for this message
![]() |
#27 |
Could you post result of
sudo os-prober
Revision history for this message
![]() |
#28 |
To repeat myself:
brucesalem@
[sudo] password for brucesalem:
sudo: os-prober: command not found
brucesalem@
00_header 10_linux 20_memtest86+ 40_custom README
05_debian_theme 20_linux_xen 30_os-prober 41_custom
brucesalem@
The info should already be in the RESULTS.txt posted above.
I am tempted to boot knopixx 6.3 and have IT rewrite the grub configuration and the MBR for
/dev/sda. What do people here think of that tact?
There is a grub2 bug I have linked this question to. I have not gotten useful feedback on how
to resolve this, I'd like to because I am worried about the NTFS filesystem on the Western Digital
My Book. Ubuntu doesn't seem to know how to do what ckhdsk does on Vista and if I get more
loose ends on that filesystem I'd need to boot into Vista to repair it. How could I boot Vista with
the broken grub config I have?
Can rescue Linices fix the grub problem?
Can the grub shell be sued to boot from one of the other partitions?
BTW, IMHO, the grub document is poorly written. Any expertise that people have WRT my
questions about using the other partitions I have would be appreciated and especially getting
the proper grub config back.
Should I be filing a separate bug against U 10.10 and Grub2 for the case where upgrade to
the latest kernel broke grub?
Revision history for this message
![]() |
#29 |
Do you mean grub-probe?
brucesalem@
grub-probe: info: cannot open `/boot/
grub-probe: info: /dev/sda1 starts from 63.
grub-probe: info: opening the device /dev/sda.
grub-probe: info: the size of /dev/sda is 488397168.
grub-probe: info: Partition 0 starts from 63.
grub-probe: info: opening /dev/sda,msdos1.
grub-probe: info: the size of /dev/sda is 488397168.
ntfs
There is no Device Map
Revision history for this message
![]() |
#30 |
Same as before. Should the results be different. It sees that the partition is ext2.
brucesalem@
grub-probe: info: cannot open `/boot/
grub-probe: info: /dev/sda3 starts from 276738048.
grub-probe: info: opening the device /dev/sda.
grub-probe: info: the size of /dev/sda is 488397168.
grub-probe: info: Partition 0 starts from 63.
grub-probe: info: Partition 1 starts from 464792580.
grub-probe: info: Partition 2 starts from 276738048.
grub-probe: info: opening /dev/sda,msdos3.
grub-probe: info: the size of /dev/sda is 488397168.
ext2
Revision history for this message
![]() |
#31 |
What is the output of:
file /boot/grub/
Thanks
Revision history for this message
![]() |
#32 |
brucesalem@
/boot/grub/
The Device Map is missing. Why? How do I create it?
Why did a kernel upgrade clobber this file?
Revision history for this message
![]() |
#33 |
seems you need to run:
echo "(hd0) /dev/sda" | sudo tee /boot/grub/
Should do it
Revision history for this message
![]() |
#34 |
Could you install os-prober with Synaptic and post result of commands.
Revision history for this message
![]() |
#35 |
brucesalem@
[sudo] password for brucesalem:
(hd0) /dev/sda
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: /dev/sda3 starts from 276738048.
grub-probe: info: opening the device hd0.
grub-probe: info: the size of hd0 is 488397168.
grub-probe: info: Partition 0 starts from 63.
grub-probe: info: Partition 1 starts from 464792580.
grub-probe: info: Partition 2 starts from 276738048.
grub-probe: info: opening hd0,msdos3.
grub-probe: info: the size of hd0 is 488397168.
ext2
Device map is in /boot/grub
But:
brucesalem@
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
done
This doesn't look right.
Revision history for this message
![]() |
#36 |
brucesalem@
/boot/grub/
brucesalem@
(hd0) /dev/sda
Revision history for this message
![]() |
#37 |
brucesalem@
/dev/sda1:Windows Vista (loader)
/dev/sda2:Windows Vista (loader)
/dev/sda7:Ubuntu 9.04 (9.04):Ubuntu:linux
I notice no /dev/sda3 here.
Revision history for this message
![]() |
#38 |
Oh, it sees OTHER OS's, remember that the Wubi boot is in the menu for /dev/sda1. I select the
vista boot entry and the Wubi menu entry is in the submenu. It looks like the MBR lost these
boot menus.
Revision history for this message
![]() |
#39 |
Is this the fix?
brucesalem@
[sudo] password for brucesalem:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
Found Windows Vista (loader) on /dev/sda1
Found Windows Vista (loader) on /dev/sda2
Found Ubuntu 9.04 (9.04) on /dev/sda7
done
brucesalem@
[sudo] password for brucesalem:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
Found Windows Vista (loader) on /dev/sda1
Found Windows Vista (loader) on /dev/sda2
Found Ubuntu 9.04 (9.04) on /dev/sda7
done
The acid test is to reboot.
Revision history for this message
![]() |
#40 |
The problem is solved. I rebooted and saw the boot menus and was able to reboot each of
the old installs. Thanks everyone.
The only issue to note is that an upgrade can somehow clobber the device map, maybe there
is something wrong with the install scripts or the configuration of that kernel.
To tempt fate. I just did the recommended updates for the Wubi install, but did not reboot that
yet, and I saved tthe grub.cfg file in a safe place available to all Linices, just in case.