Jump to content

Grub 'Error 25' after first stage Ubuntu install


jgb2185

Recommended Posts

I have a Dell Optiplex gx110 that I am using as an experimental machine. It came with a 10 GB HD on which WinXP is installed, and I'd like to keep it.I have installed a 120 MB HD as the slave drive, specifically for use with Linux. Last night, I tried installing Ubuntu 5.04 'Hoary Hedgehog' on this beast.I have partitioned the 120 GB slave drive as follows:

    /dev/hdb1    swap  512 MB    (no mount point)    /dev/hdb2    ext3    512 MB    /boot    /dev/hdb3 extended        /dev/hdb5 ext3      1 GB    /    (root)        /dev/hdb6 ext3    10 GB    /usr        /dev/hdb7 ext3      1 GB    /tmp        /dev/hdb8 ext3      1 GB    /var        /dev/hdb9 ext3    30 GB    /home
During the first stage of the install, I okayed the installation of GRUB, and restarted the PC. The result is:
    GRUB loading stage1.5    GRUB loading, please wait...    Error 25
The Ubuntu install, not surpringly, will not complete. Googling indicates that this may be an error in the generated menu.lst file, which I have attached to the end of this post.Can someone point me to the error in the file? I have sufficient skills to modify it using a live CD and a text editor, but my knowledge of GRUB is less than zero. Ideally, of course, I'd like to fix the GRUB configuration and complete the Ubuntu install.Alternatively, would it be better to remove the 10 GB WinXP HD for now, make the 120 GB drive the new primary drive, and re-install Ubuntu from scratch? Later, perhaps, I'd re-install the 10 GB HD and try to make WinXP bootable from there.I'm working my way through the GRUB manual, but it's rough going for my old brain.Links to good GRUB resources will be welcome as well.Thanks...JGB
# 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'.          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 optons 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 specifiv 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=root=/dev/hdb5 ro## default grub root device## e.g. groot=(hd0,0)# groot=(hd1,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## altoption boot targets option## multiple altoptions lines are allowed## e.g. altoptions=(extra menu suffix) extra boot options##      altoptions=(recovery mode) single# altoptions=(recovery mode) single## nonaltoption boot targets option## This option controls options to pass to only the## primary kernel menu item.## You can have ONLY one nonaltoptions line# nonaltoptions=quiet splash## 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## ## End Default Options ##title  Ubuntu, kernel 2.6.10-5-386 root  (hd1,1)kernel  /vmlinuz-2.6.10-5-386 root=/dev/hdb5 ro quiet splashinitrd  /initrd.img-2.6.10-5-386savedefaultboottitle  Ubuntu, kernel 2.6.10-5-386 (recovery mode)root  (hd1,1)kernel  /vmlinuz-2.6.10-5-386 root=/dev/hdb5 ro singleinitrd  /initrd.img-2.6.10-5-386savedefaultboottitle  Ubuntu, kernel memtest86+ root  (hd1,1)kernel  /memtest86+.bin  savedefaultboot### 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/hda1title  Microsoft Windows XP Professionalroot  (hd0,0)savedefaultmakeactivechainloader +1
Link to comment
Share on other sites

Hi jgb2185I have a few questions: Did you instal grub in the MBR of hda ? And when Grub comes up do you see the choice:Ubuntu, kernel 2.6.10-5-386 Ubuntu, kernel 2.6.10-5-386 ( Recovery mode )Ubuntu, kernel memtest86+ Microsoft Windows XP ProfessionalOr don't you get to that stage at all ?? If so, I do see somethiong strange in your menu.list ( 3 times ):

root  (hd1,1)
I think that should be "root (hd1,4)" because your / is on hdb5There are a few words about grub you can find here: http://forums.scotsnewsletter.com/index.ph...14&t=503&st=229:) Bruno
Link to comment
Share on other sites

Did you instal grub in the MBR of hda ?
As far as I know, yes. Grub was installed by the Ubuntu installer, and I do not recall being asked where to install. hda is, for the moment, still the boot drive.
And when Grub comes up do you see the choice:
I get no choices at all. When the PC booted after the first stage Ubuntu install, all I got was the error 25 message shown above.I thank you for the reference, and will check it out shortly. I will try fixing the menu.lst as you indicate.I have been told that the error indicates that Grub cannot find menu.lst, and that the menu.lst file must be on the boot drive. Is this true?JGB
Link to comment
Share on other sites

