[PATCH] olpc.fth - grow the root filesystem partition on boot

Paul Fox pgf at laptop.org
Fri Mar 16 23:55:54 EDT 2012


james wrote:
 > On Fri, Mar 16, 2012 at 11:58:51AM -0600, Daniel Drake wrote:
 > > I'll try to take on this project this release cycle.
 > > Posted some thoughts at http://dev.laptop.org/ticket/10040
 > 
 > Thanks.
 > 
 > Consensus is to implement a partition resize in OpenFirmware as the last
 > step of ''fs-update''.  This doesn't preclude the initramfs doing it,
 > and the initramfs will do the filesystem resize.

i'm a little confused.  i know i reported that filesystem resize was
quite fast now, but then james reported that a resize took a really
long time still, and i haven't retested.  if a resize takes a really
long time, then i don't think we can do it in initramfs, can we?

paul

 > 
 > In OpenFirmware, we might either:
 > 
 >  * do the resize only if the .zd file requests it, (a new ''resize:''
 >    line after ''zblocks-end:''), or
 > 
 >  * do the resize regardless, thus affecting previous builds once a
 >    firmware update occurs.
 > 
 > The first option avoids immediate impact to factory scripts which do an
 > ''fs-verify'' after ''fs-update''.
 > 
 > Once factory is given a build that includes ''resize:'', the factory
 > scripts will require changing from
 > 
 > {{{
 > fs-update ...
 > fs-verify ...
 > }}}
 > 
 > to
 > 
 > {{{
 > fs-update-no-resize ...
 > fs-verify ...
 > fs-resize
 > }}}
 > 
 > Not changing the scripts will cause an fs-verify failure for the first
 > block of the storage.
 > 
 > I expect builds to begin doing this in the 12.1.0 series, leaving the
 > 11.3.1 series unchanged, but we don't easily separate OpenFirmware in
 > that way.
 > 
 > Adding resize: to the end of an .zd file does not cause any error on the
 > current version of OpenFirmware on XO-1.75, so it can be added now:
 > 
 > >From 7ed7ac8452da32bce60208558d0e729a4bfe35b8 Mon Sep 17 00:00:00 2001
 > From: James Cameron <quozl at laptop.org>
 > Date: Sat, 17 Mar 2012 10:56:30 +1100
 > Subject: [PATCH] add resize
 > 
 > ---
 >  bin/zhashfs.c |    4 ++--
 >  1 files changed, 2 insertions(+), 2 deletions(-)
 > 
 > diff --git a/bin/zhashfs.c b/bin/zhashfs.c
 > index 12a0ffb..0d765ea 100644
 > --- a/bin/zhashfs.c
 > +++ b/bin/zhashfs.c
 > @@ -221,8 +221,8 @@ int main(int argc, char **argv)
 >      LTC_ARGCHK(readlen == zblocksize);
 >      write_block(0, buf);
 >  
 > -    fprintf(outfile, "zblocks-end:\n");
 > -    fprintf(zfile,   "zblocks-end:\n");
 > +    fprintf(outfile, "zblocks-end:\nresize:\n");
 > +    fprintf(zfile,   "zblocks-end:\nresize:\n");
 >  
 >      fclose(infile);
 >      fclose(outfile);
 > -- 
 > 1.7.9.1
 > 
 > 
 > -- 
 > James Cameron
 > http://quozl.linux.org.au/
 > _______________________________________________
 > Devel mailing list
 > Devel at lists.laptop.org
 > http://lists.laptop.org/listinfo/devel

=---------------------
 paul fox, pgf at laptop.org



More information about the Devel mailing list