Home » Questions » Computers [ Ask a new question ]

How do I prevent two OSes from clobbering grub files?

How do I prevent two OSes from clobbering grub files?

I want to install Linux and OpenSolaris on the same hard disk in different partitions. I'm worried because OpenSolaris seems to actively manage the grub data when updating the OS (part of the "boot environment" feature). Is there anything I should prepare for to prevent my grub data from getting clobbered. If I later want to add another version of linux to the same system, what are the considerations? Should I choose one OS and always do grub updates from that one OS? If so, then how do I use the installation iso for a new version of Linux? Won't it go ahead and modify the grub data on its own? Once I've already booted into Linux, and I want to udpate my grub files, should I run a grub command that reads the data from the boot section of the drive, and puts it into the local filesystem I'm currently booted into?

Asked by: Guest | Views: 253
Total answers/comments: 3
bert [Entry]

"You're going to have to tell one OS or the other not to automatically clobber the GRUB boot sector.

All Linux distros that I've seen have some way to prevent their installation CD from clobbering the boot sector, but it's often in some obscure advanced option.

The majority of GRUB's configuration data is not stored in the very small boot sector, which just contains a small loader program and a pointer to where to find the rest. The configuration data is usually stored in a regular directory in a regular partition on the drive (/boot under many Linux distros). So unless Solaris is actually going in and monkeying with the data on the Linux partition, it's probably not a huge deal... if one OS clobbers the boot sector created by the other, you can easily recover it."
bert [Entry]

"I think you're better of running one of the OS's as a Virtual Machine.

With a modern CPU that supports VM extensions and a couple of GB RAM, you can run 3-4 machines easily. Use the following snippet to check if your CPU supports them.

egrep '^flags.*(vmx|svm)' /proc/cpuinfo

There are plenty of options for this: Xen, kvm, VirtualBox, VMware."
bert [Entry]

"you can try installing both WITHOUT grub, and just keep a cd containing super grub which will allow you to boot either OS.

Super Grub Disk is this utlity which once run, runs grub and you can choose your OS, fix the grub on your MBR, and others.

i think you can also create a boot disk aside from grub or lilo. i'm not sure how it's done however."
"you can try installing both WITHOUT grub, and just keep a cd containing super grub which will allow you to boot either OS.

Super Grub Disk is this utlity which once run, runs grub and you can choose your OS, fix the grub on your MBR, and others.

i think you can also create a boot disk aside from grub or lilo. i'm not sure how it's done however."