Not sure if this will work, but It may have put it in your MBR in hdb instead of hda. Can you go into BIOS and change your boot to your second HD and try booting it that way(I have DSL install on another computer and had to do it that way..)

Link to comment
Share on other sites

and that the menu.lst file must be on the boot drive. Is this true?

No that is absolute non-sense !! . . . . But it is not the first problem with the Ubuntu grub we came across on this forum :(You could try Barry's trick . . . . . but if even that does not work, copy the ( complete ) Ubuntu /boot over to / then edit the /etc/fstab and comment out the /boot in order to have /boot on the root partition. I think that will give a fair chance for Grub to work and find bot the menu.list and the / partition.B) BrunoPS: If you need me to explain in depth . . . just give a shout . . . ( but I have the impression you can manage with the few words I wrote above :) )
Link to comment
Share on other sites

GRUB loading stage1.5 GRUB loading, please wait... Error 25The Ubuntu install, not surpringly, will not complete. Googling indicates that this may be an error in the generated menu.lst file, which I have attached to the end of this post.++++++++++++++Need some clarification -- the *install* will not complete? That would certainly explain the inability to boot into it. Or did you mean the install of grub?? I am puzzled by the way you partitioned your disk -- does ubuntu really accomodate that sort of scheme? In the usual case, you'd make a / partition of maybe 4gb and let the installer put it all into that, and then perhaps after mount your own /home part on top of the one the installer created.Even if that all worked, some stuff has to be in 'standard' places early in the boot process, well before any fstab file is accessed. If it's just grub that is the problem, an easy fix for this is to boot with a Mepis cd, login as root, and use the desktop item to install grub. Works for any distro; just tell it which partition holds your linux, and where you want it to put the boot code [partition root, or MBR].

Link to comment
Share on other sites

Thanks to all who replied...

Not sure if this will work, but It may have put it in your MBR in hdb instead of hda.  Can you go into BIOS and change your boot to your second HD and try booting it that way...

No, the BIOS in this PC does not seem to allow that. However, I have disconnected the power from the new 120 GB drive (hdb) and powered up, and GRUB launches again. This would indicate to me that GRUB was indeed installed on hda, the old 10 GB WinXP drive.The error is different, though:GRUB loading, please wait...Error 21If I read this correctly, it means that GRUB cannot find hdb -- as one would expect if hdb had no power.
Need some clarification -- the *install* will not complete?
The Ubuntu install takes place in at least two phases. the GRUB install occurs at the end of the first phase. Since the PC will not now reboot, there is no way to begin the second phase.
I am puzzled by the way you partitioned your disk -- does ubuntu really accomodate that sort of scheme?  In the usual case, you'd make a / partition of maybe 4gb and let the installer put it all into that, and then perhaps after mount your own /home part on top of the one the installer created.
I suppose I could do that. It may in fact be better to try a simpler partition scheme at install to get a working system. I can get fancy with the partitioning later. Much easier to start with a working install and put it back the way it was if I break something while experimenting.
If it's just grub that is the problem, an easy fix for this is to boot with a Mepis cd, login as root, and use the desktop item to install grub.  Works for any distro; just tell it which partition holds your linux, and where you want it to put the boot code [partition root, or MBR].

I'll hold that in mind as a last resort. I have no idea how I would complete the Ubuntu install if I did that.
You could try Barry's trick . . . . . but if even that does not work, copy the ( complete ) Ubuntu /boot over to / then edit the /etc/fstab and comment out the /boot in order to have /boot on the root partition. I think that will give a fair chance for Grub to work and find bot the menu.list and the / partition.

I think I'll try simplifying the hdb partitioning scheme to just / and /home and start a new install.Thanks again to all...JGB
Link to comment
Share on other sites

Hi jgb2185!I too have a machine with 2 hd's which refuses to go into the 2nd stage of the Ubuntu install ( or any other distro for that matter ) when I put the GRUB bootloader on the MBR. I kept getting the same message as you do with an error #25 or #18.I've read that "flashing your BIOS" (removing the battery for 30 sec) can solve the problem and I see in my notes that it did worked at least once for me. FWIWLike others said installing GRUB on the hdb drive will probably work or a third alternative would be to reinstall Ubuntu and choosing Lilo bootloader instead on the hdb.I am not a guru like the others but I thought I would share with you what my experience was like.

Edited by réjean
Link to comment
Share on other sites

I'll hold that in mind as a last resort. I have no idea how I would complete the Ubuntu install if I did that.+++++++++++Yeah, me neither. But at that point you could just smash the ubuntu cd and go ahead and install the Mepis, which has a completely sane install procedure that takes maybe 20 minutes total. If you really want Gnome, you can easily add it from the Mepis [Debian] repositories.

Link to comment
Share on other sites

  • 2 weeks later...

I should report that I eventually got Ubuntu installed and am using it happily on the Dell. Ultimately I had to swap the two hard drives and make the 120 MB drive the primary. The Ubuntu installer worked flawlessly once I did so.The old WinXP drive, with its abortive Grub install in the master boot record, is now the secondary. I'll open a thread later to help figure out how to repair its MBR and boot Windoze from the secondary drive.Thanks to all who replied.JGB

Link to comment
Share on other sites

Hi JBGIf XP is not on hdb . . . there is no need to fix the MBR of hdb . . you can boot XP from the MBR of hda where the ubuntu bootloader is ( just add it to the ubuntu boot menu ):D Bruno

Link to comment
Share on other sites

I've read that "flashing your BIOS" (removing the battery for 30 sec)
What you describe, réjean, is resetting the BIOS (to factory defaults). Flashing the BIOS involves replacing the BIOS with a newer version or restoring it in case a BIOS upgrade goes bad. The BIOS upgrade allows the motherboard to support newer features or expand capabilities like more RAM, faster processor, etc.
Link to comment
Share on other sites

If XP is not on hdb . . . there is no need to fix the MBR of hdb . . you can boot XP from the MBR of hda where the ubuntu bootloader is ( just add it to the ubuntu boot menu )

Well, WinXP is on hdb. I assume that would mean that the MBR on hdb has to be repaired before GRUB will boot anything from it, yes?JGB
Link to comment
Share on other sites

Well, WinXP is on hdb. I assume that would mean that the MBR on hdb has to be repaired before GRUB will boot anything from it, yes?JGB

I don't believe so. You are booting from the hda and it will tell it to go to hdb for the program. That is all the mbr does if I understand it correctly. It gives the partition setup which is done in your hda mbr: http://en.wikipedia.org/wiki/Master_boot_record
Link to comment
Share on other sites

Well, WinXP is on hdb. I assume that would mean that the MBR on hdb has to be repaired before GRUB will boot anything from it, yes?JGB

It's essential here to know which drive you have first in your cmos 'boot order'. Previous to about 1995 or so, it was possible to depend on a natural order; bios always 'found' an hda first, then an hdb, etc. Now, with bioses with which you can set your own boot order, the top hard disk is the one that bios will call it's "#80" boot disk, regardless of where it is attached in the hardware sequence. So ... you have grub stage 1 in your hda MBR, and some old unwanted grub stage 1 in your hdb MBR??? Think that's what I read above. The one on hdb is now useless to either linux or windows -- it no longer knows where to find grub stage 2 code and menu.lst. You might just as well fix hdb to boot straight into XP. Reset the box, stop in cmos and change boot order so hdb is your first hard disk, then boot up your xp cd, choose install, then take the repair path, and when you get cmd running, run fixboot and fixmbr. That will restore hdb's MBR for a straight windows boot -- when you want to do it that way. This does not preclude adding XP to the grub menu [for when you have cmos set to boot from the hda disk] as suggested up the thread. If you consider your XP install important, then you should have the disk it's on setup this way -- it's common for people to change a linux distro, wipe that partition and reload it -- and then find that grub no longer works; it's because the stage 2 code is no longer at the same sector it was loaded to in the previous distro. And, I'll say again, take copies of your various disks' MBR sectors, saved to diskette. Julia's excellent linkage above also recommends that, and gives the dd command line to do it.
Link to comment
Share on other sites

I should report that I eventually got Ubuntu installed and am using it happily on the Dell. Ultimately I had to swap the two hard drives and make the 120 MB drive the primary. The Ubuntu installer worked flawlessly once I did so.The old WinXP drive, with its abortive Grub install in the master boot record, is now the secondary. I'll open a thread later to help figure out how to repair its MBR and boot Windoze from the secondary drive.Thanks to all who replied.JGB

To fix the Windows XP boot, add the following to the XP section of your grub.conf file:
map (hd0) (hd1)map (hd1) (hd0)makeactivechainloader +1

This initialises the drive with XP as 80h and the drive with GRUB as 81h, thereby switching the boot drive order. This is what should have been done for the Ubuntu installation before you did the reinstallation. I need to read these threads earlier; sorry, I've been busy. :hysterical:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...