From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: retiring device.map
Date: Wed, 07 May 2008 13:22:50 -0400 [thread overview]
Message-ID: <1210180970.2321.17.camel@dv> (raw)
In-Reply-To: <20080507130307.GD16492@thorin>
On Wed, 2008-05-07 at 15:03 +0200, Robert Millan wrote:
> On Tue, May 06, 2008 at 11:43:48AM -0400, Pavel Roskin wrote:
> > On Tue, 2008-05-06 at 17:18 +0200, Robert Millan wrote:
> >
> > > I completely agree. How do we go about this? First of all we need support
> > > for labels, right?
> >
> > We have it already in the "search" command. Of course, there is always
> > room for improvement. GRUB doesn't recognize Linux swap labels. It
> > cannot set root to, say, partition 3 on a disk where partition 1 has the
> > given label.
>
> Sorry, I was confusing labels with UUIDs. The problem with labels is they're
> not garanteed to be unique, right? So maybe we need support for UUIDs..
Right.
> > Anyway, the fix belongs to the installer. The first step would be not
> > to use device.map is it's not needed. In other words, if it's not a
> > cross-device install, don't read device.map and don't try to create it.
>
> I think this isn't an easy as it looks. grub-setup works much like grub-emu
> in that it uses code from outside util/, which only understands devices when
> represented in GRUB syntax.
>
> Maybe we could force-feed it something like "(/dev/something)" as if it
> were a GRUB drive, but then how would it know how are partitions represented
> by the OS? (%d, p%d, etc)
Yes, that would be consistent with our use of names having everything
needed for the access, without any mapping (like hd96 or ata2).
We could probably try all possible partition styles for the given OS
(numbers, letters, p + number). If we only needed mounted partitions,
we could go through the list and check mounted devices for being
partitions of the drive. Anyway, I'm afraid that part will remain
OS-specific for now.
> > Finally, update-grub should be modified to look for partitions by
> > labels.
>
> We can do this already, without changing how device.map works. Though, we
> need to reuse the same code in GRUB to obtain the labels (for robustness),
> which would need some new option in grub-probe or so.
Agreed. And we could probably use UUIDs too (optionally), although
labels seem more readable to me.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-05-07 17:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4807AA02.1020909@mail.berlios.de>
[not found] ` <20080418132858.GH29226@thorin>
2008-04-19 14:34 ` grub-probe fails during grub2 update (Debian) Stefan Weil
2008-04-20 10:07 ` Robert Millan
2008-04-21 10:31 ` Pavel Roskin
2008-05-06 15:18 ` retiring device.map Robert Millan
2008-05-06 15:43 ` Pavel Roskin
2008-05-07 13:03 ` Robert Millan
2008-05-07 17:22 ` Pavel Roskin [this message]
2008-05-07 17:39 ` Bean
2008-05-08 17:08 ` Colin D Bennett
2008-05-09 12:51 ` Robert Millan
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=1210180970.2321.17.camel@dv \
--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.