grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH,HURD] Fix grub-probe with userland partition support


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support
Date: Mon, 23 Apr 2012 13:17:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 23.04.2012 13:06, Samuel Thibault wrote:
> Vladimir 'φ-coder/phcoder' Serbinenko, le Mon 23 Apr 2012 12:45:09 +0200, a 
> écrit :
>> On 23.04.2012 11:40, Samuel Thibault wrote:
>>> Vladimir 'φ-coder/phcoder' Serbinenko, le Mon 23 Apr 2012 10:52:09 +0200, a 
>>> écrit :
>>>> map was never intended to be globally visible. At most perhaps
>>>> "semi-local" due to difficulties of split between getroot.c and hostdisk.c
>>>> Moreover the behaviour of find_root_device must be independent of what
>>>> is already in map since we don't rely anymore at map being populated at
>>>> all and at entries only on as-needed basis.
>>> How can I get the same information, then? (the unix path corresponding
>>> to a disk opened with grub_disk_open())
>> The problem is bigger than just getting the device from a disk. The
>> problem is that you assume that grub_disk_dev_iterate will go through
>> the disk in question which isn't necessarily true.
> And so?
>
> Our need is to iterate over all disks that GRUB sees, to match that with
> where the file resides.
It looks like you have missed some of 2.00 developement. We auto-add the
device to map if necessary right after find_root_devices so at
find_root_devices the disk won't be seen yet but find_root_devices has
to work nevertheless.
This function has nothing to do with the rest of GRUB. It could be a
standalone program with syntax like
find_root_devices DIR
Output:
/dev/sda1 /dev/sdb2
Any of GRUB context is irrelevant. (and actually so is the GRUB
partition view, but you can use partition functions as they are
stateless but beware that their view is likely to be different from
GRUB's one).
> Samuel
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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