Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N7fH8-0003qs-Vc for mharc-grub-devel@gnu.org; Mon, 09 Nov 2009 20:12:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7fH5-0003pK-QM for grub-devel@gnu.org; Mon, 09 Nov 2009 20:11:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7fH1-0003nO-EI for grub-devel@gnu.org; Mon, 09 Nov 2009 20:11:59 -0500 Received: from [199.232.76.173] (port=40063 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7fH1-0003nI-2P for grub-devel@gnu.org; Mon, 09 Nov 2009 20:11:55 -0500 Received: from web110302.mail.gq1.yahoo.com ([67.195.8.202]:41529) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N7fH0-0007Tq-Hl for grub-devel@gnu.org; Mon, 09 Nov 2009 20:11:54 -0500 Received: (qmail 77147 invoked by uid 60001); 10 Nov 2009 01:11:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1257815513; bh=xIj1DkRDkoIOfPp0npI+GFnBWpemhhw8PA2xixqXaqQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=En1JtLnDqysBNfiPBs5UU00ZKSs6a6/QxCr1mGX0v+FE52tJT6rjoGPIdJ9UTrJOzDAKBIioyN0CtLql/8jdmjPdujc3M9s/Okkuqdp1eXJSqSUWmwtEngAt1rH0Ql78bk7GEvtACIuJpZn/HuCTk0KXUsDtOt1+E/BqzqCo71A= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=E6PYH5QeYB1xO0sUC7tPIHnpo00EkODR1ozdggKpYJcOr0R44Dz6OG7K0CcqbVfpiQAdnfEItVY1u+mGRkmop3evOt9XG1tpJ3pz/GYfejf4V4dhV5uAZtE38e3zPDelZxwmE2Z4Y1+u2FA1+HiQB0wHVxUhzbm0U/5o0T7D99c=; Message-ID: <220770.76627.qm@web110302.mail.gq1.yahoo.com> X-YMail-OSG: lQ_xfYYVM1m6GOOM3UN9vyB4JMQGaHAoeFlBthUE7ziC5x4rCFNwYC_R0bUqKasNTXzRq6JMHzJvU3Em2kqLLBobEAcK82uc8Qz1BcfW56Mw8cXudJy_AeVLGVKduLWfkteZT67WHAA0S6R.ZLYkhDWsPoNMoKIQZXxKgYNe4Ge.YNfVoRMhqYjfCsppH8XGmLr.5qKjwybNITVtKXOW2PMT47ISm.CYqU97kRY_P3KaGb4cMh41_i.Ckom5ZfpE9t4zLLaaHe1kNZp_ZDK3VfeeG1kRDCRu3z6iHwdaVqdwCWDqCLqYQmv4E6n8TB22BYw- Received: from [75.150.106.249] by web110302.mail.gq1.yahoo.com via HTTP; Mon, 09 Nov 2009 17:11:53 PST X-Mailer: YahooMailClassic/8.1.6 YahooMailWebService/0.8.100.260964 Date: Mon, 9 Nov 2009 17:11:53 -0800 (PST) From: Roger Cruz To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-189462247-1257815513=:76627" X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) Subject: LVM write support from grub2. Writing to environment block in core.img X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 01:12:00 -0000 --0-189462247-1257815513=:76627 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I have a system where the boot partition is on top of an LVM.=A0 I'm using = the loadenv module to save state and remember the previously booted entry.= =A0 I have something like this: if [ ${prev_saved_entry} ]; then=A0 saved_entry=3D${prev_saved_entry}=A0 sa= ve_env saved_entry=A0 prev_saved_entry=3D=A0 save_env prev_saved_entryfi In examining why save_env is not writing to grubenv, I came across this LVM= routine that says LVM writes are not supported. static grub_err_t grub_lvm_write (grub_disk_t disk __attribute ((unused)), =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 grub_disk_addr_t sector __attribute ((= unused)), =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 grub_size_t size __attribute ((unused)= ), =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 const char *buf __attribute ((unused))) { =A0 return GRUB_ERR_NOT_IMPLEMENTED_YET; } Is there a plan to add this support?=A0 Anyone currently working on it that= I may get an early implementation from?=A0 If not, is there a technical re= ason why this would be hard for someone (maybe me) to implement? As a work-around, I'm considering using the environment block in core.img.= =A0 Are there routines that can be run at boot time to allow grub to change= the variables there, perhaps using the same module (loadenv) and so it can= be used as "save_env -f core.img"?=A0 Anyone see any reasons why I shouldn= 't write to that space? Thanks Roger --0-189462247-1257815513=:76627 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
I have a system where the boot partition is o= n top of an LVM.  I'm using the loadenv module to save state and remem= ber the previously booted entry.  I have something like this:

<= div style=3D"border: 1pt solid black; padding: 4pt;">
if [ ${prev_saved_entry} ]; then
  saved_entry=3D${prev_save=
d_entry}
  sav=
e_env saved_entry
&=
nbsp; prev_saved_entry=3D
  save_env prev_saved_entry
fi

In examining why save_env is not wri= ting to grubenv, I came across this LVM routine that says LVM writes are no= t supported.
static grub_err_t
gru= b_lvm_write (grub_disk_t disk __attribute ((unused)),
   =           grub_disk_addr_t sec= tor __attribute ((unused)),
       &n= bsp;     grub_size_t size __attribute ((unused)),
&n= bsp;           const char *buf __a= ttribute ((unused)))
{
  return GRUB_ERR_NOT_IMPLEMENTED_YET;
}

Is there a plan to add this = support?  Anyone currently working on it that I may get an early imple= mentation from?  If not, is there a technical reason why this would be= hard for someone (maybe me) to implement?

As a work-around, I'm con= sidering using the environment block in core.img.  Are there routines that can be run at boot time to allow grub to change the variables there, = perhaps using the same module (loadenv) and so it can be used as "save_env = -f core.img"?  Anyone see any reasons why I shouldn't write to that sp= ace?

Thanks
Roger


--0-189462247-1257815513=:76627--