Results 1 to 8 of 8

Thread: Reinstalling GRUB for multi-partition dead redhat 9

Hybrid View

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    4

    Reinstalling GRUB for multi-partition dead redhat 9

    Hi. I'm trying to work my way through the FAQ so that I can fix my dead redhat 9 installation. At present, Grub has died (I edited grub.conf, and even replacing it with a known working file from another machine does not fix things. The computer boots, prints the word GRUB and freezes.

    The problem I have is that I have my /boot directory in a partition by itself. Upon booting knoppix, I have two hd partitions, hda1 and hda2. hda1 is the contents of the boot directory.

    Just trying to run "grub-install /dev/hda" under knoppix just gives me the error message "read only file system". This is even though I can edit files on the disks.

    Would it be possible for me to mount both partitions back into their original structure. E.g.

    mount -o dev /dev/hda2 /mnt/hda2
    mount -o dev /dev/hda1 /mnt/hda2/boot
    chroot /mnt/hda2

    This should, I hope, give me a writeable version of my original system. I then (I hope) would then be able to

    grub-install

    (with no arguments) to rebuild my grub partition.

    Should this work? As this is our only internet computer at home, I'm now remarkably unpopular. But, I'm also leaving the country for a week on saturday, and if I leave no working computer, I'm likely to be even less popular.

    I've read the knoppix faq, but if anyone knows any other resources I should read, I'd like to know about them. And, I'd appreciate any advice that anyone has to offer. Note: this is not actually a multi-boot computer. It only runs redhat 9. So, any solution does not have to result in grub working, providing that the computer will boot.

    Thanks in anticipation,

    Ross Clement.

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    Hi; I don't use grub myself, but I should be able to help you with lilo.
    My understanding is that you have a small FS hda1 mounted as /boot,
    and root (/) is hda2; is this correct? no swap?

    Check whether you have a lilo.conf file under /etc. Probably not, since
    you were using grub. If not, the following should get you started. You
    should carefully check that all referenced files do exist on *your* system.
    Please post the content of /boot (the output of 'ls -la'), then ask for
    further guidance if you're not familiar with lilo.

    • lba32
      boot=/dev/hda1
      root=/dev/hda2
      install=/boot/boot-menu.b
      map=/boot/map

      image=/boot/vmlinuz
      [list:a2428bbd17] label=linux
      initrd=/boot/initrd
      read-only
    [/list:u:a2428bbd17]

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    4
    Thanks for the reply. I assume that once I've created the lilo.conf file, I just run lilo to set up the boot loader.

    I do have a swap partition, which Knoppix finds and makes use of. I can't remember where it is, but my two partitions for / and /boot are hda1, and hda2, so swap must be there somewhere.

    I've just printed out some lilo configuration pages. I note that, as with your example, they say where to install the boot record. This is something that confused me with grub, so perhaps lilo's the best option for now.

    Cheers,

    Ross-c

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    Quote Originally Posted by Ross Clement
    Thanks for the reply. I assume that once I've created the lilo.conf file,
    I just run lilo to set up the boot loader.
    Before you blindly adopt my example, make sure all files it mentions
    (under /boot) make sense in your case. Once you've booted with the
    knoppix cd, mount /dev/hda2 onto eg /tmp/redhat, then /dev/hda1
    onto /tmp/redhat/boot. Then do 'lilo -r /tmp/redhat' and pay attention
    to possible errors. If this works, run cfdisk and make sure your boot
    partition (hda1) is the one marked active. You should then be set!

  5. #5
    Junior Member registered user
    Join Date
    Aug 2003
    Location
    Toronto, Canada
    Posts
    13
    Ross, I have been struggling with Grub also and made some progress with a dual boot system after reading the following article. It may give you some hints.

    http://www.linuxjournal.com/print.php?sid=4622

    It is a somewhat dated artile called "Boot with GRUB", May 1, 2001 by Wayne Marshall.

    I found a lot of value in learning how to create a Grub boot floppy.

  6. #6
    Junior Member
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    4

    Re: Recovery -- success

    Thanks for your replies on this thread. I decided to go the lilo route, and the result is
    that I am posting this message from my previously unbootable machine.

    I will read the grub article however, as I'd like to be able to reinstall both lilo and grub in the future. I didn't even know that it was possible to create a grub boot floppy, so clearly I still have lots to learn.

    Cheers,

    Ross-c

  7. #7
    Member registered user
    Join Date
    Nov 2002
    Posts
    37

    reinstalling grub

    from article called "boot with grub"

    The floppy can then be unmounted, umount /floppy, but leave it in the drive. The GRUB floppy is prepared and ready for the final installation, which is to install the GRUB boot loader in the MBR of the floppy itself. For that, we will use the grub executable we have built with our Linux installation. Start the executable at the Linux command prompt: grub.

    This brings up an emulator of GRUB's command shell environment, which looks like Figure 1. We will discuss the features of this shell in more detail a little further on. For now, enter the following series of commands at the grub prompt:


    grub> root (fd0)
    grub> setup (fd0)
    grub> quit

    And that's it! This sequence of commands completes the installation of GRUB on the floppy disk. It is now bootable and will allow us to boot any other OS on our system.

    My question:
    If we have umount the floppy how do the commands "root (fdo)", "setup (fdo)" get written to the floppy?

  8. #8

    read only file system

    A couple of days ago I had a VERY frustrating time with Knoppix.

    I was trying to fix GRUB, but I kept on getting a "read only file system" error.
    Something I was surprised to see as root.

    From http://www.knoppix.net/docs/index.php/FaqRescue

    I see maybe it needed to be remounted:
    "mount -o dev /mnt/hda1", if its already mounted, you'll have to clear the "nodev" flag: "sudo mount -o remount,dev /mnt/hda1"
    All the same. My internet connection was down with the unbootable machine. So how was I am going to get that info?

    In the end I fixed the problem with a Debian Woody bootdisk. You see Debian bootdisk has a rescue option. And this is what I would love to see on Knoppix.

    A cheatcode/option for a :

    RESCUE MODE

    http://www.knoppix.net/docs/index.php/CheatCodes

    please and thank you for your time

