All of lore.kernel.org
 help / color / mirror / Atom feed
* Having the configuration file embedded into core.img look for the grub partition by its label
@ 2014-09-22 20:49 Arbiel Perlacremaz
  2014-09-22 23:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 11+ messages in thread
From: Arbiel Perlacremaz @ 2014-09-22 20:49 UTC (permalink / raw)
  To: grub-devel

Hi

A way I'm using to avoid any Window's reinstallation to overwrite GRUB
in a multiboot environment is to install the later on the MBR of a USB
key. That way, when booting with no key pluged, the PC boots into
Windows and when booting with the key pluged, the PC boots according to
the choice of the user in the grub menu's.

I do locate the grub.cfg file in a partition of the internal hard drive.
In such a situation, grub-install embeddes a config file which reads
something like

    search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
    set prefix=($root)'/'

This is great.

However, any undesired modification by any piece of software of the
partition's uuid will prevent GRUB to find it and lead to a boot
failure. As the Windows partition is less prone to such modifications as
Linux partitions, I do locate the grub.cfg file in that Windows
partition. However it would be more straightforward to locate the file
into a Linux partition, and to have grub search this partition by its label.

How could this be done ? If this can't presently be done, can it be
included in a future grub release ?

Regards

Arbiel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-22 20:49 Having the configuration file embedded into core.img look for the grub partition by its label Arbiel Perlacremaz
@ 2014-09-22 23:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2014-09-23  8:11   ` Arbiel Perlacremaz
  0 siblings, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-09-22 23:09 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]

On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
> Hi
> 
> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
> in a multiboot environment is to install the later on the MBR of a USB
> key. That way, when booting with no key pluged, the PC boots into
> Windows and when booting with the key pluged, the PC boots according to
> the choice of the user in the grub menu's.
> 
> I do locate the grub.cfg file in a partition of the internal hard drive.
> In such a situation, grub-install embeddes a config file which reads
> something like
> 
>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>     set prefix=($root)'/'
> 
> This is great.
> 
> However, any undesired modification by any piece of software of the
> partition's uuid will prevent GRUB to find it and lead to a boot
> failure. As the Windows partition is less prone to such modifications as
> Linux partitions, I do locate the grub.cfg file in that Windows
> partition. However it would be more straightforward to locate the file
> into a Linux partition, and to have grub search this partition by its label.
> 
> How could this be done ? If this can't presently be done, can it be
> included in a future grub release ?
use --boot-directory to place all files on usb stick and make it load
any other grub.cfg you might want.
> 
> Regards
> 
> Arbiel
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-22 23:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-09-23  8:11   ` Arbiel Perlacremaz
  2014-09-23 16:37     ` Andrei Borzenkov
  2014-09-26 19:00     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 11+ messages in thread
From: Arbiel Perlacremaz @ 2014-09-23  8:11 UTC (permalink / raw)
  To: The development of GNU GRUB

Having the grub directory on the external device is not what I'm looking
for.

I indeed use several external devices and I've installed GRUB on each of
them so that it is always available, whatsoever my configuration is. To
avoid confusion when updating GRUB, all my fstab files mount a unique
directory, always the same, on /boot/grub. This is the reason why I want
GRUB on my hard drive.


Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
>> Hi
>>
>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
>> in a multiboot environment is to install the later on the MBR of a USB
>> key. That way, when booting with no key pluged, the PC boots into
>> Windows and when booting with the key pluged, the PC boots according to
>> the choice of the user in the grub menu's.
>>
>> I do locate the grub.cfg file in a partition of the internal hard drive.
>> In such a situation, grub-install embeddes a config file which reads
>> something like
>>
>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>>     set prefix=($root)'/'
>>
>> This is great.
>>
>> However, any undesired modification by any piece of software of the
>> partition's uuid will prevent GRUB to find it and lead to a boot
>> failure. As the Windows partition is less prone to such modifications as
>> Linux partitions, I do locate the grub.cfg file in that Windows
>> partition. However it would be more straightforward to locate the file
>> into a Linux partition, and to have grub search this partition by its label.
>>
>> How could this be done ? If this can't presently be done, can it be
>> included in a future grub release ?
> use --boot-directory to place all files on usb stick and make it load
> any other grub.cfg you might want.
>> Regards
>>
>> Arbiel
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-23  8:11   ` Arbiel Perlacremaz
@ 2014-09-23 16:37     ` Andrei Borzenkov
  2014-09-27 15:39       ` Arbiel Perlacremaz
  2014-09-27 20:00       ` Arbiel Perlacremaz
  2014-09-26 19:00     ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 2 replies; 11+ messages in thread
From: Andrei Borzenkov @ 2014-09-23 16:37 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: arbiel.perlacremaz

В Tue, 23 Sep 2014 10:11:21 +0200
Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:

> Having the grub directory on the external device is not what I'm looking
> for.
> 
> I indeed use several external devices and I've installed GRUB on each of
> them so that it is always available, whatsoever my configuration is. To
> avoid confusion when updating GRUB, all my fstab files mount a unique
> directory, always the same, on /boot/grub. This is the reason why I want
> GRUB on my hard drive.
> 

Well, use grub-mkimage then; you are completely free in adding your own
embedded config file.

> 
> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
> > On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
> >> Hi
> >>
> >> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
> >> in a multiboot environment is to install the later on the MBR of a USB
> >> key. That way, when booting with no key pluged, the PC boots into
> >> Windows and when booting with the key pluged, the PC boots according to
> >> the choice of the user in the grub menu's.
> >>
> >> I do locate the grub.cfg file in a partition of the internal hard drive.
> >> In such a situation, grub-install embeddes a config file which reads
> >> something like
> >>
> >>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
> >>     set prefix=($root)'/'
> >>
> >> This is great.
> >>
> >> However, any undesired modification by any piece of software of the
> >> partition's uuid will prevent GRUB to find it and lead to a boot
> >> failure. As the Windows partition is less prone to such modifications as
> >> Linux partitions, I do locate the grub.cfg file in that Windows
> >> partition. However it would be more straightforward to locate the file
> >> into a Linux partition, and to have grub search this partition by its label.
> >>
> >> How could this be done ? If this can't presently be done, can it be
> >> included in a future grub release ?
> > use --boot-directory to place all files on usb stick and make it load
> > any other grub.cfg you might want.
> >> Regards
> >>
> >> Arbiel
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-23  8:11   ` Arbiel Perlacremaz
  2014-09-23 16:37     ` Andrei Borzenkov
@ 2014-09-26 19:00     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2014-09-26 21:02       ` Arbiel Perlacremaz
  1 sibling, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-09-26 19:00 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2636 bytes --]

