Thu 21 Jan 2010 03:41:14 AM UTC, comment #4:
I take your point about only one grub.cfg file being used for the boot; however, it does seem like 30_os-prober is getting information from other grub.cfg files or somewhere because on my box, if the grub.cfg for a non-booted system partition contains the machine name for that partitions menuentrys, then that machine name shows up in the grub.cfg file on the "master" partition when update-grub is run in that instance; that is, the machine name gets propagated.
Bottom line: my solution may not be the best one. I am not married to it. But is there some way to enable the machine/architecture to be added to the automatically generated menu entries somehow?
|
Fri 15 Jan 2010 09:41:09 PM UTC, comment #2:
Thanks, Felix. I understand that there is some unique information already present in existing menuentry lines. My system is an experimental system where I am booting both 32 and 64-bit versions of Ubuntu 9.10. For now. However, I expect to be experimenting with other Linux OSes as well. Unless the best practice is to run update-grub always from the same instance of the OS whenever updates are needed, a user in my position will see different menuentries float to the top of the menu list depending on which OS instance is booted when the update-grub command is executed. In this case, the 64-bit entries are at the bottom because update-grub was last run on a 32-bit instance.
It may be that I am not using GRUB2 in the generally accepted way; and, of course, I can/should keep a list of which OSes are on which drives. But the heart of this feature request is based on the assertion that adding the architecture information automatically is trivial and eliminates the need for the kind of manual bookkeeping that would be needed otherwise.
Making this change to 10_linux would ensure that anytime any instance of a Linux grub2 OS was updated that its entries would be tagged with machine architecture information. Since an update occurs at least once with every installation, it would follow that all menuentries would be tagged with the proper architecture.
Heck, I'd like to see the distribution's version number included as well.
Granted, that most installations run a single instance of a single version of a single architecture. In which case, it doesn't really matter what gets done. But when configurations get complicated it would be good for the tools to be able to automatically make things clearer.
Does this make sense? I am open to argument if my premise is faulty.
|
Wed 13 Jan 2010 02:58:59 AM UTC, original submission:
The new grub provides a lot of good features, but I would like to see it provide the machine name/arch as part of the automatically generated menu entries. My system is a multi-boot machine with multiple versions of 32 and 64-bit Ubuntu running on it. The currently generated menu lists do not provide any way to tell which are which.
Some minor changes to /etc/grub.d/10_linux fix this. I have attached a patch file which has proposed changes.
Here is an example. Before the change, all the generated menu entries look the same: which are the 32 and which are the 64 bit entries?
Ubuntu, Linux 2.6.31-17-generic
Ubuntu, Linux 2.6.31-17-generic (recovery mode)
Ubuntu, Linux 2.6.31-16-generic
Ubuntu, Linux 2.6.31-16-generic (recovery mode)
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows Vista (loader) (on /dev/sda1)
Ubuntu, Linux 2.6.31-17-generic (on /dev/sda6)
Ubuntu, Linux 2.6.31-17-generic (recovery mode) (on /dev/sda6)
Ubuntu, Linux 2.6.31-15-generic (on /dev/sda6)
Ubuntu, Linux 2.6.31-15-generic (recovery mode) (on /dev/sda6)
Once the 10_linux is patched and update-grub is run from both systems, the list looks like this:
Ubuntu-i686, Linux 2.6.31-17-generic
Ubuntu-i686, Linux 2.6.31-17-generic (recovery mode)
Ubuntu-i686, Linux 2.6.31-16-generic
Ubuntu-i686, Linux 2.6.31-16-generic (recovery mode)
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows Vista (loader) (on /dev/sda1)
Ubuntu-x86_64, Linux 2.6.31-17-generic (on /dev/sda6)
Ubuntu-x86_64, Linux 2.6.31-17-generic (recovery mode) (on /dev/sda6)
Ubuntu-x86_64, Linux 2.6.31-15-generic (on /dev/sda6)
Ubuntu-x86_64, Linux 2.6.31-15-generic (recovery mode) (on /dev/sda6)
|