grub-devel
[Top][All Lists]
Advanced

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

Re: grub-probe && statfs(2)


From: Francis Gendreau
Subject: Re: grub-probe && statfs(2)
Date: Tue, 01 Jan 2008 05:12:59 -0500


On Sun, 2007-12-30 at 13:38 +0100, Yoshinori K. Okuji wrote:
> Hello,
> 
> On Saturday 29 December 2007 13:36, Francis Gendreau wrote:
> > My recommendation would be relatively simple. grub_guess_root_device()
> > could simply call statfs() and extract the device name from struct
> > statfs f_mntfromname, maybe as simply as the following, but I may lack
> > of knowledge about some technologies on which this might not work (like
> > RAID ...).
> 
> Unfortunately, statfs in Linux does not return a filename. From statfs(2):
> 
>        The Linux statfs was inspired by the 4.4BSD one (but they  do  not  use
>        the same structure).
> 
> In fact, struct statfs does not contain f_mntfromname or anything equivallent 
> on Linux.
> 
> So I think it would be necessary to use statfs, only on *BSD (or if struct 
> statfs contains f_mntfromname).
> 
> Thanks,
> Okuji
> 

Well, after some googling, which I should have done before submitting, I
saw that Linux does not contain any informations required for the
operation. OpenBSD and FreeBSD does, but NetBSD do not offer this system
call.

I already wrote a patch for FreeBSD but lots of other errors makes it
almost useless. I'm currently tring to elaborate the necessary
alterations to the source so grub2 can be installed from a FreeBSD
system.

Francis Gendreau





reply via email to

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