All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix FreeBSD.vfs.root.mountfrom
@ 2009-08-04 18:42 Robert Millan
  2009-08-04 19:13 ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2009-08-04 18:42 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]


FreeBSD.vfs.root.mountfrom expects an absolute path, not just device name.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

[-- Attachment #2: freebsd_mountfrom.diff --]
[-- Type: text/x-diff, Size: 650 bytes --]

Index: util/grub.d/10_freebsd.in
===================================================================
--- util/grub.d/10_freebsd.in	(revision 2466)
+++ util/grub.d/10_freebsd.in	(working copy)
@@ -50,8 +50,6 @@ if [ "x$kfreebsd" != "x" ] ; then
     devices_rel_dirname=`make_system_path_relative_to_its_root $devices_dirname`
   fi
 
-  root_device=`basename ${GRUB_DEVICE}`
-
   # For "ufs" it's the same.  Do we care about the others?
   kfreebsd_fs=${GRUB_FS}
 
@@ -69,7 +67,7 @@ EOF
 EOF
   fi
   cat << EOF
-	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${root_device}
+	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE}
 }
 EOF
 fi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix FreeBSD.vfs.root.mountfrom
  2009-08-04 18:42 [PATCH] fix FreeBSD.vfs.root.mountfrom Robert Millan
@ 2009-08-04 19:13 ` Robert Millan
  2009-08-07 11:55   ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2009-08-04 19:13 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

On Tue, Aug 04, 2009 at 08:42:25PM +0200, Robert Millan wrote:
> 
> FreeBSD.vfs.root.mountfrom expects an absolute path, not just device name.

Actually, both work, but the former is what their loader uses, and it's
simpler for us to handle, so let's juse use that.

Also, the default setting on FreeBSD is to mount / as writable, for which
we need vfs.root.mountfrom.options=rw.

See new patch.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

[-- Attachment #2: freebsd_mountfrom.diff --]
[-- Type: text/x-diff, Size: 869 bytes --]

2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub.d/10_freebsd.in: Use an absolute device path for
	`vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.

Index: util/grub.d/10_freebsd.in
===================================================================
--- util/grub.d/10_freebsd.in	(revision 2466)
+++ util/grub.d/10_freebsd.in	(working copy)
@@ -50,8 +50,6 @@ if [ "x$kfreebsd" != "x" ] ; then
     devices_rel_dirname=`make_system_path_relative_to_its_root $devices_dirname`
   fi
 
-  root_device=`basename ${GRUB_DEVICE}`
-
   # For "ufs" it's the same.  Do we care about the others?
   kfreebsd_fs=${GRUB_FS}
 
@@ -69,7 +67,8 @@ EOF
 EOF
   fi
   cat << EOF
-	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${root_device}
+	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE}
+	set FreeBSD.vfs.root.mountfrom.options=rw
 }
 EOF
 fi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix FreeBSD.vfs.root.mountfrom
  2009-08-04 19:13 ` Robert Millan
@ 2009-08-07 11:55   ` Robert Millan
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Millan @ 2009-08-07 11:55 UTC (permalink / raw)
  To: grub-devel


Committed.

On Tue, Aug 04, 2009 at 09:13:51PM +0200, Robert Millan wrote:
> On Tue, Aug 04, 2009 at 08:42:25PM +0200, Robert Millan wrote:
> > 
> > FreeBSD.vfs.root.mountfrom expects an absolute path, not just device name.
> 
> Actually, both work, but the former is what their loader uses, and it's
> simpler for us to handle, so let's juse use that.
> 
> Also, the default setting on FreeBSD is to mount / as writable, for which
> we need vfs.root.mountfrom.options=rw.
> 
> See new patch.
> 
> -- 
> Robert Millan
> 
>   The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>   how) you may access your data; but nobody's threatening your freedom: we
>   still allow you to remove your data and not access it at all."

> 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
> 
> 	* util/grub.d/10_freebsd.in: Use an absolute device path for
> 	`vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
> 
> Index: util/grub.d/10_freebsd.in
> ===================================================================
> --- util/grub.d/10_freebsd.in	(revision 2466)
> +++ util/grub.d/10_freebsd.in	(working copy)
> @@ -50,8 +50,6 @@ if [ "x$kfreebsd" != "x" ] ; then
>      devices_rel_dirname=`make_system_path_relative_to_its_root $devices_dirname`
>    fi
>  
> -  root_device=`basename ${GRUB_DEVICE}`
> -
>    # For "ufs" it's the same.  Do we care about the others?
>    kfreebsd_fs=${GRUB_FS}
>  
> @@ -69,7 +67,8 @@ EOF
>  EOF
>    fi
>    cat << EOF
> -	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${root_device}
> +	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE}
> +	set FreeBSD.vfs.root.mountfrom.options=rw
>  }
>  EOF
>  fi

> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-07 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 18:42 [PATCH] fix FreeBSD.vfs.root.mountfrom Robert Millan
2009-08-04 19:13 ` Robert Millan
2009-08-07 11:55   ` Robert Millan

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.