Compatible Support Forums: GRUB loading --- doesn't!

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

GRUB loading --- doesn't!

#1 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 13 March 2005 - 03:30 PM

Hi
I have(had!) WInXP and Red Hat 9 happily co-existing and dual-booting using GRUB on my first 40 gb hdd; I added 80 GB as second drive and used half of it, still all fine.

Installed Fedeora 3 from DVD Iso to 10GB partition of unused space on 80GB drive. Installation seemed to go OK - however on reboot after POST PC says "Loading GRUB Stage 2..." and sits there forever.
If I use The Ultimate Boot CD then I can tell it to make hd0 boot and my WinXP boots fine (phew!).
I would like to have back my original boot menu choices of Windows, or Red Hat 9 with the addition of the new Fedora 3.

All advice gratefully appreciated.
0

#2 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 14 March 2005 - 01:46 AM

Are you using the original grub from RedHat or from the recent install of Fedora?

How id the second hard drive set up in the system? Primary slave, or secondary master? Is the second hard drive ide or sata?

How are your cdrom(s)/cdrw drives set up, in terms of secondary master etc...?
0

#3 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 14 March 2005 - 02:31 PM


The grub is (I think) from the original Red Hat.

The drives are all IDE and are set up as follows:

Primary Master 40GB
Primary Slave 80GB
Secondary Master CD-RW
Secondary Slave DVD-RW

Computer Management reports:
Disk 0 (C:) 27.35GB NTFS Healthy (System) (F:)5.86 GB FAT32 Healthy 4.06 GB Healthy (Unknown Partition)

Disk 1 (G:)20.00 GB NTFS Healthy (H:)20.00 GB NTFS Healthy 10.00 GB Healthy (Unknown Partition) 1.00GB Healthy (Unknown Partition) 25.33 GB Free Space

The 4.06 GB partition on Disk 0 is the original Red Hat install
The 10.00GB partition on Disk 1 is where I installed Fedora 3 and the 1.00GB partition is the Swap partition I made for Fedora


0

#4 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 14 March 2005 - 11:24 PM

Do you have the original cd disks for RedHat and the full install Windows XP disk?

Do you remember if you installed Grub from the Fedora install? If so, did you tell Fedora to install Grub on the MBR or a boot partition?

Did you do the partitioning using the Fedora Utility for the second hard drive (Fedora) install. If so, what option did you choose, expert partitioning or did you allow Fedora to use existing space on the second hard drive?

If you have the original Redhat disks and did not update the RedHat kernel, we can try to recover the RedHat/Windows Grub boot. My guess is that you allowed Fedora to use it's grub for booting the system. It should have detected the prior RedHat and Windows installs, as well as Fedora, but something went amiss. If we can recover the RedHat install of Grub, we can move on from there.

Thanks for responding with the master/slave designations, which look fine. Windows disk management can't properly see or detect the Linux installs, hence, the "unknown" designation of the Linux partitions. This is normal.

Finally, I assume that you don't have a RedHat boot floppy disk?
0

#5 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 15 March 2005 - 12:48 AM

Thanks for responding.
I do have the original XP and Red Hat disks.

I don't recall the Fedora install asking me where to install Grub, I didn't have to choose between MBR or boot partition, but I do remember it asking what to call the other part of the dual boot process and I accepted the default of "Other".

I did use the Fedora utility to partition. I used expert partitioning and allocated 10GB of existing free space and (when prompted) 1GB for a swap partition.

Alas you are correct I do not have a Red Hat floppy disk!
0

#6 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 15 March 2005 - 02:33 AM

My memory of Redhat is not as good as it should be, but let's give it a go.

If you know exactly what the linux name of the RedHat partition is, you can insert disk #1 of the Redhat cd disk into the cdrom drive and boot to the welcome install window. Once there type in;

linux root=/dev/hdax.

So say you know that RedHat is on partition hda5. Then you would type in;

linux root=/dev/hda5

This shouold boot your RedHat system to the normal GUI.
_________________________________________________________

If you don't know what the partition is, we go to plan B.

Plan B

You will be using the first RedHat cd (#1) to boot the system.

1) first boot the computer using the disc1.
2) type linux rescue on the setup prompt.
3) follow the instructions on the screen.(ur linux installation will be mounted on /mnt/sysimage)

You should be prompted to enter the root password, which you should.

4) now at the prompt type chroot /mnt/sysimage
This will mount the RedHat system, as if you booted directly into it, within a terminal window.

