3 more megs if we get rid of redundant copy of kernel?
by Douglas McClendon
It may well be that this has been discussed on this list before, and
worse yet, that I may have even participated, but if so I've long
forgotten, and it doesn't seem easy enough to search for.
In my livecd generation tools I go to a bit of extra hassle to play
symlink games with /boot/vmlinuz-$(uname -r), such that it doesn't get
put into the squashfs, since a copy of it is in the container iso/usb
filesystem.
Maybe we want to do that for f12? It is a bit messy, but I think it's
worth it for 3/700M.
peace...
-dmc
14 years, 9 months
persistence in Live USB
by Joseph Barney
I dunno if this is the right spot but had to try... I tried making a 2GB
persistence space on my Live USB... It's a fairly new 8GB Sandisk Cruzer,
and I've read that with fat32 you can make it as much as 4GB. I'm no
techical wizard, but more artsy but can usually manage on computers. I am
using Fedora 11. My system does boot off the flash drive but it gives me a
bit over 830mb of space, according to the OS but it is not
persistent...Anything saved is lost on reboot and I do have Fedora 11 on my
hard drive and installed it to flash with the official LiveUSB Creator. Any
advice? Thanks!
Joey
14 years, 9 months
[ANNOUNCE] ZyX-LiveInstaller-0.1.1
by Douglas McClendon
A new GPLv3 - F11 compatible - _rebootless_ LiveOS installer is ready
for alpha testers.
Read all about it here, with full screenshot tour, src and binary rpms,
online browsable source tree, and beginnings of a FAQ.
http://viros.org/rebootless (redirects to:)
http://filteredperception.org/smiley/projects/zyx-rli/
All you should need to test out, is a system whose disk data you don't
care about, a stock f11 i686 livecd or liveusb, and an internet
connection. Boot up, fire up firefox, go to that url, install by
clicking the rpm link, and run the new desktop icon/launcher. If all
goes well, you should be able to eject the livecd or remove the liveusb
without powering down, and go about your business. Not to mention you
could have been going about your business while the install was
happening, and every change made to the filesystem even as you are
installing, gets live migrated to the target disk partitions.
Comments, feedback, bugs, and review will be greatly appreciated.
peace...
-dmc
----------
sha512sums
----------
f0ef56ecbb8c302c56b3812599e4f62ce1c1fe4484f7b1d8791edc8cfd92d07c285444cb63340f37a128f544471644d3bb645c92aae6f3083faf0952ff0fa206
zyx-liveinstaller-0.1.1-1.i386.rpm
be5d2a11f068c13c6157515467214aec1515348021fb7e7fe8129c45ca63dbb36f02410e1d9a44b1dc5e635886f12bafbad9939ce4fcafc2ed69cd560f3a14af
zyx-liveinstaller-0.1.1-1.src.rpm
5dd054f49291a62214d5a7dd5e57117335c4dd559ede35cea53fcd7a38983fd5931859a8d491a2a0bd4ef9d095ec06d1eefd2ac9e23767a561191f3b397687a1
zyx-liveinstaller-0.1.1.tar.bz2
14 years, 9 months
fedora xen livecd needed
by Viswanath T K
Hello All,
I am a newbie. I am creating my own customised xen livecd. I tried on
fc7xen, but my livecd fails with "kernel panic" message.
(a) Where can I download a fedora xen livecd from ?
I would like to rework on my customised livecd
I need help please
Thanks
Vishu
14 years, 9 months
imgcreate/fs.py
by Jeremy Katz
imgcreate/fs.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
New commits:
commit 94d23f008f8f42e0cf93cd8b6cc0a4381d408dfb
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 6 14:51:06 2009 -0400
Also, don't lose resize2fs output (per request of sandeen)
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index ae79b1c..563b7a9 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -61,17 +61,12 @@ def resize2fs(fs, size = None, minimal = False):
os.close(fd)
subprocess.call(["/sbin/e2image", "-r", fs, saved_image])
- dev_null = os.open("/dev/null", os.O_WRONLY)
args = ["/sbin/resize2fs", fs]
if minimal:
args.append("-M")
else:
args.append("%sK" %(size / 1024,))
- try:
- ret = subprocess.call(args, stdout = dev_null, stderr = dev_null)
- finally:
- os.close(dev_null)
-
+ ret = subprocess.call(args)
if ret != 0:
return ret
14 years, 9 months
2 commits - imgcreate/fs.py
by Jeremy Katz
imgcreate/fs.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit e6767a22aa26c56d7f53c34ef533f3daf70fc373
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 6 14:47:54 2009 -0400
Add a new exception type for resize errors
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index cb407ae..ae79b1c 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -52,9 +52,9 @@ def mksquashfs(in_img, out_img):
def resize2fs(fs, size = None, minimal = False):
if minimal and size is not None:
- raise RuntimeError("Can't specify both minimal and a size for resize!")
+ raise ResizeError("Can't specify both minimal and a size for resize!")
if not minimal and size is None:
- raise RuntimeError("Must specify either a size or minimal for resize!")
+ raise ResizeError("Must specify either a size or minimal for resize!")
e2fsck(fs)
(fd, saved_image) = tempfile.mkstemp("", "resize-image-", "/tmp")
@@ -76,7 +76,7 @@ def resize2fs(fs, size = None, minimal = False):
return ret
if e2fsck(fs) != 0:
- raise CreatorError("fsck after resize returned an error! image to debug at %s" %(saved_image,))
+ raise ResizeError("fsck after resize returned an error! image to debug at %s" %(saved_image,))
os.unlink(saved_image)
return 0
commit fcad576ac467f6800ef062cd486ac42fa09ac7cd
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 6 14:46:20 2009 -0400
Don't continue if the fs unmount fails
We occasionally see something where the fs fails to unmount, but we
continue anyway. This then leads to weirdness. So just raise
an exception if the unmount fails
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index c536de3..cb407ae 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -112,7 +112,9 @@ class BindChrootMount:
if not self.mounted:
return
- subprocess.call(["/bin/umount", self.dest])
+ rc = subprocess.call(["/bin/umount", self.dest])
+ if rc != 0:
+ raise MountError("Unable to unmount filesystem at %s" % self.dest)
self.mounted = False
class LoopbackMount:
@@ -354,6 +356,8 @@ class DiskMount(Mount):
rc = subprocess.call(["/bin/umount", self.mountdir])
if rc == 0:
self.mounted = False
+ else:
+ raise MountError("Unable to unmount filesystem at %s" % self.mountdir)
if self.rmdir and not self.mounted:
try:
14 years, 9 months
4 commits - imgcreate/creator.py imgcreate/fs.py
by Jeremy Katz
imgcreate/creator.py | 2 -
imgcreate/fs.py | 62 +++++++++++++++++++++++++++------------------------
2 files changed, 35 insertions(+), 29 deletions(-)
New commits:
commit 6a3849d072b142f6c5c5bba07dd6521a1ef0c03a
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 6 14:29:30 2009 -0400
Store a copy of the filesystem image before resize
Save a copy of an e2image before we do the resize so that if it
fails, people can have something to provide via bugzilla
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index c19e8a0..c536de3 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -25,6 +25,7 @@ import subprocess
import random
import string
import logging
+import tempfile
from imgcreate.errors import *
@@ -56,6 +57,9 @@ def resize2fs(fs, size = None, minimal = False):
raise RuntimeError("Must specify either a size or minimal for resize!")
e2fsck(fs)
+ (fd, saved_image) = tempfile.mkstemp("", "resize-image-", "/tmp")
+ os.close(fd)
+ subprocess.call(["/sbin/e2image", "-r", fs, saved_image])
dev_null = os.open("/dev/null", os.O_WRONLY)
args = ["/sbin/resize2fs", fs]
@@ -72,7 +76,8 @@ def resize2fs(fs, size = None, minimal = False):
return ret
if e2fsck(fs) != 0:
- raise CreatorError("fsck after resize returned an error!")
+ raise CreatorError("fsck after resize returned an error! image to debug at %s" %(saved_image,))
+ os.unlink(saved_image)
return 0
def e2fsck(fs):
commit 44c17e8655e2787d3bb2fdc5ab32be18526ce284
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 6 14:26:43 2009 -0400
Consolidate calls to fsck
We always want to fsck before/after resizing, so just do it in
the resize method rather than having it scattered everywhere.
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index 567376a..c19e8a0 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -54,6 +54,9 @@ def resize2fs(fs, size = None, minimal = False):
raise RuntimeError("Can't specify both minimal and a size for resize!")
if not minimal and size is None:
raise RuntimeError("Must specify either a size or minimal for resize!")
+
+ e2fsck(fs)
+
dev_null = os.open("/dev/null", os.O_WRONLY)
args = ["/sbin/resize2fs", fs]
if minimal:
@@ -61,9 +64,21 @@ def resize2fs(fs, size = None, minimal = False):
else:
args.append("%sK" %(size / 1024,))
try:
- return subprocess.call(args, stdout = dev_null, stderr = dev_null)
+ ret = subprocess.call(args, stdout = dev_null, stderr = dev_null)
finally:
os.close(dev_null)
+
+ if ret != 0:
+ return ret
+
+ if e2fsck(fs) != 0:
+ raise CreatorError("fsck after resize returned an error!")
+ return 0
+
+def e2fsck(fs):
+ logging.debug("Checking filesystem %s" % fs)
+ rc = subprocess.call(["/sbin/e2fsck", "-f", "-y", fs])
+ return rc
class BindChrootMount:
"""Represents a bind mount of a directory into a chroot."""
@@ -402,11 +417,7 @@ class ExtDiskMount(DiskMount):
if size > current_size:
self.disk.expand(size)
- self.__fsck()
-
resize2fs(self.disk.lofile, size)
-
- self.__fsck()
return size
def __create(self):
@@ -426,8 +437,7 @@ class ExtDiskMount(DiskMount):
DiskMount.mount(self)
def __fsck(self):
- logging.debug("Checking filesystem %s" % self.disk.lofile)
- rc = subprocess.call(["/sbin/e2fsck", "-f", "-y", self.disk.lofile])
+ return e2fsck(self.disk.lofile)
return rc
def __get_size_from_filesystem(self):
@@ -449,12 +459,8 @@ class ExtDiskMount(DiskMount):
return int(parse_field(out, "Block count")) * self.blocksize
def __resize_to_minimal(self):
- self.__fsck()
resize2fs(self.disk.lofile, minimal = True)
- min = self.__get_size_from_filesystem()
- if self.__fsck() != 0:
- raise CreatorError("fsck returned an error!")
- return min
+ return self.__get_size_from_filesystem()
def resparse(self, size = None):
self.cleanup()
commit 1e5e6019a058c6acde0b4cb85a21cac4d7b66a60
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 6 13:49:14 2009 -0400
Use resize2fs -M instead of binary search
esandeen got a "resize to minimal size" option added to resize2fs,
so we should use it rather than our bisecting down to a minimal
size. And maybe then we'll hit fewer resize2fs bugs.
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index 65f16e4..567376a 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -49,11 +49,19 @@ def mksquashfs(in_img, out_img):
raise SquashfsError("'%s' exited with error (%d)" %
(string.join(args, " "), ret))
-def resize2fs(fs, size):
+def resize2fs(fs, size = None, minimal = False):
+ if minimal and size is not None:
+ raise RuntimeError("Can't specify both minimal and a size for resize!")
+ if not minimal and size is None:
+ raise RuntimeError("Must specify either a size or minimal for resize!")
dev_null = os.open("/dev/null", os.O_WRONLY)
+ args = ["/sbin/resize2fs", fs]
+ if minimal:
+ args.append("-M")
+ else:
+ args.append("%sK" %(size / 1024,))
try:
- return subprocess.call(["/sbin/resize2fs", fs, "%sK" % (size / 1024,)],
- stdout = dev_null, stderr = dev_null)
+ return subprocess.call(args, stdout = dev_null, stderr = dev_null)
finally:
os.close(dev_null)
@@ -442,24 +450,11 @@ class ExtDiskMount(DiskMount):
def __resize_to_minimal(self):
self.__fsck()
-
- #
- # Use a binary search to find the minimal size
- # we can resize the image to
- #
- bot = 0
- top = self.__get_size_from_filesystem()
- while top != (bot + 1):
- t = bot + ((top - bot) / 2)
-
- if not resize2fs(self.disk.lofile, t):
- top = t
- else:
- bot = t
-
+ resize2fs(self.disk.lofile, minimal = True)
+ min = self.__get_size_from_filesystem()
if self.__fsck() != 0:
raise CreatorError("fsck returned an error!")
- return top
+ return min
def resparse(self, size = None):
self.cleanup()
commit 0b0d40f7bdfc05c3220f44eec9bbb37bd8475587
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jun 29 10:58:42 2009 -0400
Don't error out with SELinux disabled on the host (#508402)
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 1f8971f..910c778 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -433,7 +433,7 @@ class ImageCreator(object):
def __getbooleans(self):
booleans = []
- if not kickstart.selinux_enabled(self.ks):
+ if not kickstart.selinux_enabled(self.ks) or not os.path.exists("/selinux/enforce"):
return booleans
for i in selinux.security_get_boolean_names()[1]:
on = selinux.security_get_boolean_active(i)
14 years, 9 months
Re: [Fedora-livecd-list] How to add icons to desktop for a custom remix
by Jane Dogalt
Actually, what you want to do is create a new file instead of appending to that one. That is one of those '.d' directories, where you can have lots of files, each one doing a specific thing. In this case, the liveinst one is owned by anaconda, and only meant to control the liveinst icon that gets added to the desktop. I'd go with >> zz-gamestuffs.sh or whatever. I assume the zz has something to do with being processed in alpha-sort order, so I'd keep that prefix.
-dmc
--- On Fri, 7/3/09, Bruno Wolff III <bruno(a)wolff.to> wrote:
> From: Bruno Wolff III <bruno(a)wolff.to>
> Subject: Re: [Fedora-livecd-list] How to add icons to desktop for a custom remix
> To: "Jane Dogalt" <jdogalt(a)yahoo.com>
> Cc: fedora-livecd-list(a)redhat.com
> Date: Friday, July 3, 2009, 10:46 AM
> On Wed, Jul 01, 2009 at 11:17:20
> -0700,
> Jane Dogalt <jdogalt(a)yahoo.com>
> wrote:
> >
> > On f11, look at
> /etc/X11/xinit/xinitrc.d/zz-liveinst.sh
> >
> > Something else you could do is have a folder of
> launchers start up automatically. Just an idle
> thought...
>
> This worked. I just needed to append to that file in the
> %post section.
> Below is an example that tweaks the games spin.
>
> # Custom games spin that defines rpmfusion and livna
> repositories
> # and includes some media codecs and tools for playing
> dvds
> # and colossus, including a desktop icon for it.
>
> %include
> /usr/share/spin-kickstarts/fedora-livedvd-games.ks
>
> repo --name=released
> --baseurl=file:///home/fedora/releases/11/Everything/$basearch/os/
> repo --name=updates
> --baseurl=file:///home/fedora/updates/11/$basearch/
> repo --name=f11-updates-testing
> --baseurl=file:///home/fedora/updates/testing/11/$basearch/
> repo --name=free
> --baseurl=file:///home/fedora/free/fedora/releases/11/Everything/$basearch/os/
> repo --name=free-updates
> --baseurl=file:///home/fedora/free/fedora/updates/11/$basearch/
> repo --name=free-updates-testing
> --baseurl=file:///home/fedora/free/fedora/updates/testing/11/$basearch/
> repo --name=nonfree
> --baseurl=file:///home/fedora/nonfree/fedora/releases/11/Everything/$basearch/os/
> repo --name=nonfree-updates
> --baseurl=file:///home/fedora/nonfree/fedora/updates/11/$basearch/
> repo --name=nonfree-updates-testing
> --baseurl=file:///home/fedora/nonfree/fedora/updates/testing/11/$basearch/
> repo --name=livna
> --baseurl=file:///home/fedora/livna/repo/11/$basearch/
> repo --name=local --baseurl=file:///home/fedora/local/
>
> %packages
>
> # Colossus isn't on the games spin yet
> colossus
>
> # rpm fusion
> rpmfusion-nonfree-release
> rpmfusion-free-release
> gstreamer-plugins-ugly
> gstreamer-plugins-bad
> gstreamer-ffmpeg
> xine-lib-extras-freeworld
>
> # Livna
> livna-release
> libdvdcss
> libdvdcss-devel
>
> # kernel-devel is needed by kmod-nvidia-96xx
> kernel-devel
>
> %post
>
> # Put some games on the desktop
> cat <<'EOF' >>
> /etc/X11/xinit/xinitrc.d/zz-liveinst.sh
> if [ `grep -c Geode /proc/cpuinfo` -eq 0 ]; then
> if [ -b /dev/live-osimg ]; then
> cp /usr/share/applications/colossus.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-wesnoth.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-freecol.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-freeciv.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-warzone2100.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-tremulous.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-alienarena.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> elif [ -f /.livecd-configured ]; then # FIXME:
> old way... this should go away
> cp /usr/share/applications/colossus.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp /usr/share/applications/wesnoth.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-freecol.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-freeciv.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-warzone2100.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-tremulous.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> cp
> /usr/share/applications/fedora-alienarena.desktop
> "${XDG_DESKTOP_DIR:-$HOME/Desktop}"
> fi
> fi
> EOF
>
> %end
>
14 years, 10 months