How does a Linux user boot a new additional Linux?


Results 1 to 6 of 6

Thread: How does a Linux user boot a new additional Linux?

  1. #1
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978

    How can a Linux user multi boot a new additional Linux?

    -------Edited 14/1/06--------------
    This is a later thread I wrote that show a lazy way to multi boot with the Grub menu prepared prior to the additional Linux installations. As an example I had 20 empty partitions ready for receiving Linux shown in this thread.
    -------------------------------------

    Here are simple steps to add additional Linux distros to a bootable system using either Lilo or Grub.

    Assumptions:-


    (1) A computer already with an existing Linux ( or any number of them) loaded and has its bootloader in the MBR. Let’s assume the bootloader owner Linux reside is Partition hda6
    (2) The new Linux when install, say at Partition hda7, replaces the original bootloader causing a panic to the user (instead to the kernel!).
    (3) The system now boots with the new Linux in hda7 but not the previous alternatives in hda6.

    Steps to restore the previous bootloader and include the new one for booting.

    (a) Boot to new Linux in hda7 as usual.
    (b) Drop in terminal mode, by clicking terminal or konsole
    (c) Log is as the root user (“su” then follow by password)
    (d) Replicate the bootloader in root partition (“grub-install /dev/hda7”)
    (e) Make a new directory for mounting hda6(“mkdir /mnt/here”)
    (f) Mount the previous hda6 there ( “mount /dev/hda6 /mnt/here”)
    (g) Change root to hda6 (“chroot /mnt/here”). Now you are in side hda6.
    (h) Use desktop to edit hda6’s /boot/grub/menu.lst to include hda7 for booting with lines

    Code:
    title My Linux in hda7
    root (hd0,6)
    chainloader +1
    (i) Restore hda6’s bootloader in MBR (“grub-install /dev/hda”)
    (j) Exit hda6 (“exit”)
    (k) Reboot (“reboot”)

    The above works if both the old hda6 and new hda7 have Grub as the bootloader.

    If the old hda7 uses Lilo then the following replacement is necessary

    (d) Replicate the bootloader in root partition (“lilo –b /dev/hda7”)


    If the new hda6 uses Lilo then the following replacements are necessary

    (h) Edit hda6’s /etc/lilo.conf to include hda7 for booting with lines

    Code:
    label=”Linux_hda7”
    other= /dev/hda7
    After /etc/lilo.conf has been saved type "lilo" to update the system.

    (i) Restore hda6’s bootloader in MBR (“lilo -b /dev/hda”)



    The user can recover his previous bootloader and includes the newly installed Linux in hda7 as another booting choice. That is the method I use to build up more than 20 bootable Linux distros. Lilo and Grub can be mixed together as suggested.

    It should be pointed out that the current Lilo appears to have a maximum of 27 bootable entries. Grub can boot over 100 systems.
    Last edited by saikee; 01-14-2006 at 09:59 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"

  2. #2
    Join Date
    Jan 2005
    Posts
    2

    Question grub-install

    Hi there! i really liked this post and decided i'd use this method to try out FC3 and ubuntu (i've been using suse 9.2, my first distro, for the last three weeks).

    having installed fc3 alright, i'm using the terminal from within gnome. but when i enter the grub-install line, bash returns that the command is not known. am i supposed to be doing this in the grub shell, or do i just need to find and install the grub-install command?

    i'd appreciate any help at all.


    cheers

  3. #3
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Sorry I have been away for 6 to 7 weeks and back to the country only yesterday.

    I think "grub-install" needs to be issued as the super-user (see Step c). You can try just the command "grub" too.
    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"

  4. #4
    Join Date
    Jan 2005
    Posts
    2
    thanks for replying.

    I managed to figure it out - the command wasn't installed in a place that in my PATH. (that's the right term, yeah?) anyway, i just gave the absolute reference of the command and it worked. sorted.

    by the way, i had another problem for a while. apparently some distros (those with 2.6 kernels, maybe?) don't work with the chainloader +1 line. they need an initrd line instead. or something. i'll check and post what my menu.lst looks like.

    thanks.

    --

    "is it a bird? is it a plane? no, its... its... a penguin in a cape???"

  5. #5
    Join Date
    Apr 2003
    Location
    UK
    Posts
    1,180
    Originally posted by supertux99
    by the way, i had another problem for a while. apparently some distros (those with 2.6 kernels, maybe?) don't work with the chainloader +1 line. they need an initrd line instead. or something. i'll check and post what my menu.lst looks like.
    The chainloader +1 option is for loading other bootloaders like lilo, another copy of grub or the bootloader for windows. If another distro installs a bootloader in it's root partition you can point grub to that bootloader and load it using chainloader or you could just boot it directly by using the kernel and initrd options.

  6. #6
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I second retsaw.

    Two methods to boot a Linux:-

    (1) directly by calling the kernel and initrd.

    (2) indirectly by chainloading using "chainloader +1" in Grub

    With the first method one has to specify the exact file names of kernel and initrd.

    The second method is a lazy alternative but it requires a bootloader installed in the root partition of every distro. It is the same method Linux boot Windows.

    I like second method because it is generic, simple and has never failed me yet. It also retains the boot menu of every distro which could be a nuisance if you don't want to see it everytime you use the distro. The menu can be hidden of course by varying the display time. However it is fun to jump from menu to menu and boot the Linux and Windows from anywhere one wishes.
    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
  •