menu's "default=saved" is need for hibernation on multi-os systems.
Hello,
Grub2 doesn't seems to have a feature similar to grub1 "default=saved" in menu.lst, does it ?
On a multiboot system, it's important to have it :
In my situation, Xen is first listed in the menu, but I usually boot plain kernel, which can Hibernate. After reboot, The first system is rebooted by default, which can cause lose of data.
The problem would also occur if a user had two OS, and both mount a given partition. Hibernating the second OS, then booting the first could cause data loss too.
Having default=saved drastically simplifies the situation : Before choosing another OS in the menu, one has to remember if the computer was hibernated last time. If in doubt let grub boot the previous OS.
A more cleaver mechanism would even be better...
- Like getting the OS to put a flag when booted, then remove it on shutdown.
- Or actually each OS' hibernation status (ouch!)
Franklin
Franklin PIAT <[email protected]> writes:
Hi,
Quoted 2 lines
Grub2 doesn't seems to have a feature similar to grub1 "default=saved" in menu.lst, does it ?
Not yet, but we want it. Do you want to work on this?
--
Marco
Marco,
Quoted 5 lines · Marco Gerards
Quoted 2 lines · Franklin PIAT
Grub2 doesn't seems to have a feature similar to grub1 "default=saved" in menu.lst, does it ?
Not yet, but we want it. Do you want to work on this?
I wish I could ;) I haven't written any C code for years.
I'll stick to writing grub "manpages" or shell improvements. I think documentation is really needed today, in order to get a wider adoption of grub2.
... that's why I'll come-up with a few more questions ;)
Thanks,
Franklin
Franklin PIAT <[email protected]> writes:
Hi,
Quoted 8 lines · Marco Gerards
Quoted 5 lines
Quoted 2 lines · Franklin PIAT
Grub2 doesn't seems to have a feature similar to grub1 "default=saved" in menu.lst, does it ?
Not yet, but we want it. Do you want to work on this?
I wish I could ;) I haven't written any C code for years.
Too bad. If I just ask enough people, someone will eventually work on this ;-)
Robert, do you know if Guillem is still willing to work on this? I thought you know him quite well, so I start asking you here. He had some code two years ago when I met him at FOSDEM. IIRC the problem was that we didn't have an elf.mod. We do have this now.
Quoted 4 lines
I'll stick to writing grub "manpages" or shell improvements. I think documentation is really needed today, in order to get a wider adoption of grub2.
... that's why I'll come-up with a few more questions ;)
:-)
How about writing a manual just like GRUB Legacy has? It would be nice to have a good info manual that covers GRUB 2. It's one of the most important things that is missing. And you do not need to know C to write one :-)
--
Marco
Quoted 5 lines · Marco Gerards
Robert, do you know if Guillem is still willing to work on this? I thought you know him quite well, so I start asking you here. He had some code two years ago when I met him at FOSDEM. IIRC the problem was that we didn't have an elf.mod. We do have this now.
Guillem says you must be confused. He was interested in adding support for kernel of FreeBSD, not grub-set-default.
Franklin, implementing grub-set-default is relatively easy, and a good way to learn about how GRUB works.
Basicaly, you just need to do something like add a variable similar to this one:
./kern/i386/pc/startup.S:VARIABLE(grub_install_dos_part)
which is initialised in:
./util/i386/pc/grub-setup.c: + GRUB_KERNEL_MACHINE_INSTALL_DOS_PART);
based on predefined offset in:
./include/grub/i386/pc/kernel.h:#define GRUB_KERNEL_MACHINE_INSTALL_DOS_PART 0x14
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)
Quoted 4 lines · Robert Millan
On Thu, Jan 24, 2008 at 10:21:01AM +0100, Marco Gerards wrote:
Franklin, implementing grub-set-default is relatively easy, and a good way to learn about how GRUB works.
Basicaly, you just need to do something like ...
I hope that someone heard this, and would implement it.
It would be very much effective if I focus on documentation. (You guys are implementing a lot of features every week... I guess I'm gonna have hard time keeping up with you ;)
Franklin