How to install and boot 145 operating systems in a PC


Results 1 to 15 of 177

Thread: How to install and boot 145 operating systems in a PC

Threaded View

  1. #40
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Modern Linux use Grub2. As far as I know in any Linux terminal mode we can use grub-install to repair Grub2.

    What you need to do is to first boot up a Linux CD or DVD. Run it to try out the Linux and not install it. You then get a terminal and use the command
    Code:
    sudo grub-install
    if the Linux uses sudo like Ubuntu or
    Code:
    grub-install
    if you are in a root terminal like Debian

    However you need to know the partition where Grub2 is residing, mount that partition and then specify which partition you want Grub2 to be installed.

    If you have Linux in the 2nd partition of disk sda then it is /dev/sda2 and Grub2 is always in its /boot/grub

    To have Grub2 files available from sda2 you use the following commands in a terminal (say in Ubuntu)
    Code:
    sudo mkdir /mnt/sda2
    sudo mount /dev/mnt/sda2
    ls /mnt/sda2/boot/grub
    If you list the content of /mnt/sda2/boot/grub you will see all the Grub files including its configuration file /boot/grub/grub.cfg.

    Now you can tell Grub its Grub partition and the the location Grub2 to be installed. Say let's put it in /dev/sda2 and also /dev/sda
    Code:
    sudo grub-install --force --boot-directory=/mnt/sda2/boot/grub /dev/sda2
    The --force is to force GRub to install in a partition. It is not needed if it is the MBR which is /dev/sda without a partition number attached.
    Code:
    sudo grub-install --boot-directory=/mnt/sda2/boot/grub /dev/sda
    Please note MBR (/dev/sda) is not the same as in /dev/sda1.
    The --root-directcory parameter is to tell which Grub is to be installed because if you are booting several Linux each will have Grub in its own partition.

    Grub2 does not like itself to be put in a position other the MBR so it always complains but will execute it if the --force parameter is used. It it still not working repeat the command again.

    If Grub2 is in the MBR it will boot itself automatically.

    If Grub2 is in a partition then it must be booted by another boot loader including another Grub2.

    If you have a Grub2 floppy or CD boot it up and the Linux in sda2 can be fired up using these lines
    Code:
    set root=(hd0,2)
    chainloader +1
    boot
    Each bootloader has the ability to repair itself. I never use hexedit to amend a bootloader.
    Last edited by saikee; 12-26-2014 at 03:54 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

Posting Permissions

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