On 23.09.2014 10:11, Arbiel Perlacremaz wrote:
> Having the grub directory on the external device is not what I'm looking
> for.
> 
> I indeed use several external devices and I've installed GRUB on each of
> them so that it is always available, whatsoever my configuration is. To
> avoid confusion when updating GRUB, all my fstab files mount a unique
> directory, always the same, on /boot/grub. This is the reason why I want
> GRUB on my hard drive.
> 
Upgrading modules without rerunning grub-install on all devices is not
supported. It may work for few revisions but when core functions change
it will break.
> 
> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
>>> Hi
>>>
>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
>>> in a multiboot environment is to install the later on the MBR of a USB
>>> key. That way, when booting with no key pluged, the PC boots into
>>> Windows and when booting with the key pluged, the PC boots according to
>>> the choice of the user in the grub menu's.
>>>
>>> I do locate the grub.cfg file in a partition of the internal hard drive.
>>> In such a situation, grub-install embeddes a config file which reads
>>> something like
>>>
>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>>>     set prefix=($root)'/'
>>>
>>> This is great.
>>>
>>> However, any undesired modification by any piece of software of the
>>> partition's uuid will prevent GRUB to find it and lead to a boot
>>> failure. As the Windows partition is less prone to such modifications as
>>> Linux partitions, I do locate the grub.cfg file in that Windows
>>> partition. However it would be more straightforward to locate the file
>>> into a Linux partition, and to have grub search this partition by its label.
>>>
>>> How could this be done ? If this can't presently be done, can it be
>>> included in a future grub release ?
>> use --boot-directory to place all files on usb stick and make it load
>> any other grub.cfg you might want.
>>> Regards
>>>
>>> Arbiel
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>
>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-26 19:00     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-09-26 21:02       ` Arbiel Perlacremaz
  2014-09-27  4:37         ` Andrei Borzenkov
  0 siblings, 1 reply; 11+ messages in thread
