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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel