[Announce] Rebuild/Refresh a custom SoaS iso from a running stick
by Frederick Grose
We are a good ways closer to being able to
"Support cloning of a customized SoaS image directly from that running
image", which is the SoaS spin F15 feature proposal #4 on this page,
http://wiki.sugarlabs.org/go/Features/Soas_V5/
If your SoaS machine has 4+ GiBytes disc space (as is commonly available on
an attached hard drive that you could mount in your SoaS instance), then
this alpha version python script, edit-liveos.py,
http://people.sugarlabs.org/fgrose/edit-liveos
(based on the livecd-tools, edit-livecd), and a copy or rsync will let you
build a new, custom installation .iso file from your running SoaS instance.
I've tested the script on SoaS in F13 and F14, and with some filesystem
hacks (this is my first python project), it will run to completion.
I've booted the F14 version and confirmed that the system overlay file was
refreshed and the system and user customizations had transferred. See this
screenshot of 'About my Computer':
http://people.sugarlabs.org/fgrose/My%20computer.png
Customization of SoaS spins have been a long-sought goal of the project.
See, for example,
http://wiki.sugarlabs.org/go/Features/Feature_SoaS_customization, and all
the work Satellit has contributed toward the Sugar Creation Kit,
http://wiki.sugarlabs.org/go/Sugar_Creation_Kit
There remain many supporting tasks to be completed before we have an
integrated product.
1. The edit-liveos.py script depends on rsync, which has to be
installed on SoaS first.
2. The livecd-iso-to-disk script needs to be amended to transfer the
home.img file from the new source.iso
3. Other supporting installation scripts and a Sugar Activity are
needed to simplify the use of the onboard image builder.
Some of the above are addressed in Sugar Clone,
http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Sugar_Clone
which is a quick way to achieve customization without any disc resources
beyond those on the Sugar Stick itself.
I imagine that further refinements of these tools will allow us to
automatically monitor the system overlay consumption and advise the Learner
to "run a refresh" rebuilds their personal system or provides a fresh one
from the School Server.
Please see the Sugar Clone page to see the project goals and plans, and
please help test the new, edit-liveos script!
--Fred
12 years, 7 months
2 commits - imgcreate/live.py
by Jeroen van Meeuwen
imgcreate/live.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 2e04352bdf3d1770c242e12e2d3b8461660e48eb
Author: Jeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen(a)ergo-project.org>
Date: Mon Jan 31 10:10:27 2011 -0700
Bad karma commit reverted; The option to boot from a local
drive *MUST* exist as 99.9% of our consumers have default
desktop hardware configurations.
If you seek to fix and/or improve, perhaps look at chain.c32's
append hd 0 0 instead of the localboot hexadecimal addressing.
Revert "Remove boot from local drive option"
This reverts commit 150ce6e01e6d99764132220dd4b3983d8df0f812.
diff --git a/imgcreate/live.py b/imgcreate/live.py
index c26ec2c..60cd1de 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -555,7 +555,10 @@ menu hiddenrow 5
"""
def __get_local_stanza(self, isodir):
- return ""
+ return """label local
+ menu label Boot from local drive
+ localboot 0xffff
+"""
def _configure_syslinux_bootloader(self, isodir):
"""configure the boot loader"""
commit fe20e690f2f1a14201db8bc95056746f07e4e7e7
Author: Jeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen(a)ergo-project.org>
Date: Mon Jan 31 10:05:59 2011 -0700
Really switch the default compression type, not just the default cli option value
diff --git a/imgcreate/live.py b/imgcreate/live.py
index cc8c630..c26ec2c 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -46,7 +46,7 @@ class LiveImageCreatorBase(LoopImageCreator):
"""
LoopImageCreator.__init__(self, ks, name, fslabel=fslabel, releasever=releasever)
- self.compress_type = "gzip"
+ self.compress_type = "xz"
"""mksquashfs compressor to use."""
self.skip_compression = False
12 years, 7 months
imgcreate/live.py
by Brian C. Lane
imgcreate/live.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
New commits:
commit 150ce6e01e6d99764132220dd4b3983d8df0f812
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Wed Jan 26 16:00:20 2011 -0800
Remove boot from local drive option
This option almost never works, it is dependent on the system's BIOS
matching the command.
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 93a4b4e..cc8c630 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -555,10 +555,7 @@ menu hiddenrow 5
"""
def __get_local_stanza(self, isodir):
- return """label local
- menu label Boot from local drive
- localboot 0xffff
-"""
+ return ""
def _configure_syslinux_bootloader(self, isodir):
"""configure the boot loader"""
12 years, 8 months
tools/livecd-iso-to-disk.sh
by Brian C. Lane
tools/livecd-iso-to-disk.sh | 36 +++++++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 9 deletions(-)
New commits:
commit 0a7395c4ef9f38144275857213abc3c102faefc9
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Wed Jan 26 15:50:48 2011 -0800
Check for one big initrd.img (#671900)
rawhide now uses one big initrd.img instead of splitting it into
initrd.img and install.img
This checks for the existance of only initrd.img and skips trying to
copy the install.img
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index dfabed7..722e58d 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -341,14 +341,18 @@ detectisotype() {
isotype=live
return
fi
- if [ -e $CDMNT/images/install.img ]; then
+ if [ -e $CDMNT/images/install.img -o $CDMNT/isolinux/initrd.img ]; then
+ imgtype=install
if [ -e $CDMNT/Packages ]; then
isotype=installer
- return
else
isotype=netinst
- return
fi
+ if [ ! -e $CDMNT/images/install.img ]; then
+ echo "$ISO uses initrd.img w/o install.img"
+ imgtype=initrd
+ fi
+ return
fi
echo "ERROR: $ISO does not appear to be a Live image or DVD installer."
exitclean
@@ -390,6 +394,7 @@ homesizemb=0
swapsizemb=0
overlaysizemb=0
isotype=
+imgtype=
LIVEOS=LiveOS
HOMEFILE="home.img"
@@ -648,16 +653,22 @@ fi
# Verify available space for DVD installer
if [ "$isotype" = "installer" ]; then
isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
- installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
+ if [ "$imgtype" = "install" ]; then
+ imgpath=images/install.img
+ else
+ imgpath=isolinux/initrd.img
+ fi
+ installimgsize=$(du -s -B 1M $CDMNT/$imgpath | awk {'print $1;'})
+
tbd=0
- if [ -e $USBMNT/images/install.img ]; then
- tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'})
+ if [ -e $USBMNT/$imgpath ]; then
+ tbd=$(du -s -B 1M $USBMNT/$imgpath | awk {'print $1;'})
fi
if [ -e $USBMNT/$(basename $ISO) ]; then
tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print $1;'})))
fi
echo "Size of DVD image: $isosize"
- echo "Size of install.img: $installimgsize"
+ echo "Size of $imgpath: $installimgsize"
echo "Available space: $((freespace + tbd))"
if (( ((isosize + installimgsize)) > ((freespace + tbd)) )); then
echo "ERROR: Unable to fit DVD image + install.img on available space on USB stick"
@@ -713,7 +724,9 @@ fi
if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) -a -z "$skipcopy" ]; then
echo "Copying DVD image to USB stick"
mkdir -p $USBMNT/images/
- copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
+ if [ "$imgtype" = "install" ]; then
+ copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
+ fi
if [ "$isotype" = "installer" ]; then
cp $ISO $USBMNT/
fi
@@ -753,7 +766,12 @@ fi
# DVD Installer for netinst
if [ "$isotype" = "netinst" ]; then
- sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
+ if [ "$imgtype" = "install" ]; then
+ sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
+ else
+ # The initrd has everything, so no stage2
+ sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG $BOOTCONFIG_EFI
+ fi
fi
# Adjust the boot timeouts
12 years, 8 months
Making xz compression the default patch
by Bruno Wolff III
The patch is pretty simple, but I'm also looking for feedback on the change
itself. The downside to having it the default (for F15+), is that
occassionally someone might get burnt using xz compression while building
an iso for an older version of Fedora. I think the upside of using xz is
enough that we really should make it the default. (130 MB savings for the
Desktop spin.) But I wanted to run this by other people before making that
change. Note that Fedora can use xz for its spins (and is already doing
so for the nightly composes) without making xz the default compression.
12 years, 8 months
docs/livecd-creator.pod tools/livecd-creator
by Bruno Wolff III
docs/livecd-creator.pod | 5 +++--
tools/livecd-creator | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 3d5b9f402350631e5f697a6b3020ed811b2893f7
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Sun Jan 23 21:28:28 2011 -0600
Make xz the default compression type for live images.
diff --git a/docs/livecd-creator.pod b/docs/livecd-creator.pod
index 63ea88b..1827728 100644
--- a/docs/livecd-creator.pod
+++ b/docs/livecd-creator.pod
@@ -43,9 +43,10 @@ Defines the file system label. The default is based on the configuration name.
=item --compression-type=COMPRESSOR
Specify a compressor recognized by mksquashfs.
-gzip is the default and should work with all kernels.
+xz is the default and works with 2.6.38 and later kernels.
+gzip works with all kernels.
lzo works with 2.6.36 and later kernels.
-xz works with 2.6.38 and later kernels. lzma will only work with custom kernels.
+lzma will only work with custom kernels.
If gzip is used, the -comp option is not passed to mksquashfs to allow the use of older versions of mksquashfs.
=item --releasever=VER
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 85d74eb..75949c1 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -48,8 +48,8 @@ def parse_options(args):
imgopt.add_option("", "--image-type", type="string", dest="image_type",
help=optparse.SUPPRESS_HELP)
imgopt.add_option("", "--compression-type", type="string", dest="compress_type",
- help="Compression type recognized by mksquashfs (default gzip, xz needs a 2.6.38+ kernel, lzo needs a 2.6.36+ kernel, lzma needs custom kernel)",
- default="gzip")
+ help="Compression type recognized by mksquashfs (default xz needs a 2.6.38+ kernel, gzip works with all kernels, lzo needs a 2.6.36+ kernel, lzma needs custom kernel)",
+ default="xz")
imgopt.add_option("", "--releasever", type="string", dest="releasever",
default=None,
help="Value to substitute for $releasever in kickstart repo urls")
12 years, 8 months
docs/livecd-creator.pod tools/livecd-creator
by Bruno Wolff III
docs/livecd-creator.pod | 9 +++++----
tools/livecd-creator | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit a951443c11ccae3aeef17f9530d7154678aebf9a
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Sat Jan 15 23:14:52 2011 -0600
Update documentation for xz availability.
diff --git a/docs/livecd-creator.pod b/docs/livecd-creator.pod
index dd70fb9..63ea88b 100644
--- a/docs/livecd-creator.pod
+++ b/docs/livecd-creator.pod
@@ -42,10 +42,11 @@ Defines the file system label. The default is based on the configuration name.
=item --compression-type=COMPRESSOR
-Specify a compressor recognized by mksquashfs. The default is gzip. lzma
-currently requires a custom kernel to produce a functional image. lzo works with 2.6.36+ kernels, but will generally take up more space than using gzip. If gzip
-is used, the -comp option is not passed to mksquashfs to allow the use of
-older versions of mksquashfs.
+Specify a compressor recognized by mksquashfs.
+gzip is the default and should work with all kernels.
+lzo works with 2.6.36 and later kernels.
+xz works with 2.6.38 and later kernels. lzma will only work with custom kernels.
+If gzip is used, the -comp option is not passed to mksquashfs to allow the use of older versions of mksquashfs.
=item --releasever=VER
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 18c50cd..85d74eb 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -48,7 +48,7 @@ def parse_options(args):
imgopt.add_option("", "--image-type", type="string", dest="image_type",
help=optparse.SUPPRESS_HELP)
imgopt.add_option("", "--compression-type", type="string", dest="compress_type",
- help="Compression type recognized by mksquashfs (default gzip, lzma needs custom kernel, lzo needs a 2.6.36+ kernel)",
+ help="Compression type recognized by mksquashfs (default gzip, xz needs a 2.6.38+ kernel, lzo needs a 2.6.36+ kernel, lzma needs custom kernel)",
default="gzip")
imgopt.add_option("", "--releasever", type="string", dest="releasever",
default=None,
12 years, 8 months
xz doc patch posted for review
by Bruno Wolff III
The proposed documentation patch is attached.
There will be another revision when (and if) the default changes. But this
is the fall back for xz being available, even if we decide not to use it
by default for spin creation.
12 years, 8 months
xz (lzma2) support very likely for 2.6.38
by Bruno Wolff III
Lougher has made a pull request for xz support (effectively lzma2) for
squashfs for 2.6.38. The merge window closes in about 3 days, so we should
know pretty shortly whether or not this request is accepted, but the odds
look good.
We already have squashfs-tools support ready to go. I'll work on adding
a documentation patch to note xz as an available compression type soon.
Once we have a 2.6.38 kernel in rawhide (assuming the patch set gets pulled)
I like to switch the default to using xz instead of gzip for livecd-creator.
If we find problems we can switch back easily, but I'd like to get testing
going earlier rather than later.
12 years, 8 months
seem to a quiet list
by Johan Scheepers
Good day,
Subscribed to list 10 hrs ago and no mail for anybody?
This a quiet list?
Thanks
Johan
12 years, 8 months