LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Multi boot system (https://www.linuxquestions.org/questions/linux-newbie-8/multi-boot-system-930392/)

Larry Webb 03-02-2012 01:06 PM

Quote:

Originally Posted by k3lt01 (Post 4616989)
This is the very first thing in the grub.cfg file
Code:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

The reason you don't edit this yourself is because as soon as a new kernel is installed Grub will update and totally screw the modified file.

When grub resides in a separate partition and you chainload you do not have to worry about kernel updates or distro changes, it will boot the partition.

Quote:

It isn't worth it if you are using multiple OSs on a regular drive in a regular PC and if you don't know what you are doing.
Read this article, chainloads 145 systems with grub legacy, but same applies to grub2

145 distros

Ravenslair 03-02-2012 04:11 PM

Thanks for the advice. Larry Webb, I think I will try your suggestion. Before I do though, would this work and be easier?

1 - Install Fedora or Mint (or any other distro that uses Grub2) on /dev/sdb8.
2 - When asked where to install the bootloader, select /dev/sdb2.
3 - Let the installer create all the necessary boot files in /dev/sdb2.
4 - Once the installation is complete, the computer should boot up with a generic grub.cfg (containing the distro at minimum).
5 - Reinstall distro in step 1 a second time to the same location. Have it format the partition and select /dev/sdb8 this time when asked where to install the bootloader.
6 - Edit /dev/sdb2 grub.cfg file to point to /dev/sdb6, 7, 8, etc.
7 - Any time I update the kernel for any of the installed distro's, they should not touch /dev/sdb2 since their individual bootloaders are in their respective partitions. Would that be true?

Thanks again everyone for the education. I truly appreciate it.

Ravenslair 03-02-2012 04:14 PM

I see that I did not submit my reply for a few hours. Sorry to repeat some of what you said Larry. That article is the exact reason I am trying this. Albeit, I only want about 10 distro's for now. Being new to Linux, though, makes it a bit of a challenge to say the least.

k3lt01 03-02-2012 05:27 PM

Quote:

Originally Posted by Larry Webb (Post 4617039)
When grub resides in a separate partition and you chainload you do not have to worry about kernel updates or distro changes, it will boot the partition.

But don't you have to "adjust" something everytime you update to a newer kernel.

Quote:

Originally Posted by Larry Webb (Post 4617039)
Read this article, chainloads 145 systems with grub legacy, but same applies to grub2

145 distros

I have read it and, even though it is an excellent resource, I wonder how functional it is in the real world. I currently have 14 on this laptop, by the time I am finished setting it up I will have 28. All using Grub2, all with their own / and no separate /boot. I may even throw XP and Vista (only because I have them) on it but realistically I will need a bigger hard drive. So far os-prober works perfectly.

Larry Webb 03-02-2012 06:19 PM

Quote:

Originally Posted by k3lt01 (Post 4617185)
But don't you have to "adjust" something everytime you update to a newer kernel.

No, you are booting the partition not the kernel. I do adjust the timeout time on the distro grub.cfg so that I do not have to wait on the boot to start.

Quote:

I have read it and, even though it is an excellent resource, I wonder how functional it is in the real world. I currently have 14 on this laptop, by the time I am finished setting it up I will have 28. All using Grub2, all with their own / and no separate /boot. I may even throw XP and Vista (only because I have them) on it but realistically I will need a bigger hard drive. So far os-prober works perfectly.
There is nothing wrong with the way you are installing. It is just a personal preference.

Larry Webb 03-02-2012 06:33 PM

Quote:

Originally Posted by Ravenslair (Post 4617148)
Thanks for the advice. Larry Webb, I think I will try your suggestion. Before I do though, would this work and be easier?

1 - Install Fedora or Mint (or any other distro that uses Grub2) on /dev/sdb8.
2 - When asked where to install the bootloader, select /dev/sdb2.
3 - Let the installer create all the necessary boot files in /dev/sdb2.
4 - Once the installation is complete, the computer should boot up with a generic grub.cfg (containing the distro at minimum).
5 - Reinstall distro in step 1 a second time to the same location. Have it format the partition and select /dev/sdb8 this time when asked where to install the bootloader.
6 - Edit /dev/sdb2 grub.cfg file to point to /dev/sdb6, 7, 8, etc.
7 - Any time I update the kernel for any of the installed distro's, they should not touch /dev/sdb2 since their individual bootloaders are in their respective partitions. Would that be true?

Thanks again everyone for the education. I truly appreciate it.

2 . No, it will install the mbr instructions there.
3 . No a distro when installed will not install grub to a separate partition, just the mbr.
4 . No
7 . True

The way I explained in my earlier post is the easiest way.

Ravenslair 03-02-2012 07:01 PM

Thanks Larry. In the process of writing the file now. I will let you know how it goes. I appreciate it.

Ravenslair 03-02-2012 11:57 PM

That took care of it Larry. Windows XP, Ubuntu and Fedora are all launching using the boot partition and chainloading. Now I need to install a few more distro's and update the grub.cfg file to point to them.

I appreciate the help you and everyone else have given me. I have a lot to learn and hope to be able to contribute to the group at some point in the near future.

AKB48 03-03-2012 02:25 AM

easyBCD may help

Larry Webb 03-03-2012 04:42 AM

Quote:

Originally Posted by Ravenslair (Post 4617329)
That took care of it Larry. Windows XP, Ubuntu and Fedora are all launching using the boot partition and chainloading. Now I need to install a few more distro's and update the grub.cfg file to point to them.

I appreciate the help you and everyone else have given me. I have a lot to learn and hope to be able to contribute to the group at some point in the near future.

Please use the 'Thread Tools Button' at the top of the post window to mark as "Solved".

Ravenslair 03-03-2012 11:53 PM

OK, new problem. I installed OpenSUSE in /dev/sdb8 (next empty partition). During installation I told it to use /dev/sdb16 for /home (I am trying to use a common partition for all installations. Unlike Fedora and Ubuntu, OpenSUSE did not make it really clear where to set the boot partition. Or it did and I completely missed it. I thought I had set / for boot. Now, instead of Grub2 on /dev/sdb2 running at boot up, OpenSUSE on /dev/sdb8 appears to have taken over. Is there a way to reset my chainloading Grub2 installation on /dev/sdb2 as my MBR? Thanks in advance. Sorry for more newbie questions.

Larry Webb 03-04-2012 04:25 AM

Quote:

Originally Posted by Ravenslair (Post 4617958)
OK, new problem. I installed OpenSUSE in /dev/sdb8
Is there a way to reset my chainloading Grub2 installation on /dev/sdb2 as my MBR?

Yes there is.

Use your ubuntu live cd from terminal
Code:

sudo mkdir /mnt/sdb2
sudo mount /dev/sdb2 /mnt/sdb2
sudo grub-install --root-directory=/mnt/sdb2 /mnt/sdb
sudo umount /dev/sdb2
sudo rmdir /mnt/sdb2
exit

Here is the documentation that I refer to (pay attention to section 12) grub2

You are lucky I caught this. After marking a thread solved you need to start a new thread. After all this is a new problem.

Larry Webb 03-04-2012 04:31 AM

If after repairing your mbr you can not boot suse come back with a new thread.

Ravenslair 03-04-2012 04:34 PM

Solved again. Will open a new thread with future issues (which I am bound to have). Thanks again.


All times are GMT -5. The time now is 11:14 AM.