[Top][All Lists]

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

Re: What does grub-install do?

From: lee
Subject: Re: What does grub-install do?
Date: Sat, 2 Oct 2010 15:36:29 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Oct 02, 2010 at 08:56:18PM +0800, Goh Lip wrote:
> 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.

Would it make a difference to create a new grub.cfg for the old OS to
replace the existing one?

> Yes, if there is no existing grub2, then a new grub.cfg must be
> created manually (just copy over and modify).

For doing that, I need documentation --- but there doesn't seem to be
any. And I don't want to experiment, thereby risking to lose my data
and having to reboot my computer 5000 times or more before I get it to
work by trial and error.

> But for partitions with existing grub.cfg, the old grub.cfg will be
> maintained.

grub-install could just ask the user what to do.

> 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 how do you get a grub.cfg in the first place? I'm trying since
days to get a bootable system after moving my system partitions from
an old IDE disk I want to retire to a RAID1 on SATA disks. Tools like
grub-mkconfig and grub-install have proven to be totally useless for
installing grub. Since there's no documentation, I'm also unable to
create a grub.conf that might eventually work. I've even tried to use
a /boot partition on the IDE disk because grub appears to be unable to
boot from a RAID1 when /boot is on the RAID, but grub-install doesn't
create a grub.cfg and leaves me screwed.

Moving your system partitions from one disk to another should be an
easy task. It actually is, but making the system bootable turns out to
be impossible. The current situation is a desaster because Linux users
are stranded without a working a boot manager. Grub doesn't have
documentation and is not installable.

The daily build of the Debian installer has also proven unable to
install on a RAID1 without using LVM. That's ridiculous ...

So you can ask what's grub-install for? It doesn't install grub.

reply via email to

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