Similar Threads

  1. HDD Install won´t boot (Grub in root partition:-( )
    By weirdjd in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 06-27-2005, 09:40 AM
  2. grub boot loader read the boot file from a windows partition
    By cli168 in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 06-20-2005, 03:57 AM
  3. Partition Advice - Multi-boots
    By nrj in forum Hdd Install / Debian / Apt
    Replies: 8
    Last Post: 01-30-2004, 12:41 AM
  4. Install to existing multi-boot partition?
    By tautges in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 01-04-2004, 10:22 PM
  5. Using Grub in multi-OS with /boot partition
    By nuke in forum Hdd Install / Debian / Apt
    Replies: 7
    Last Post: 10-09-2003, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX picture

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX

$59.99



Corsair RMe RM850e 850W 80 Plus Gold Fully Modular Low Noise Certified Refurb picture

Corsair RMe RM850e 850W 80 Plus Gold Fully Modular Low Noise Certified Refurb

$58.99



Gigabyte GA-B85M-D3H Motherboard picture

Gigabyte GA-B85M-D3H Motherboard

$54.99



⁠Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)⁠ picture

⁠Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)⁠

$29.90



GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard picture

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard

$59.99



Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4 picture

Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4

$79.99



MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P picture

MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P

$71.49



ASUS PRIME H410M-K LGA 1200 Intel 10th Gen H410 DDR4 USB3.2 Motherboard M-ATX picture

ASUS PRIME H410M-K LGA 1200 Intel 10th Gen H410 DDR4 USB3.2 Motherboard M-ATX

$59.99



GIGABYTE - A620M S2H AM5 DDR5 M-ATX Motherboard picture

GIGABYTE - A620M S2H AM5 DDR5 M-ATX Motherboard

$65.00



Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK picture

Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK

$154.98