All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub-probe, but in reverse?
Date: Wed, 29 Jul 2009 17:03:44 -0400	[thread overview]
Message-ID: <1248901424.4253.2.camel@mj> (raw)
In-Reply-To: <20090729183547.GP11691@riva.ucam.org>

On Wed, 2009-07-29 at 19:35 +0100, Colin Watson wrote:
> $ sudo grub-probe -d /dev/sda1 -t drive
>   (hd0,1)
> 
> I have a reason to want to do the reverse of this: I have a
> libparted-based program that ensures that at least one partition on a
> disk is marked active (needed for some BIOSes), and would like to call
> it on the disk selected for installation of GRUB in d-i. Of course
> libparted is only going to understand OS device names. If possible I'd
> rather avoid reading device.map by hand to figure out how to map (hd0,1)
> back to /dev/sda1. Is there any way to do this with the code as it
> stands, and if not would it make sense to make it possible to pass GRUB
> device names to grub-probe?

I think device.map is fundamentally unreliable and should be obsoleted.
I don't know where you are getting the GRUB device names, but I suggest
that you use UUID instead.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2009-07-29 21:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 18:35 grub-probe, but in reverse? Colin Watson
2009-07-29 21:03 ` Pavel Roskin [this message]
2009-07-31 10:36   ` Colin Watson
2009-07-31 11:15     ` Vladimir 'phcoder' Serbinenko
2009-07-31 16:15     ` Robert Millan
2009-07-31 16:19     ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248901424.4253.2.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.