help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does grub-install do?


From: Goh Lip
Subject: Re: What does grub-install do?
Date: Sat, 02 Oct 2010 20:56:18 +0800
User-agent: Opera Mail/10.62 (Linux)

On Sat, 02 Oct 2010 19:57:12 +0800, lee <address@hidden> wrote:

On Sat, Oct 02, 2010 at 12:01:28AM +0800, Goh Lip wrote:

When you do a "grub-install --root-directory=/media/something
/dev/sda", it creates a /boot and /boot/grub/ (without any grub.cfg)

Then how are you supposed to create a grub.cfg to end up with a
bootable system?

Hi Lee, just giving a hypothetical example to illustrate...
say you have a really old OS at /media/something (external hard disk) with an existing (old version) grub2 and grub.cfg and there is a new grub2 at an experimental OS with a new version grub2 that can boot up btrfs partitions. You want to use that old OS and yet boot up btrfs as well. By "grub-install --root-directory=/media/something....." you have generated that new grub2 version in the old OS and *still keep* the existing grub.cfg in the old OS for booting.

Yes, if there is no existing grub2, then a new grub.cfg must be created manually (just copy over and modify). But for partitions with existing grub.cfg, the old grub.cfg will be maintained. I think that's good; for example, I had a dedicated grub partition that boots up every OS and sometimes experimental or old OS's gets nuked. If the OS that's nuked has its grub set to mbr, I would not be able to boot anything. By using ".....-root-directory", I keep the grub.cfg without worrying about any change I would have to do if the grub.cfg gets 'updated' each time I update the grub version.

But I do see your point.

Take care, Lee, regards - Goh Lip



reply via email to

[Prev in Thread] Current Thread [Next in Thread]