grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] grub-install C rewrite


From: Lennart Sorensen
Subject: Re: [RFC] grub-install C rewrite
Date: Thu, 26 Sep 2013 16:22:53 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Sep 26, 2013 at 08:49:52PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
> This is interesting testcase which wasn't brought before. This would
> potentially involve creating several core.img or forcing UUID when using
> multiple devices. Again, pretty easy in C and hairy in bash due to list
> handling.

No, one core.img is fine.  The boot disk is the boot disk in each case
(so on x86 device 0x80).  The same core.img gets inserted too all the
devices, so that if it happens to be the boot disk, it works.  Since the
partition is raid1, the same UUID is everywhere.  I do not expect
booting from a raid5 device to be possible as the boot partition (althoug
hperhaps grub is smart enough to read the kernel from an md raid5 device
these days).

> It's surely sth we can do. grub-install does only following that is
> affecting system:
> 1) mkdir -p
> 2) copy files. We can write exact copy commands
> 3) grub-mkimage. We can do the same.
> 4) grub-setup. Ditto
> 5) Create load.cfg. Ditto.
> 6) calling external commands.
>  We can have 4 levels of verbosity:
> 0) quiet,
> 1) write to stderr the commands
> 2) like 1 but show grub_util_info
> 3) additionally show grub_dprintf
> 
> It's also possible to have options --dry-run (doesn't really do the
> changes, except, perhaps, "mkdir -p") and --gen-script which would
> generate a list of commands which when executed would do exactly as if
> grub-install was run. So you can do
> grub-install --dry-run --gen-script=/tmp/myinstall ...
> <change /tmp/myinstall to will>
> /tmp/myinstall
> This has additional advantage of see which commands are really executed
> without having to understand the whole command flow.

-- 
Len Sorensen



reply via email to

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