Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a laptop which has 5 distros installed I,m just about to rebuild it.
If I was to create a seperate boot partition how do i go about this
so that if a distro is removed later on I can still boot the others,
WINDOWS BSD CENTOS LFS UBUNTU in that order, The windows install is on 1st partition not touching it,
If I was to run grub-install /dev/sda2(boot) from LFS and I was to remove LFS or Rebuild will I still be able to boot the other OS.
As I see it there are some kernels in centos /boot. As there are in Ubuntu /boot
When I have built LFS with a seperate /dev/boot the kernels all went in there.
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444
Rep:
You can install the OSs you want, but the one you want to control the boot leave for last. You will be able to remove the others and still boot just fine. If you remove the one that control the boot then you wont be able to boot any of the others.
If you decide to remove any of the others and install something else make sure you select no to install a boot loader, just reboot into the one controlling the boot and upgrade GRUB or whatever boot loader you are using.
On this computer I have a permanent installation of CentOS and a guest partition for the distro I'm currently testing (number 96 coming up!). I have the CentOS grub on the MBR and the current guest has grub/lilo on its own partition, chain-loaded from the CentOS grub. If grub2 makes a fuss about being on a partition, I alter the CentOS grub to boot the guest directly.
So, I'd pick whichever Linux you intend to keep (CentOS) and put its grub on the MBR. Do you really need a /boot partition?
Thks gose to Larry Webb for Inspiration and direction
Well I have managed to build a stand alone grub2, I 1st created a 100mb partition /dev/sda2
Then I ran grub-install, to sda and sda2 I then made my own grub.cfg file and put that in /dev/sda2/boot/grub. As this setup stands it dosn't rely on any distro to boot OS,s.
I have got another machine chainloading. I wanted to have grub not depend on any distro
That can't be done. Well, at least not in a very straightforward manner. The bootloader doesn't really do a lot other than loading a partition. In order for a bootloader to function there has to be an accessible partition containing grub. Technically you could probably keep a very small skeleton partition (maybe 200 mb) which houses grub and the kernels. That is essentially what windows does these days. This will require a bit of tweaking and will probably be easier to set up with grub 1.99, since the majority of the install is in the boot directory.
Yes it can be done no kernels are moved from OS.s. The grub I used was from my lfs which I then removed lfs from the pc and was still able to boot all the other distros. I will make a blog with how I did it.
No I didn't remove the grub partition, when removing the OS, There arn't any kernels in the boot partition either. I wanted a standalone grub that was independent.
The idea was If Example I had Ubuntu grub controling boot and removed Ubuntu I could still boot the other distros, It just seemed like a sensible way to multi boot
Right. The kernel doesn't have to be on the same partition as grub, but grub itself has to be installed. I think I see what your are getting at now. I have had similar setups. My question is why don't you put the kernels on that partition. Keeping the kernels on a partition which isn't mounted at runtime is a good practice.
I used to have a system with crunchbang as my default os, and space for two more to play around with, this was my partition table
sda1 -> 400mb Boot partition for all distro's, Contained all of the kernels which is why I made it so large.
sda2 -> Crunch Bang root
sda3 -> 6GB swap
sda4 -> extended
sda5 -> distro 1 root
sda6 -> distro 2 root
Of course if you are in the habit of creating seperate partitions for each part of the file system then things will get more complicated. On a desktop boot, root, and swap is enough for me.
The only downside to this is that you have to be careful not to overwrite the boot partition when installing a new distro. What I usually do is install the new distro with everything in the root partition. Then I manually copy the kernels and systems maps over to the boot partition, adjust fstab, and update grub.conf
I didn't think about that the only other thing about that is if you remove a distro it leaves the kernals behind. So I hope this way remove "Example" centos all is gone in 1 go then replace with Fedora pick up the kernel just add to grub.cfg. This is my 1st go at this so maybe little things need ironong out.
Removing an extra kernel usually isn't too much of a hassle. In my case I recompile nearly all my kernels, so they are pretty similar anyway. I could probably use them interchangeably and not notice a difference.
grub-install --boot-directory=<your /boot on the boot partition> /dev/?
This should install the grub files to the /boot on the boot partition, Then make a custom grub.cfg file to suit your purposes. Chainloading will probably work best. when you delete a distro you won't loose the grub boot files.
Last edited by colorpurple21859; 04-01-2013 at 01:21 PM.
I have it up and running, That is the way I installed grub as well the only thing that wont work is chainloading Ubuntu and centos, although I copied from Ubuntu grub.cfg
grub-install --boot-directory=<your /boot on the boot partition> /dev/?
This should install the grub files to the /boot on the boot partition, Then make a custom grub.cfg file to suit your purposes. Chainloading will probably work best. when you delete a distro you won't loose the grub boot files.
That should work but I fail to see why you need to chain load. To be honest I never really understood why you would chain load unless you:
1. had an inferior (windows) operating system which was only capable of booting with it's own boot loader.
2. have multiple physical drives containing root file systems.
The problem with chain loading is that you can only write to boot sectors on primary and (technically extended) partitions. However if you are installing multiple distro's There is a good chance you have boot partitions on sda5+. These logical partitions can be booted from the MBR or sda1-4, but cannot be directly chainloaded.
My philosophy is this. There is no reason to have more than one boot or swap partition on any system running a bunch of linux distros.
As I said above the only exception I can think of would be if you have root partitions located on different physical disks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.