multidistro grub2 idea
THE PROBLEM
=============
The problem about boot loaders in a multi distribution environment is
the grub configurations being overlapped.
Imagined this partition layout:
part 1: windows
part 2: ubuntu
part 3: debian
If you install first windows, then ubuntu and then debian is great
possible that debian makes its menu.lst be the default one.
It can also have the correct lines for booting ubuntu or it might have not them.
I suppose that there is more complication when you run the update-grub
command when a kernel has been updated.
THE DISCUSSION
================
When there are multiple distros I've been regularly astonished of the
ones that advice of copy-and-paste lines from other menu.lst and add it to your current one. And they are people that not even use copy-and-paste and advice to add the lines by hand.
I think the problem is here is that no one knows that a command called
configfile exists.
In my computer I have 4 menu.lst and I have not used the configfile
approach. I have installed grub in the distros' partition and also in the mbr which is associated with a grub installed on a /boot partition.
Disk /dev/sda: 137.4 GB, 137437871104 bytes
255 heads, 63 sectors/track, 16709 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 1275 10241406 c W95 FAT32 (LBA) /dev/sda2 1276 1287 96390 83 Linux (/BOOT) /dev/sda3 1288 3719 19535040 83 Linux (DEBIAN) /dev/sda4 3720 16709 104342175 5 Extended /dev/sda5 3720 15147 91795378+ 83 Linux (/HOME) /dev/sda6 15148 16166 8185086 83 Linux (FEDORA) /dev/sda7 16167 16198 257008+ 82 Linux swap / Solaris /dev/sda8 16199 16709 4104576 83 Linux(TEST DISTROS)
THE SOLUTION
=============
I think that if grub2 is going to have scripting and so many new features we should take advantage of them and change the way computers do boot.
#1) All Linux installers should set or reuse a ext2 partition next to the windows one as a /boot one where grub2 is installed.
#2) /boot/grub/
will have a new folder called:
/boot/grub/menu/
which will be filled with .cfg files from the different distros that
are installed in a computer.
As an example ubuntu installed on /dev/sda2 should have a ubuntu-sda2.cfg file in there.
#3) grub2 should include tools to deal with this .cfg files from the linux environment.
#4) /boot/grub/grub2.cfg will be used for determining which of the .cfg files inside /boot/grub/menu is the default one and which it is the timeout for it.
(If only one .cfg file is found then timeout is 0).
#5) The problems that happened when a distro had been patched for doing one thing or another one will not exist. Why? Because distros can take advantage of the modules in order to add its own enhacements to grub2.
#6) /boot/grub/grub2.cfg security should be enhanced.
What are your thoughts about this idea?
adrian15
Quoted 10 lines · On 7/23/07, adrian15 <[email protected]> wrote:
I think that if grub2 is going to have scripting and so many new features we should take advantage of them and change the way computers do boot.
#1) All Linux installers should set or reuse a ext2 partition next to the windows one as a /boot one where grub2 is installed.
What are your thoughts about this idea?
Can't grub2 merge menu.lst files from all grub2-readable partitions and generate a menu dynamically? I dont know, but does this require grub2 to load *all* filesystem modules on boot-up?
Signature · 1 line
bvk-chaitanya
Quoted 10 lines · BVK
Quoted 8 lines · On 7/23/07, adrian15 <[email protected]> wrote:
I think that if grub2 is going to have scripting and so many new features we should take advantage of them and change the way computers do boot.
#1) All Linux installers should set or reuse a ext2 partition next to the windows one as a /boot one where grub2 is installed.
Quoted 7 lines
Quoted 2 lines
What are your thoughts about this idea?
Can't grub2 merge menu.lst files from all grub2-readable partitions and generate a menu dynamically? I dont know, but does this require grub2 to load *all* filesystem modules on boot-up?
That's quite similar to how Super Grub Disk works when you try to boot an existing linux and it seeks for all the menu.lst.
I am talking about changing the boot world. Having an unique boot partition might make things much simpler.
Although I also think that if you loose this partition you are in trouble so there should be a backup of this partiton somewhere on the root partitions. :)
adrian15
Quoted 30 lines · On 7/23/07, adrian15 <[email protected]> wrote:
THE PROBLEM
=============The problem about boot loaders in a multi distribution environment is
the grub configurations being overlapped.I think the problem is here is that no one knows that a command called
configfile exists.
In my computer I have 4 menu.lst and I have not used the configfile
approach. I have installed grub in the distros' partition and also in the mbr which is associated with a grub installed on a /boot partition.Disk
/dev/sda: 137.4 GB, 137437871104 bytes
255 heads, 63 sectors/track, 16709 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 c W95 FAT32 (LBA) /dev/sda2 1276 1287 96390 83 Linux (/BOOT) /dev/sda3 1288 3719 19535040 83 Linux (DEBIAN) /dev/sda4 3720 16709 104342175 5 Extended /dev/sda5 3720 15147 91795378+ 83 Linux (/HOME) /dev/sda6 15148 16166 8185086 83 Linux (FEDORA) /dev/sda7 16167 16198 257008+ 82 Linux swap / Solaris /dev/sda8 16199 16709 4104576 83 Linux(TEST DISTROS)THE SOLUTION
=============
Quoted 6 lines
I think that if grub2 is going to have scripting and so many new features we should take advantage of them and change the way computers do boot.
#1) All Linux installers should set or reuse a ext2 partition next to the windows one as a /boot one where grub2 is installed.
.. . if the dreaded OS exists. But a single /boot partition is not preferable over 'but from anywhere' principle.
Quoted 9 lines
#2)
/boot/grub/will have a new folder called:
/boot/grub/menu/which will be filled with .cfg files from the different distros that
are installed in a computer.
It will be a good thing if, if grub2 is installed to the mbr of the active partition and if a new OS is going to be installed, then we must be able to tell grub2 about it and accordingly it must be able to update the .cfg, when the new OS tries to write to the MBR of any of the partitions.
Best
A. Mani
Signature · 2 lines
A. Mani Member, Cal. Math. Soc
Quoted 4 lines · Mani A
Quoted 2 lines
#1) All Linux installers should set or reuse a ext2 partition next to the windows one as a /boot one where grub2 is installed.
.. . if the dreaded OS exists. But a single /boot partition is not preferable over 'but from anywhere' principle.
Well.. this is the old discussion: Centrality versus Redundancy and its problems.
Quoted 7 lines
Quoted 7 lines
#2)
/boot/grub/will have a new folder called:
/boot/grub/menu/
Quoted 8 lines
Quoted 2 lines
which will be filled with .cfg files from the different distros that
are installed in a computer.It will be a good thing if, if grub2 is installed to the mbr of the active partition and if a new OS is going to be installed, then we must be able to tell grub2 about it and accordingly it must be able to update the .cfg, when the new OS tries to write to the MBR of any of the partitions.
How would you detects this partition boot records changes? Saving a backup somewhere in the linux system and running an utility on the boot that compares backup to real partition boot sectors and asks you if you want to update cfg?
That's your idea?
adrian15
Quoted 1 line · On 8/12/07, adrian15 <[email protected]> wrote:
Mani A escribió:
<snip>
Quoted 10 lines
Quoted 6 lines
It will be a good thing if, if grub2 is installed to the mbr of the active partition and if a new OS is going to be installed, then we must be able to tell grub2 about it and accordingly it must be able to update the .cfg, when the new OS tries to write to the MBR of any of the partitions.
How would you detects this partition boot records changes? Saving a backup somewhere in the linux system and running an utility on the boot that compares backup to real partition boot sectors and asks you if you want to update cfg?
Yes that would be one way to implement it. The way current hardware is, an extra utility on boot will be natural, safer and user friendly.
Best
A. Mani
Signature · 2 lines
A. Mani Member, Cal. Math. Soc