Grub gives "missing partition" after running 9.10 Live
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.
Grub gives "missing partition" after running 9.10 Live
My system is a dual-boot arrangement with Windows XP and Ubuntu 8.04 running. I use Grub as my bootloader and it has been fine.
I recently downloaded and burned the new Ubuntu 9.10. After running it in Live mode, I found I could no longer boot from my old Grub menu. If I try to select my normal 8.04 version, I get a message that the partition can't be found. And if I try to select my Windows boot, I get a message to "remove disk and try again".
In my menu.lst, I have Windows as the default. I discovered that if I allow the Grub timer to run down, it boots Windows just fine. If I use the arrow keys to move up or down my menu selection, I get the "remove disk and try again" after moving back to the bottom of the list.
Fortunately, I have a backup Grub boot floppy, which actually has the same menu.lst and device list at the one on my HD. It boots up perfectly, letting me get into either 8.04 or XP.
Looks like the Live 9.10 did change something on my HD involving grub.
Anyone else run into this, or anyone have a solution?
Here is my menu.lst. (Don't know how to post in a Code Box - sri)
I have not included the commented parts of menu.lst - just the bottom section.
It defaults to the top entry (0) after 10 seconds.
------------------------------------------------------
...
## ## End Default Options ##
title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro single
initrd /boot/initrd.img-2.6.24-25-generic
title Ubuntu 8.04.3 LTS, memtest86+
root (hd0,1)
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 Windows NT/2000/XP
root (hd0,0)
savedefault
makeactive
chainloader +1
aus9, thanks again.
OK, I've commented out the "savedefault"in the ms script.
Here is the full menu.lst:
Code:
# 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/.
# This is MENU.LST on the floppy backup.
## 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/$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=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)
## 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
## ## End Default Options ##
title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro quiet splash
initrd /boot/initrd.img-2.6.24-25-generic
quiet
title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro single
initrd /boot/initrd.img-2.6.24-25-generic
title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro single
initrd /boot/initrd.img-2.6.24-21-generic
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=caa2f434-a72e-47e5-a5e1-3d46cdf1fb4f ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,1)
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 Windows NT/2000/XP
root (hd0,0)
# savedefault
makeactive
chainloader +1
Well, I made some progress, I think. Time will tell.
First, I booted from an older Ubuntu Live CD. Once up, I deleted everything in the hda2 /boot/grub folder, and I then copied all the "stage" files from my /usr/lib folder into /boot/grub. Then re-installed Grub onto the MBR. Keeping my fingers crossed, I rebooted from the HD.
Same error 22 message - No such partition. I dropped into Grub and ran 'find /boot/grub'. Guess what - it came back as HD1,1 instead of HD0,1! Ok, I edited the (hd0,1) line to read (hd1,1) using the grub shell, and used the boot command. Worked like a charm!
So I decided to edit my /boot/grub/menu.lst file to change all the (hd0,1) entries to (hd1,1). Then rebooted.
Got the error 22 - missing partition message again. Re-ran the 'find /boot/grub/menu.lst'./ Now it reported is on hd0,1, not hd1,1. So went back & modified the menu.lst file back to (hd0,1). Rebooted & IT WORKED!
Only problem seems to be booting to Windows. It starts to boot, gives a "remove disks & try again" message. I simply selected windows from the boot menu a 2nd time & VIOLA. Booted properly.
So I am not at all sure what has happened, but am happy that it now seems to work.
During all this time, the boot from grub on my emergency floppy disk has worked perfectly all along. Don't know if something weird was happening in the BIOS, resulting in the 2 drives being swapped around, or what.
It is curious that the whole problem started immediately (next boot-up) after I used the Ubuntu 9.10 Live disk.
Cheers & thanks for your efforts. Much appreciated.
Here it is:
Device Map file on hda1:
[CODE
(hd0) /dev/hda
(hd1) /dev/hdb
/CODE]
For comparison, here is the Device Map from my bootable floppy:
[CODE
(hd0) /dev/hda
(hd1) /dev/hdb
/CODE]
The 'installed-version' file from hda1 is:
[CODE
0.97-29ubuntu21.1
/CODE]
There is no installed-version file on the floppy drive.
Something I just noticed when I booted this time. I dropped into Grub, and it reported at the top of the page, it was Grub version 0.95, not 0.97. (This is the Grub as booting from hda. Next time I boot up, I'll do it from the floppy and see if it shows the same. I'll let you know.)
The BIOS is set to give my 120G drive as Primary, my 20G drive as Secondary, both on IDE1.
Here is the partition list:
[CODE
bryan@den:~$ sudo fdisk -l
[sudo] password for bryan:
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb88db88d
Device Boot Start End Blocks Id System
/dev/sda1 * 1 10946 87923713+ 7 HPFS/NTFS
/dev/sda2 10947 14513 28651927+ 83 Linux
/dev/sda3 14514 14593 642600 82 Linux swap / Solaris
Disk /dev/sdb: 20.4 GB, 20491075584 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa82f33f9
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2430 19518943+ c W95 FAT32 (LBA)
/dev/sdb3 2431 2491 489982+ 5 Extended
/dev/sdb5 2431 2491 489951 82 Linux swap / Solaris
bryan@den:~$
/CODE]
your fstab shows ext3 which is the same issue for inodes.
2) your mbr is linked to Grub version 0.95, not 0.97
and when you boot a recent ubuntu it probably uses isolinux bootloader so we can't tell much from that.
Now correct me if I am wrong....but I gather you booted an older live cd....and installed its old grub files..which is how you ended up with 0.95...in particular the grub stage2 would not support inode 256.
3) But my logic breaks down as you claim a 0.95 floppy boots your current ext3 system.
This could be explained in 2 main ways.
a) 0.95 supported anything so was not affected by inode size?
Who knows I am not going to investigate it
b) your changing hard drive grub was not complete?
4) Therefore....I would like you to boot the live latest
ubuntu and copy its grub files onto hard drive.
its not enought to redo grub in mbr ....as grub will find its files...but they are 0.95 files but grub won't care.
I am aware ubuntu uses sudo so lets try this?
boot cd
Research where ubuntu keeps its copies of grub stage files
possible /usr/lib/grub but we can use a command to find it
Code:
sudo updatedb
locate stage2
.....write down pathways....ignore any /media/ or /mnt/ pathways as they are your hard drive
You need to know that pathway before trying the next step
Code:
sudo mkdir /z
sudo mount /dev/sda2 /z
ls /z
(must show linux structure...report if it doesn't...and may have to use sdb2 but I hope not)
cd /z/boot/grub
sudo rm -f stage* (deletes current stage1/1.5/2 files)
sudo cp /researchedpathway2grubstage2/stage* /z/boot/grub
sudo grub
(prompt changes to grub)
root (hd0,1)
setup (hd0)
quit
cd /
sudo umount /z
You can now reboot.
What this attempts to do is use mose recent grub stage* files to replace current 0.95 stage files...and then put grub back into mbr and relink to newer stage files...but still using current menu.
now if this is too hard for you..print it out and think about it and it its still too hard....try re-installing ubuntu and reformat sda2 before installing so grub can not find any old file
This is scary - I am actually beginning to understand most of what you said. Guess I am becoming a bit more familiar with linux. Fantastic.
Here is some of my history, which might shed some light.
Way back when, I installed Ubuntu 5.10 and created the emergency floppy boot disk. So that was likely grub 0.95.
When Ubuntu 8.10 (the one I currently use), came along, I did a complete reinstall, not an update. So when the install got to the point of putting Grub on, that was likely 0.97. But the floppy still worked - maybe your comment is right on - it may not care.
Now moving up to today, ...
Yes, I reinstalled Grub from an old Live CD (Version 5.10!), so that would have been 0.95. But, I copied all the "stage" files from the library already on the hda1, so they are probably 0.97 versions.
I am thinking that if I use Synaptic to reload Grub, which will be version 0.97-ubuntu, it will put the correct stage files in the libraries. Can I then do a re-install of that new version of Grub onto my MBR, while logged into the linux ubuntu on my HD? I don't seem to have a newer version Live CD. The latest one, is Ubuntu 9.10, which uses Grub2 - a whole different ball of wax. Can't find any of the older versions, like 8.10.
Or I suppose I could d/l another live distro that has Grub 0.97. (Can you recommend any?)
Just a last update on my situation. I decided to install Ubuntu 9.10 after all. It defaults to Grub2. After doing the install, Grub2 would not boot. Just got the dreaded 'GRUB' on screen and nothing else. After a bit of thought, I booted again from the Live CD, and uninstalled Grub2, installed Grub 0.97, and updated the HD with Grub legacy, too. Eureka, Grub 0.97 legacy works now and I am happy.
I suspect Grub2's failure had to do with my not having a good install of the legacy Grub on my HD.
I may yet upgrade to Grub2, now that I have a properly booting system.
Also learned that having a Boot Floppy is a great idea. Glad I had that to fall back on. I did create a Grub 0.97 version that works flawlessly.
I do have one remaining issue, which is now just a curiosity, since I am able to boot right from the HD.
When I boot from the HD, I sometimes, (not always), see a message flash by that it is booting from (hd1,4) not (hd0,4) which is where the linux system actually exists. I guess, since I am using 'uuid" it finds the correct partitions, but it is very curious that it sometimes calls it (hd1,4). Incidentally, I never have this issue when I boot from the Floppy. with the same version of Grub (0.97) and an identical menu.lst and and Device.map.
Oh well.
Many thanks for your help, AUS9, and your patience. Sure appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.