[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: Diagon
Subject: Re: Using "grub-mkimage -c" for a USB holding multiple /boot partitions.
Date: Thu, 18 Dec 2014 17:45:24 -0800
User-agent: Zoho Mail

---- 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". 
 > > 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. 
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.

 > > [...] how do I get a Debian-like system (Ubuntu) to insert that config 
 > > into  
 > > grub (or use the new core.img) when grub updates? 
 > It seems like this USB drive should be manually configured and 
 > independent of the OSs, and thus shouldn't be automatically updated in 
 > any way.

As you see, I am trying to keep as much automated as possible.  

 >> For this to work, I need some way of probing some characteristics of the 
 >> machine, to figure out which one I'm on [...] 
 > The "hwmatch" command might be useful for you, but unfortunately it's 
 > an Ubuntu specific addition that hasn't made its way upstream. 

Well, I'm using Ubuntu, so this could be just what's called for! :)

I see that "usage" says:

   Match PCI devices.

I'm finding that a bit cryptic!  (And thre's nothing in the newer docs.)  So, 
this brings us to the documentation issue of my other post (that you kindly 
responded to).  Let me read the docs for the newer grub, and then I'll be 
prepared to respond to that one, too.

reply via email to

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