LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A non-distro boot partition (https://www.linuxquestions.org/questions/linux-newbie-8/a-non-distro-boot-partition-4175503050/)

TheMadness 04-26-2014 05:50 AM

A non-distro boot partition
 
(Skip this paragraph if you want) I'm a Linux beginner, currently with Windows 8.1 and Kali linux sharing a drive, and grub as my bootloader on a separate partition. Over time, I intend to have about 4 or so other Linux distro's added as I play around with it, sharing partitions where it makes sense to.

The question:

Rather than having each distro (or a single distro) auto-mount the current boot partition containing grub, could I instead have each distro keep its own /boot virtually empty under its root partition, and only load grub's boot partition when I'm about to update grub, then unmount again? As it seems to me, grub has everything it needs to run within its partition+mbr, and only needs the files from /etc folder during the install and update steps.

What I would like to do is have a grub boot partition that's not associated with any particular distro on the machine, but can be mounted and modified on-demand whenever I want to make changes.

Smokey_justme 04-26-2014 06:01 AM

You can achive something similar with what you've said, but you failed to account of something.. Using one distro's grub is actually this exact thing..

Ohh, and you need each /boot/ since there lies most distributions kernels.. Grub is useless if it has nothing to load :P

yancek 04-26-2014 09:21 AM

You can have a separate boot or even grub partition but the setup is quite a bit different than normal installs. Also, as Smokey_justme said, you need the kernel and initrd files for each distribution to boot. What exactly are you trying to accomplish?

TheMadness 04-26-2014 03:06 PM

Quote:

Originally Posted by yancek (Post 5159557)
You can have a separate boot or even grub partition but the setup is quite a bit different than normal installs. Also, as Smokey_justme said, you need the kernel and initrd files for each distribution to boot. What exactly are you trying to accomplish?

Yeah, I was over-tired and missed those facts. Considering the initrd and kernel configs.... perhaps it's just better to share the boot partition between distros then?

Smokey_justme 04-26-2014 03:34 PM

Hmmm, well, am I to understand that currently you have a single boot partition for all your Linux OSs? Because that can actually cause problems if the kernel packages collide (for example if they use a symlink to point to the current kernel -- not to mention the initrd image which usually uses the same name across distributions)...

What I meant in my previous post is that you should let every system have it's own /boot directory in the root partition.. That way, you'll have no problems and all systems will be separated from each other..

TheMadness 04-26-2014 04:44 PM

Quote:

Originally Posted by Smokey_justme (Post 5159736)
Hmmm, well, am I to understand that currently you have a single boot partition for all your Linux OSs? Because that can actually cause problems if the kernel packages collide (for example if they use a symlink to point to the current kernel -- not to mention the initrd image which usually uses the same name across distributions)...

What I meant in my previous post is that you should let every system have it's own /boot directory in the root partition.. That way, you'll have no problems and all systems will be separated from each other..

So suppose I have 3 Linux distros on a disk, using grub as the bootloader. Each distro has its own /boot directory under its own main partition (the partition containing the root, etc). Then grub will exist in the mbr, plus extend into the boot directories of one of the distros. That about right? If so, I wanted to see if the boot directory containing grub could be disassociated with the one distro that installs it. As an ideal, I wanted to see if I could keep the boot-menu stuff away from any particular distro, and just on its own partition, mounted on-demand for reconfiguration. But if it's not feasible, I'm fine with leaving grub as part of one distro's boot directory, if that's what you suggest.

yancek 04-26-2014 05:11 PM

If you had a separat boot or grub partition, it would have to be mounted in order for you to boot just as when you boot your system, the / partition needs to be mounted. Yes, you can create a separate boot or even just a grub partition.

The link below at Ubuntu (I think Kali is Ubuntu derived?) explains how to create a separate boot partition after Install for both Grub2 and Grub Legacy.

https://help.ubuntu.com/community/Cr...onAfterInstall

More information on this as well as creating a dedicated 'grub' partition at the site below, the posts by 'Herman' in particular and there is a link to more detailed information in post 2 by Herman. The link only discusses Grub Legacy and was written 8 years ago.

http://ubuntuforums.org/showthread.php?t=1320270

It seems a dedicated Grub partition might be a better option but it's never been worth the effort to me to try it.

TheMadness 04-26-2014 05:39 PM

Quote:

Originally Posted by yancek (Post 5159784)
If you had a separat boot or grub partition, it would have to be mounted in order for you to boot just as when you boot your system, the / partition needs to be mounted. Yes, you can create a separate boot or even just a grub partition.

The link below at Ubuntu (I think Kali is Ubuntu derived?) explains how to create a separate boot partition after Install for both Grub2 and Grub Legacy.

https://help.ubuntu.com/community/Cr...onAfterInstall

More information on this as well as creating a dedicated 'grub' partition at the site below, the posts by 'Herman' in particular and there is a link to more detailed information in post 2 by Herman. The link only discusses Grub Legacy and was written 8 years ago.

http://ubuntuforums.org/showthread.php?t=1320270

It seems a dedicated Grub partition might be a better option but it's never been worth the effort to me to try it.

I'll give it a look, thanks (to both).


All times are GMT -5. The time now is 08:38 AM.