[Top][All Lists]

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

Re: Using "grub-mkimage -c" for a USB holding multiple /boot partitions.

From: Andrei Borzenkov
Subject: Re: Using "grub-mkimage -c" for a USB holding multiple /boot partitions.
Date: Fri, 19 Dec 2014 09:29:20 +0300

В Thu, 18 Dec 2014 17:45:24 -0800
Diagon <address@hidden> пишет:

> ---- On Thu, 18 Dec 2014 16:31:23 -0800 Jordan Uggla <address@hidden> wrote 
> ---- 
>  > On Thu, Dec 18, 2014 at 12:35 PM, Diagon <address@hidden> wrote: 
>  > > I see that I can install a config file into grub, using "grub-mkimage 
> -c". 

No, you do not. grub-mkimage is internal tool (and is to large extent
superseded in current upstream version); embedded configuration is
intended to get access to /boot/grub directory only and is

If you want to create standalone bootloader image, use

>  > > I'd like the config file to do something like this: 
>  > > 
>  > >    If (this is my laptop) then (run the config file in Partition 1) 
>  > >    else if (this is my desktop) then (run the config file in Partition 
> 2) 
>  > >    else (run the config file in Partition 3) 
>  >  
>  > The above doesn't seem to depend on having an embedded config at all. 
>  > I highly recommend simply having a grub.cfg file on the USB drive that 
>  > implements this logic, and using a standard grub-install invocation to 
>  > install grub. 

Yes. Having normal grub.cfg on USB will make it far more easier to

> Jordan- please correct me if I'm wrong, but my reasoning was that by this 
> approach, all updates performed by the various OS's could remain automatic 
> (save for my having to figure out how to tweak this one addition, a small 
> config in core.img).  Otherwise, on any OS update that updates grub, the next 
> boot will take me to the grub.cfg in the partition associated with that OS.  
> That grub.cfg would then need to have the above logic.  This would have to be 
> true for each OS.

That's why a lot of people have dedicated partition where grub is
installed and which chainloads (in broad sense) bootloaders from other
partitions where operating systems are present. Unless you plan to
reinstall every second day, the most simple solution in your case is to
match by filesystem UUID which is guaranteed to be unique and stable.

And how OS update is going to override anything on your USB stick?

reply via email to

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