From: Arbiel Perlacremaz @ 2014-09-26 21:02 UTC (permalink / raw)
  To: The development of GNU GRUB

Hi

Le 26/09/2014 21:00, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
> On 23.09.2014 10:11, Arbiel Perlacremaz wrote:
>> Having the grub directory on the external device is not what I'm looking
>> for.
>>
>> I indeed use several external devices and I've installed GRUB on each of
>> them so that it is always available, whatsoever my configuration is. To
>> avoid confusion when updating GRUB, all my fstab files mount a unique
>> directory, always the same, on /boot/grub. This is the reason why I want
>> GRUB on my hard drive.
>>
> Upgrading modules without rerunning grub-install on all devices is not
> supported. It may work for few revisions but when core functions change
> it will break.
Grub and grub's modules are located in none external device. They are
located on a single partition on my hard disk. On the external devices
are only recorded the grub bootloader in the MBR and core.img in the gap
between the MBR and the first partition.
Do you mean that in this situation, I will have to rerun grub-install on
all USB devices any time a grub module has been modified ? And how do I
know that a grub module has been modified ?
>> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
>>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
>>>> Hi
>>>>
>>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
>>>> in a multiboot environment is to install the later on the MBR of a USB
>>>> key. That way, when booting with no key pluged, the PC boots into
>>>> Windows and when booting with the key pluged, the PC boots according to
>>>> the choice of the user in the grub menu's.
>>>>
>>>> I do locate the grub.cfg file in a partition of the internal hard drive.
>>>> In such a situation, grub-install embeddes a config file which reads
>>>> something like
>>>>
>>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>>>>     set prefix=($root)'/'
>>>>
>>>> This is great.
>>>>
>>>> However, any undesired modification by any piece of software of the
>>>> partition's uuid will prevent GRUB to find it and lead to a boot
>>>> failure. As the Windows partition is less prone to such modifications as
>>>> Linux partitions, I do locate the grub.cfg file in that Windows
>>>> partition. However it would be more straightforward to locate the file
>>>> into a Linux partition, and to have grub search this partition by its label.
>>>>
>>>> How could this be done ? If this can't presently be done, can it be
>>>> included in a future grub release ?
>>> use --boot-directory to place all files on usb stick and make it load
>>> any other grub.cfg you might want.
>>>> Regards
>>>>
>>>> Arbiel
>>>>
>>>> _______________________________________________
>>>> Grub-devel mailing list
>>>> Grub-devel@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>
>>>
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-26 21:02       ` Arbiel Perlacremaz
@ 2014-09-27  4:37         ` Andrei Borzenkov
  0 siblings, 0 replies; 11+ messages in thread
From: Andrei Borzenkov @ 2014-09-27  4:37 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: arbiel.perlacremaz

В Fri, 26 Sep 2014 23:02:44 +0200
Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:

> Hi
> 
> Le 26/09/2014 21:00, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
> > On 23.09.2014 10:11, Arbiel Perlacremaz wrote:
> >> Having the grub directory on the external device is not what I'm looking
> >> for.
> >>
> >> I indeed use several external devices and I've installed GRUB on each of
> >> them so that it is always available, whatsoever my configuration is. To
> >> avoid confusion when updating GRUB, all my fstab files mount a unique
> >> directory, always the same, on /boot/grub. This is the reason why I want
> >> GRUB on my hard drive.
> >>
> > Upgrading modules without rerunning grub-install on all devices is not
> > supported. It may work for few revisions but when core functions change
> > it will break.
> Grub and grub's modules are located in none external device. They are
> located on a single partition on my hard disk. On the external devices
> are only recorded the grub bootloader in the MBR and core.img in the gap
> between the MBR and the first partition.
> Do you mean that in this situation, I will have to rerun grub-install on
> all USB devices any time a grub module has been modified ? 

Any time you update grub.

>                                                            And how do I
> know that a grub module has been modified ?

In general you do not know that's the reason you should always do full
installation so core.img matches on-disk modules.

Actually I was thinking about portable way to chainload grub (mostly in
relation to using Windows bootloader to boot Linux). I think that it
could be done by creating core.img that includes multiboot and simply
multiboots core.img from disk. That avoids changed ABI problem.

Vladimir, are you interested in adding tool to generate such core.img?
Either as option for grub-install or separate binary?

> >> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
> >>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
> >>>> Hi
> >>>>
> >>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
> >>>> in a multiboot environment is to install the later on the MBR of a USB
> >>>> key. That way, when booting with no key pluged, the PC boots into
> >>>> Windows and when booting with the key pluged, the PC boots according to
> >>>> the choice of the user in the grub menu's.
> >>>>
> >>>> I do locate the grub.cfg file in a partition of the internal hard drive.
> >>>> In such a situation, grub-install embeddes a config file which reads
> >>>> something like
> >>>>
> >>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
> >>>>     set prefix=($root)'/'
> >>>>
> >>>> This is great.
> >>>>
> >>>> However, any undesired modification by any piece of software of the
> >>>> partition's uuid will prevent GRUB to find it and lead to a boot
> >>>> failure. As the Windows partition is less prone to such modifications as
> >>>> Linux partitions, I do locate the grub.cfg file in that Windows
> >>>> partition. However it would be more straightforward to locate the file
> >>>> into a Linux partition, and to have grub search this partition by its label.
> >>>>
> >>>> How could this be done ? If this can't presently be done, can it be
> >>>> included in a future grub release ?
> >>> use --boot-directory to place all files on usb stick and make it load
> >>> any other grub.cfg you might want.
> >>>> Regards
> >>>>
> >>>> Arbiel
> >>>>
> >>>> _______________________________________________
> >>>> Grub-devel mailing list
> >>>> Grub-devel@gnu.org
> >>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Grub-devel mailing list
> >>> Grub-devel@gnu.org
> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-23 16:37     ` Andrei Borzenkov
@ 2014-09-27 15:39       ` Arbiel Perlacremaz
  2014-09-27 15:47         ` Andrei Borzenkov
  2014-09-27 16:24         ` Arbiel Perlacremaz
  2014-09-27 20:00       ` Arbiel Perlacremaz
  1 sibling, 2 replies; 11+ messages in thread
From: Arbiel Perlacremaz @ 2014-09-27 15:39 UTC (permalink / raw)
  To: Andrei Borzenkov, The development of GNU GRUB

Hi
Le 23/09/2014 18:37, Andrei Borzenkov a écrit :
> В Tue, 23 Sep 2014 10:11:21 +0200
> Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:
>
>> Having the grub directory on the external device is not what I'm looking
>> for.
>>
>> I indeed use several external devices and I've installed GRUB on each of
>> them so that it is always available, whatsoever my configuration is. To
>> avoid confusion when updating GRUB, all my fstab files mount a unique
>> directory, always the same, on /boot/grub. This is the reason why I want
>> GRUB on my hard drive.
>>
> Well, use grub-mkimage then; you are completely free in adding your own
> embedded config file.
OK

However this raises two issues

1) there is no grub-install parameter (
>> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
>>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
>>>> Hi
>>>>
>>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
>>>> in a multiboot environment is to install the later on the MBR of a USB
>>>> key. That way, when booting with no key pluged, the PC boots into
>>>> Windows and when booting with the key pluged, the PC boots according to
>>>> the choice of the user in the grub menu's.
>>>>
>>>> I do locate the grub.cfg file in a partition of the internal hard drive.
>>>> In such a situation, grub-install embeddes a config file which reads
>>>> something like
>>>>
>>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>>>>     set prefix=($root)'/'
>>>>
>>>> This is great.
>>>>
>>>> However, any undesired modification by any piece of software of the
>>>> partition's uuid will prevent GRUB to find it and lead to a boot
>>>> failure. As the Windows partition is less prone to such modifications as
>>>> Linux partitions, I do locate the grub.cfg file in that Windows
>>>> partition. However it would be more straightforward to locate the file
>>>> into a Linux partition, and to have grub search this partition by its label.
>>>>
>>>> How could this be done ? If this can't presently be done, can it be
>>>> included in a future grub release ?
>>> use --boot-directory to place all files on usb stick and make it load
>>> any other grub.cfg you might want.
>>>> Regards
>>>>
>>>> Arbiel
>>>>
>>>> _______________________________________________
>>>> Grub-devel mailing list
>>>> Grub-devel@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-27 15:39       ` Arbiel Perlacremaz
@ 2014-09-27 15:47         ` Andrei Borzenkov
  2014-09-27 16:24         ` Arbiel Perlacremaz
  1 sibling, 0 replies; 11+ messages in thread