5. If you were able to get into RedHat via the linux root=/dev/xxx option, get to a terminal window as root user. If you used plan B. you are already at root user console.

6. Have a freshly formatted floppy ready. Put it into the floppy drive. Type in grub-install /dev/fd0. This is the number zero for /dev/fdx not the letter.

This should write a boot floppy that you can boot the full system with, GUI and all. If you get this far, and got no error messages, for kicks, see if you can boot into X. Try typing in startx and see if KDE comes up. If you get an error message, type in login and follow the prompts to put in your normal user id and password. Again, try typing startx to see if the GUI comes up.

What I would like to do is see what the Grub /boot/grub/menu.lst says.

You should be able to boot into "normal" Redhat or Windows with the boot disk.

Let us know if you get this far.
0

#7 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 16 March 2005 - 12:42 AM

Hi
3 cheers for Plan B!
So I now have a Red Hat floppy disk which offers exactly the same options I had before all this started - as can be seen by the menu.lst file which is below.
So how do I write that to the hard disk? And how do we configure Fedora to join in?



# grub .conf generated by Anaconda
#
# Note that you do not have to rerun grub after making changes
to this file.
# NOTICE: You do not have a /boot partition. This means that
all kernel and initrd paths are relative to /, eg.
root (hd0,2)
kernel /boot/vmlinuz-version ro root=/dev/hda3
initrd /boot/initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.6.9)
. root (hd0,2)
. kernel /boot/vmlinuz-2.6.9. ro root=LABEL=/ hdc=ide-scsi
. initrd /boot/initrd-2.6.9.img
title Red Hat Linux (2.4.20-8)
. root (hd0,2)
. kernel /boot/vmlinuz-2.4.20-8. ro root=LABEL=/hdc=ide-scsi
. initrd /boot/initrd-2.4.20-8.img
title DOS
. root noverify (hd0,0)
. chainloader +1
0

#8 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 16 March 2005 - 03:50 AM

Ok, good. Now I have to think and look at my Fedora install (my box is apart at the moment). I may see some minor issues, maybe not. Let me ask, did you compile/install kernel 2.6.9 on the RedHat install? Notice this script in Grub.conf;

title Red Hat Linux (2.6.9)
. root (hd0,2)
. kernel /boot/vmlinuz-2.6.9. ro root=LABEL=/ hdc=ide-scsi
. initrd /boot/initrd-2.6.9.img


You are defaulting to kernel 2.4.29, which is fine, the original RedHat install, as per;

default=2

Let's look at this a little more before we go on.

just to check, can you do the following when in RedHat?

When in RedHat, get to a terminal window as root user.

Type in fdisk -l

The letter l, not the number one.

Post the results here.



0

#9 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 16 March 2005 - 09:35 PM

Hi again
A little background may be of use.
The main installation on this PC is WinXP on 40GB drive C NTFS
The same drive has partition with an F drive FAT32
Onto the empty space on this drive I put my first installation of Red Hat which was 2.4.20
several months ago and that was successful.
I recently tried to upgrade to 2.6.9 and that was unsuccessful (I will come back to this later)
but the installation rewrote the grub file successfully ie. on boot the grub would load and selecting either Red Hat 2.4.20 or Windows would work, even 2.6.9 would start to boot but eventually stop with
a kernel panic. However the non-funtioning of 2.6.9 was never a problem, the rest of the system
is OK.
Then a few days ago having added an 80GB hard drive I had space for another OS so I tried to put
Fedora 3 onto empty space on the 80GB drive and then the problem started.

The default option on the grub menu is Windows XP not original Red Hat

Below is the result of fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System
/dev/hda1 * 1 3570 28675993+ 7 HPFS/NTFS
/dev/hda2 3571 4335 6144862+ f Win95 Ext'd (LBA)
/dev/hda3 4336 4865 4257225 83 Linux
/dev/hda5 3571 4335 6144831 b Win95 FAT32



Disk /dev/hdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System
/dev/hdb1 1 2611 20972826 7 HPFS/NTFS
/dev/hdb2 ? 2612 5222 20972857+ 7 HPFS/NTFS
/dev/hdb3 5223 6527 10482412+ 83 Linux
/dev/hdb4 6528 9964 27607702+ 5 Extended
/dev/hdb5 6528 6658 1052226 82 Linux swap

Thanks again
0

#10 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 16 March 2005 - 11:36 PM

