LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub2 on /boot/grub auto-update? (https://www.linuxquestions.org/questions/linux-newbie-8/grub2-on-boot-grub-auto-update-4175559358/)

sanguine penguin 11-19-2015 08:52 PM

Grub2 on /boot/grub auto-update?
 
I'm new to the Linux environment. Want to get away from Windows7 but have to keep it for now for a few apps (looking into RoboLinux). I have a legacy/MBR eeePC. The plan is to have two windows primary partitions, one for windows7 and one for the hidden windows reserved/system partition. Then I will have one primary Linux /boot partition, ext3. Finally there will be an extended ext4 partition for various Linux OS, “/” root, /home, /swap, etc, all using Gparted.

Initially I want to install the most recent Lubuntu and PuppyLinux Tahr. Lubuntu will be installed first, then Puppy. Then later on I might add another distro or two.

If I create a primary "/boot" and an extended logical drive "/" root partition, will Lubuntu be smart enough to install the boot files & grub2 in the boot partition and the system OS files in the "/" root partition or logical drive?

If that is true, then when I create a "/" root logical drive partition in the extended ext4 partition for the following Puppy install, will Puppy Tahr be smart enough to install boot files and edit Grub2 in the "/boot" partition and the OS system files in it's own "/" root partition? That would be ideal. Especially if each subsequent Linux distro I may install behaved the same way. OR do I have to manually edit the Grub2 file for each new distro installed?

Do I even need a "/boot" partition to have a menu of operating systems to choose from? Keep in mind that don't want to directly edit the MBR but rather chain-load by using boot.img and core.img as described here: https://en.wikipedia.org/wiki/GNU_GR...GRUB_legacy.29

Thx.

syg00 11-20-2015 01:08 AM

Take it from someone who does a lot of this:
- allocate as much space as you can to the extended, and make all your Linux partitions logical.
- no /boot partition; else later (re-)installs get real complicated.
- similar for /home - no need for it. And don't even think of sharing /home.
- install lubuntu first and let it update the MBR - it will find Win7. Later installs will need a grub-update.
- puppy should probably be a frugal install, so isn't really a boot/MBR consideration.

RockDoctor 11-20-2015 08:34 AM

I'll respectfully disagree with the no /boot partition. My layout looks something like this:
  • /dev/sda1 Windows 7
  • /dev/sda2 Boot partition
  • /dev/sda3 the extended partition
  • /dev/sda5 a data partition
  • /dev/sda6 a data partition
  • /dev/sda7 Windows 10
  • /dev/sda8 a data partition
  • /dev/sda9 a data partition
  • /dev/sda10 Ubuntu-Mate 16.04
  • /dev/sda11 Fedora 23
  • /dev/sda12 Fedora Rawhide
  • /dev/sda13 Ubuntu-Mate 15.10
Each Linux partition is about 20 GB; the Boot partition is 1 GB. Grub in the MBR points to the boot partition; the boot partition's grub.cfg file is set up to chainload grub on each of the Linux partitions (the Linux partitions are identified by entries like this one:
Code:

menuentry "Ubuntu 16.04-64 on sda10" {
  insmod ext2
  set root=(hd0,msdos10)
  chainloader +1
}

The disadvantage is that I have to modify this grub.cfg file each time I swap out one Linux distro for another. The advantage is that I avoid repartitioning; something I don't really trust development versions of anaconda and ubiquity to do properly. Is it worth the effort? For me, yess. YMMV.

sanguine penguin 11-20-2015 10:22 PM

Thanks for the info. Just wondering why no /home partition and why not share it?
One thing I want to do with Linux is compare performance of certain applications like Gimp on different distros with the same working files. I'd rather not have redundant /home directories or mount points with redundant files in them for each distro.

Any favorite links on how to update/edit Grub2 and what circumstances would require that? I thought newer versions of the most popular distros would be able to find Grub and update it automatically as required.

syg00 11-20-2015 10:49 PM

My response was based on making things as straightforward as possible for a new user. Anything is do-able. Not everything is easily do-able.
And some problems may not be immediately apparent. Hence the "don't share /home". A lot of "hidden" files are application/version specific - different distros may be at differing levels. Probably won't matter, but might.
For the photos, create a data partition as @RockDoctor shows, and share that. Much safer. Personally I have a RAID5 array for mine - just the shots, nothing else.

Grub will do what you want - just be careful what you ask for. By default each distro will want to update the MBR - can get surprising when you delete the distro that "owns" the MBR.

RockDoctor 11-21-2015 07:09 AM

1 Attachment(s)
Lots of symlinks in my home directory:


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