From: Andrei Borzenkov @ 2014-09-27 15:47 UTC (permalink / raw)
  To: Arbiel Perlacremaz; +Cc: The development of GNU GRUB

В Sat, 27 Sep 2014 17:39:50 +0200
Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:

> Hi
> Le 23/09/2014 18:37, Andrei Borzenkov a écrit :
> > В Tue, 23 Sep 2014 10:11:21 +0200
> > Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:
> >
> >> Having the grub directory on the external device is not what I'm looking
> >> for.
> >>
> >> I indeed use several external devices and I've installed GRUB on each of
> >> them so that it is always available, whatsoever my configuration is. To
> >> avoid confusion when updating GRUB, all my fstab files mount a unique
> >> directory, always the same, on /boot/grub. This is the reason why I want
> >> GRUB on my hard drive.
> >>
> > Well, use grub-mkimage then; you are completely free in adding your own
> > embedded config file.
> OK
> 
> However this raises two issues
> 
> 1) there is no grub-install parameter (

Did you accidentally omitted something?

> >> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
> >>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
> >>>> Hi
> >>>>
> >>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
> >>>> in a multiboot environment is to install the later on the MBR of a USB
> >>>> key. That way, when booting with no key pluged, the PC boots into
> >>>> Windows and when booting with the key pluged, the PC boots according to
> >>>> the choice of the user in the grub menu's.
> >>>>
> >>>> I do locate the grub.cfg file in a partition of the internal hard drive.
> >>>> In such a situation, grub-install embeddes a config file which reads
> >>>> something like
> >>>>
> >>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
> >>>>     set prefix=($root)'/'
> >>>>
> >>>> This is great.
> >>>>
> >>>> However, any undesired modification by any piece of software of the
> >>>> partition's uuid will prevent GRUB to find it and lead to a boot
> >>>> failure. As the Windows partition is less prone to such modifications as
> >>>> Linux partitions, I do locate the grub.cfg file in that Windows
> >>>> partition. However it would be more straightforward to locate the file
> >>>> into a Linux partition, and to have grub search this partition by its label.
> >>>>
> >>>> How could this be done ? If this can't presently be done, can it be
> >>>> included in a future grub release ?
> >>> use --boot-directory to place all files on usb stick and make it load
> >>> any other grub.cfg you might want.
> >>>> Regards
> >>>>
> >>>> Arbiel
> >>>>
> >>>> _______________________________________________
> >>>> Grub-devel mailing list
> >>>> Grub-devel@gnu.org
> >>>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >>>>
> >>>
> >>> _______________________________________________
> >>> Grub-devel mailing list
> >>> Grub-devel@gnu.org
> >>> https://lists.gnu.org/mailman/listinfo/grub-devel
> >> _______________________________________________
> >> Grub-devel mailing list
> >> Grub-devel@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-27 15:39       ` Arbiel Perlacremaz
  2014-09-27 15:47         ` Andrei Borzenkov
@ 2014-09-27 16:24         ` Arbiel Perlacremaz
  1 sibling, 0 replies; 11+ messages in thread
From: Arbiel Perlacremaz @ 2014-09-27 16:24 UTC (permalink / raw)
  To: Andrei Borzenkov, The development of GNU GRUB

Hi

Please discard my previous message, which I sent mistaklingly.
Le 27/09/2014 17:39, Arbiel Perlacremaz a écrit :
> Hi
> Le 23/09/2014 18:37, Andrei Borzenkov a écrit :
>> В Tue, 23 Sep 2014 10:11:21 +0200
>> Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:
>>
>>> Having the grub directory on the external device is not what I'm looking
>>> for.
>>>
>>> I indeed use several external devices and I've installed GRUB on each of
>>> them so that it is always available, whatsoever my configuration is. To
>>> avoid confusion when updating GRUB, all my fstab files mount a unique
>>> directory, always the same, on /boot/grub. This is the reason why I want
>>> GRUB on my hard drive.
>>>
>> Well, use grub-mkimage then; you are completely free in adding your own
>> embedded config file.
> OK
>
> However this raises two issues
>
> 1) there is no grub-install parameter (
>>> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
>>>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
>>>>> Hi
>>>>>
>>>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
>>>>> in a multiboot environment is to install the later on the MBR of a USB
>>>>> key. That way, when booting with no key pluged, the PC boots into
>>>>> Windows and when booting with the key pluged, the PC boots according to
>>>>> the choice of the user in the grub menu's.
>>>>>
>>>>> I do locate the grub.cfg file in a partition of the internal hard drive.
>>>>> In such a situation, grub-install embeddes a config file which reads
>>>>> something like
>>>>>
>>>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>>>>>     set prefix=($root)'/'
>>>>>
>>>>> This is great.
>>>>>
>>>>> However, any undesired modification by any piece of software of the
>>>>> partition's uuid will prevent GRUB to find it and lead to a boot
>>>>> failure. As the Windows partition is less prone to such modifications as
>>>>> Linux partitions, I do locate the grub.cfg file in that Windows
>>>>> partition. However it would be more straightforward to locate the file
>>>>> into a Linux partition, and to have grub search this partition by its label.
>>>>>
>>>>> How could this be done ? If this can't presently be done, can it be
>>>>> included in a future grub release ?
>>>> use --boot-directory to place all files on usb stick and make it load
>>>> any other grub.cfg you might want.
>>>>> Regards
>>>>>
>>>>> Arbiel
>>>>>
>>>>> _______________________________________________
>>>>> Grub-devel mailing list
>>>>> Grub-devel@gnu.org
>>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>>
>>>> _______________________________________________
>>>> Grub-devel mailing list
>>>> Grub-devel@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Having the configuration file embedded into core.img look for the grub partition by its label
  2014-09-23 16:37     ` Andrei Borzenkov
  2014-09-27 15:39       ` Arbiel Perlacremaz
@ 2014-09-27 20:00       ` Arbiel Perlacremaz
  1 sibling, 0 replies; 11+ messages in thread
From: Arbiel Perlacremaz @ 2014-09-27 20:00 UTC (permalink / raw)
  To: Andrei Borzenkov, The development of GNU GRUB


Le 23/09/2014 18:37, Andrei Borzenkov a écrit :
> В Tue, 23 Sep 2014 10:11:21 +0200
> Arbiel Perlacremaz <arbiel.perlacremaz@gmx.fr> пишет:
>
>> Having the grub directory on the external device is not what I'm looking
>> for.
>>
>> I indeed use several external devices and I've installed GRUB on each of
>> them so that it is always available, whatsoever my configuration is. To
>> avoid confusion when updating GRUB, all my fstab files mount a unique
>> directory, always the same, on /boot/grub. This is the reason why I want
>> GRUB on my hard drive.
>>
> Well, use grub-mkimage then; you are completely free in adding your own
> embedded config file.
>
In using Ubuntu 14.04 LTS, I don't know which grub version I'm presently
using, as the -v parameter don't mean "print the version information"
any longer, but "print verbose messages".
In reviewing grub-install parameters, I did not find any one allowing
for the incorporating a user-generated grub image. Nor don't I know how
to use grub-mkimage to generate such an image. However, I tried the
--force-file-id parameter and as a result of this, I got what I am
looking for.

bootinfoscript outputs the following

============================= Boot Info Summary:
===============================

 => Windows 7/8/2012 is installed in the MBR of /dev/sda.
 => Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at
sector 1 of
    the same hard drive for core.img. core.img is at this location and
looks
    for / and uses an embedded config file:
   
   
---------------------------------------------------------------------------
    search.file /uuid/2nk2euatog5bddbaf30io4hb root hd0,msdos2
    set prefix=($root)'/'
    
It's even better than what I expected as a user probably never will
change the names of this grub-install generated directory and file .
>> Le 23/09/2014 01:09, Vladimir 'φ-coder/phcoder' Serbinenko a écrit :
>>> On 22.09.2014 22:49, Arbiel Perlacremaz wrote:
>>>> Hi
>>>>
>>>> A way I'm using to avoid any Window's reinstallation to overwrite GRUB
>>>> in a multiboot environment is to install the later on the MBR of a USB
>>>> key. That way, when booting with no key pluged, the PC boots into
>>>> Windows and when booting with the key pluged, the PC boots according to
>>>> the choice of the user in the grub menu's.
>>>>
>>>> I do locate the grub.cfg file in a partition of the internal hard drive.
>>>> In such a situation, grub-install embeddes a config file which reads
>>>> something like
>>>>
>>>>     search.fs_uuid 367C9BBD7C9B75F9 root hd0,msdos1
>>>>     set prefix=($root)'/'
>>>>
>>>> This is great.
>>>>
>>>> However, any undesired modification by any piece of software of the
>>>> partition's uuid will prevent GRUB to find it and lead to a boot
>>>> failure. As the Windows partition is less prone to such modifications as
>>>> Linux partitions, I do locate the grub.cfg file in that Windows
>>>> partition. However it would be more straightforward to locate the file
>>>> into a Linux partition, and to have grub search this partition by its label.
>>>>
>>>> How could this be done ? If this can't presently be done, can it be
>>>> included in a future grub release ?
>>> use --boot-directory to place all files on usb stick and make it load
>>> any other grub.cfg you might want.
>>>> Regards
>>>>
>>>> Arbiel
>>>>
>>>> _______________________________________________
>>>> Grub-devel mailing list
>>>> Grub-devel@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>>
>>>
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-09-27 20:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 20:49 Having the configuration file embedded into core.img look for the grub partition by its label Arbiel Perlacremaz
2014-09-22 23:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-23  8:11   ` Arbiel Perlacremaz
2014-09-23 16:37     ` Andrei Borzenkov
2014-09-27 15:39       ` Arbiel Perlacremaz
2014-09-27 15:47         ` Andrei Borzenkov
2014-09-27 16:24         ` Arbiel Perlacremaz
2014-09-27 20:00       ` Arbiel Perlacremaz
2014-09-26 19:00     ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-09-26 21:02       ` Arbiel Perlacremaz
2014-09-27  4:37         ` Andrei Borzenkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.