OK, thanks. This explains a few things. Now we know that Fedora is probably on /dev/hdb3. I will have to look at my Fedora box to see what the default kernel and such is. You should be able to add this to the current Grub file.

If you know what filesystem that you used, then you can mount the partition to see what the vmlinux and initrd is for Fedora and add them in the grub.conf file for RedHat. It should be something like;

title Fedora Core 3
rootnoverify (hd1,2)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=hdb3
initrd /boot/initrd-2.6.9-1.667.img


Of course, the kernel and initrd version should match what is the actual default Fedora kernel is and;

rootnoverify (hd1,2)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=hdb3
initrd /boot/initrd-2.6.9-1.667.img

indented from the title line (one tab space)and one line above the Windows title and lines.

If anybody has the answer right off, please feel free to chime in so adamh does not have to wait. I'm going to be a little busy for the evening.
0

#11 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 18 March 2005 - 03:43 AM

Right then -
Mounted Fedora partition and checked version numbers they were correct. Made suggested changes to grub.conf and rebooted.
It started to boot but soon failed... the last lines were as below:

Red Hat nash version 4.1.18 starting
Mounted /proc filesystem
Mounting sysfs
Creating /dev
Starting udev
Loading jbd.ko module
Loading ext3.ko module
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!

Rebooting into Red Hat I looked at the grub.conf on the Fedora partition, the only line
that differed from your suggestion was:

kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=1 rhgb quiet

so I tried that - this time Fedora immediately froze with only the lines

Booting 'Fedora Core 3'

root (hd1,2)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
[Linux-bzimage, setup-0x1400,size=0x155da5]
initrd /boot/initrd-2.6.9-1.667.img
[Linux-initrd @ 0x1ff7f000, 0x60e25 bytes]

Uncompressing Linux . . . Ok, booting the kernel.
audit(1111108441.722:0): initialized
Red Hat nash version 4.1.18 starting
mkrootdev: label /1 not found
mount: error 2 mounting ext3
mount: error 2 mounting none
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!


So there you have it!
I hope this suggests something to you.

We have updated the grub.conf file successfully but only if using the floppy disk.
How do we write that file to the hard disk?

0

#12 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 18 March 2005 - 12:32 PM

OK, it's all in the syntax and how grub is used in each distro. Try changing the entry from;

title Fedora Core 3
rootnoverify (hd1,2)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=hdb3
initrd /boot/initrd-2.6.9-1.667.img

to;

title Fedora Core 3
root (hd1,2)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=hdb3
initrd /boot/initrd-2.6.9-1.667.img

By the way, just check to make sure it is hdb3 is root in /etc/fstab in the Fedora install. It should be the first entry, such as;

/dev/hdb3 / ext3 ................

If the first change does not work, we should change the entry for Fedora to directly hit the partition;

title Fedora Core 3
kernel (hd1,2)/boot/vmlinuz-2.6.9-1.667 ro root=hdb3
initrd (hd1,2)/boot/initrd-2.6.9-1.667.img






0

#13 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 22 March 2005 - 12:27 AM

Hi
Still not joy. Have tried all the above and many variations but to no avail usually get this far again:

Red Hat nash version 4.1.18 starting
Mounted /proc filesystem
Mounting sysfs
Creating /dev
Starting udev
Loading jbd.ko module
Loading ext3.ko module
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!

This PC is my main XP machine and needs to work - I have others I am quite happy to mess with and get wrong and thus learn. But this machine has my data on it and I would rather not have to start again! I could back it all up and reinstall but that would be tantamount to admitting defeat!

Soo how do I reconfigure my MBR to work again - the floppy we have made works - so how do I write that to the HDD so that I do not need the floppy to boot from?
0

#14 User is offline   danleff 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 2903
  • Joined: 30-August 02

Posted 22 March 2005 - 02:02 AM

PK, now that you have a floppy to recover with if something goes wrong (and we know that you have your full Windows XP install disk), get into a terminal window again, as root user.

type in;

grub-install /dev/hda (hit the enter key).

DO NOT...make sure you do not type in by accident grub-install /dev/hda1

Let us know if it works.
0

#15 User is offline   AdamH 

  • stranger
  • Group: Members
  • Posts: 10
  • Joined: 13-March 05

Posted 23 March 2005 - 03:16 AM

Thank you Dan You are the Man!

Now booting to Grub from the hard disk.

Just two final questions -

If I wanted to, how do I remove the grub loader completely and thus restore the boot to Windows XP only?

And finally

What do you know about Solaris 10?

Thanks again.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users