UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
Some backgound. I have a dual boot system with Win XP and Ubuntu 8.04 and have been using it for some time. I have two hard drives in my machine the larger one is used for storage. I recently did some upgrades where I installed a SATA drive cloned the info from the drive that was removed and then my IDE did not work properly as it was on an IDE Bridge. The IDE drive had the operating systems. To make a long story short I replaced the IDE with another SATA and cloned the IDE on to the SATA. I had to repair install Windows since the SATA didn't recognize it and reinstalled Ubuntu back on the partion that I had for it previously. Everything worked fine meaning the GRUB worked and I amended the order so XP booted first however after I downloaded updates that were available for Ubuntu I could no longer get GRUB to work at all after re-booting. I used the Live CD to get GRUB back on and while it launches and provides the options of booting Windows or tab up to Ubuntu, it can't seem to find Ubuntu and says something about unable to locate the partition. I have spent considerable time searching for a fix without a lot of complexity but most repairs seem to refer to GRUB 2 and I understand my version of Ubuntu uses the previous version of GRUB. Other posts also refer to GRUB not being available at all however mine is it just isn't working properly. This is my first post and I have to admit I am not fluent in a lot of terminal dialogue that is sometimes used but I can follow instructions. I need to fix this boot problem withou shutting down the computer for long as the wife uses it (Windows) often. Thanks for reading this lengthy post.
Hopefully I did this correctly and the required information is here.
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #5 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> Lilo is installed in the MBR of /dev/sdb
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM /IO.SYS /MSDOS.SYS
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: According to the info in the boot sector, sdb5 starts
at sector 63.
Operating System:
Boot files/dirs:
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: According to the info in the boot sector, sdb6 starts
at sector 63.
Operating System:
Boot files/dirs:
# 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/doc/grub-doc/.
## 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 4
## 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/$aW78kHK1QfV3P2b2znUoe/
# 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_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=1687e328-8c2d-4886-b672-9665150942ab ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,5)
## 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=true
## lockalternative=false
# lockalternative=false
## 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=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## 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
## 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
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
title Ubuntu 8.04.4 LTS, kernel 2.6.24-16-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=1687e328-8c2d-4886-b672-9665150942ab ro single
initrd /boot/initrd.img-2.6.24-16-generic
title Ubuntu 8.04.4 LTS, memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
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 Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
Your bootinfoscript shows you are using Grub Legacy in Ubuntu 8.04.
Grub Legacy counts hard drives from zero.
Grub Legacy counts partitions from zero.
Your info shows Grub is looking for boot files on sda5. In Grub Legacy, that would be (hd0,4)
Your entries for Ubuntu menu.lst are incorrect showing (hd0,5) which would have it trying to boot sda6 which is your swap partition.
Newer versions of Ubuntu with Grub2, Grub2 counts hard drives from zero but partitions from one.
I agree with yancek. I might also add that I consider it unlikely to get to this situation via a simple update from Ubuntu. Not impossible, just very unlikely.
You didn't happen to delete a (logical) partition by any chance ?.
Note that your change of the default was invalidated due to the introduction of two more Ubuntu options at the top of the list.
Solution is best done from the liveCD - boot it up and post the output of this issued in a terminal - then we can construct a command to fix things (hopefully ), making sure to hit the correct menu.lst
Code:
df -hT
Last edited by syg00; 03-19-2011 at 09:12 PM.
Reason: forgot the command - d'oh
I formatted the unallocated drive after the Linux Swap hoping to use it as another storage drive however when I was having problems with the boot I deleted it putting it back to the way it was. If not able to repair the GRUB what about reinstalling Ubuntu and starting it from scratch?
Your bootinfoscript shows you are using Grub Legacy in Ubuntu 8.04.
Grub Legacy counts hard drives from zero.
Grub Legacy counts partitions from zero.
Your info shows Grub is looking for boot files on sda5. In Grub Legacy, that would be (hd0,4)
Your entries for Ubuntu menu.lst are incorrect showing (hd0,5) which would have it trying to boot sda6 which is your swap partition.
Newer versions of Ubuntu with Grub2, Grub2 counts hard drives from zero but partitions from one.
If you change ubuntu entries in your menu.lst from a liveCD from (hd0,5) to (hd0,4) and then reinstall grub, you should be good.
... what about reinstalling Ubuntu and starting it from scratch?
Ubuntu 8.04 wilreach end of life (EOL) in April 2011 for the dsktop version: https://help.ubuntu.com/community/Co...estions#Stable
You should do a dist-upgrade, or better yet, a clean install of 10.04 if you want stick with LTS versions of Ubuntu. Or do a clean install of 10.10 if you want the newest version.
Using either 10.04 or 10.10 will upgrade your grub legacy to grub2.
Here is the Ubuntu tutorial on grub2 for more info: https://help.ubuntu.com/community/Grub2
So ...
- to "fix" your current environment, mount your disk partition (I was hoping the liveCD would do that automagically) - from Places I guess in Ubuntu - change the groot to (hd0,4), then run update-grub. As per the link in post #8 (not post #9).
- or do an upgrade, and ignore the current problem altogether.
It wasn't part of grub, but Debian (and derivatives like Ubuntu) ship it. Should be there even that far back.
Ubuntu devs were heavily involved in the (later) grub2 development, so that syle carried over.
Perhaps it was then, but I just don't remember ever seeing anyone using update-grub in grub legacy on versions of Ubuntu that used grub legacy.
Anyway, if the OP edits his menu.lst file as you suggested, it should not even be necessary to run update-grub with grub legacy. It should just boot with the changes made to menu.lst.
I used to edit Ubuntu's menu.lst from my Slackware install, or from whatever other distro I was using at the time. The next time I rebooted the changes made to menu.lst would work just fine.
This was what i liked about grub legacy. Now with grub2, you must boot up Ubuntu and run update-grub after editing any grub2 configuration files in order to update the boot/grub/grub.cfg file to make the changes work.
Anyway, if the OP edits his menu.lst file as you suggested, it should not even be necessary to run update-grub with grub legacy. It should just boot with the changes made to menu.lst.
I used to edit Ubuntu's menu.lst from my Slackware install, or from whatever other distro I was using at the time. The next time I rebooted the changes made to menu.lst would work just fine.
You can edit the grub.cfg but it probably will go back or break the first time it does an os-prober or update. I have a grub2 and chainload multiple distros. I have it in its own partition and made the grub.cfg file from scratch. I disabled grub-update and os-prober and set the timeouts to '0'.
Quote:
This was what i liked about grub legacy. Now with grub2, you must boot up Ubuntu and run update-grub after editing any grub2 configuration files in order to update the boot/grub/grub.cfg file to make the changes work.
As with anything new there are going to be changes that we need to adapt to. Sometimes I have a hard time seeing the benefit also.
Last edited by Larry Webb; 03-20-2011 at 06:39 AM.
OK, so I downloaded and burned Ubuntu 10.4 LTS and tried it out live and it seems to work fine. If I want to install this version will it overwrite my existing installed 8.04 or do I have to do anything different? Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.