Building a Kiosk Live CD
by Clint Savage
Hi all,
I'm in the process of building a kiosk CD using xguest, but I continue
to run into an issue where I can't install xguest during the building
of the Live CD.
It appears the reason for this is some SELinux settings it tries to
make when installing the RPM. As such, the xguest rpm fails.
Here's the message I get from the livecd-creator when attempting to
install xguest.
libsemanage.bool_read_list: could not get list of boolean names (No
such file or directory).
libsemanage.bool_read_list: could not read boolean list (No such file
or directory).
libsemanage.dbase_activedb_cache: could not cache active database (No
such file or directory).
libsemanage.enter_rw: could not enter read-write section (No such file
or directory).
Could not change boolean allow_polyinstantiation
Could not change policy booleans
error: %pre(xguest-1.0.6-7.fc9.noarch) scriptlet failed, exit status 255
error: install: %pre scriptlet failed (2), skipping xguest-1.0.6-7.fc9
I'm quite certain that if I were able to better understand how to
adjust the SELinux values above during the build, I would be better
off. But currently, I want to see if there is a recommended way of
dealing with this sort of thing during the Live CD creation process.
Cheers,
Clint
15 years, 3 months
Anyone using the overlay file?
by Forrest Taylor
In the iso-to-disk script, one can add an overlay file. However, I
don't see that it is being used at all--livesys does not reference it at
all. It looks like the XO team passes a kernel parameter, but I haven't
seen the code to actually use it.
My assumption is that the overlay file would be the backend storage for
an LVM snapshot. Has anyone actually used an overlay file? Any ideas
on the implementation?
Thanks,
--
Forrest
15 years, 3 months
Re: [Fedora-livecd-list] Mac (EFI) USB booting
by Daire Byrne
Jeremy,
----- "Jeremy Katz" <katzj(a)redhat.com> wrote:
> PowerMacs (PPC) are an entirely different beast and there's not
> really been any work done on getting them booting off of USB.
Indeed - not too bothered about them.
> For the x86 based Macs, it can work, but it's definitely far from
> just working everywhere right now. The first question is if your machine
> is 32bit or 64bit EFI as we require matching x86 vs x86_64,
> respectively, based on that. Most of the original Core Duo stuff is 32bit EFI, the
> newer is 64bit. If you're using a 64bit EFI machine, right now,
> you're out of luck -- the kernel even in Fedora 10 was broken with 64bit EFI
> :(
Yes I saw that. Like I said I'd just be happy to even get one of my Macs to recognise the USB drive as a boot device at this point! I suppose I should test on a new MacBook too for completeness. I would have thought the Mac Mini should work though as that is x86_64 and has the Core Duo 2.
> I never managed to get rEFIt to boot off of an MBR-based USB device.
> Some people said they did, but I have no clue what they did to do so
> :)
I found the same kind of confusion too - some say it can be done others say it can't. To be honest booting a MBR USB stick on Mac is still probably the best way to go because the 3D gfx for ATI/Nvidia doesn't work under EFI atm. I think I'm going to have to try booting of a CD just for the GRUB/SysLinux boot and then mount the USB stick after the kernel boots up and the initrd scripts begin.
Thanks for the reply.
Daire
15 years, 3 months
Mac (EFI) USB booting
by Daire Byrne
Hi,
I have been trying to get Mac booting working but I am struggling to jump the first hurdle - namely having the Mac recognise the USB drive as a bootable device. I have used ALT on boot to list the bootable drives on both a Mac Mini and a PowerMac desktop machine but neither recognise a USB stick created with livecd-tools. In fact after booting from the drive MacOSX informs me that the drive isn't initialised and wants me to format it. Checking the partitions in Linux they are laid out as expected with a bootable EFI partition vfat formatted.
I gave up on EFI booting and even tried a classic MBR install with rEFIt but still the USB drive is never detected. Is there another trick I'm missing here or does USB booting only work on a very small subset of Intel Mac models? The recent EFI+MBR work looks interesting but like I said I can't even get that far.
Regards,
Daire
15 years, 3 months
livecd-tools.spec Makefile
by Jeremy Katz
Makefile | 4
livecd-tools.spec | 242 ------------------------------------------------------
2 files changed, 2 insertions(+), 244 deletions(-)
New commits:
commit 4125fbd5713d071cbbab076130f8e077da68cabc
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 19 11:26:06 2009 -0500
Bump version
diff --git a/Makefile b/Makefile
index 48c89d5..f5625a4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 020
+VERSION = 021
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
@@ -42,7 +42,7 @@ uninstall:
rm -rf $(DESTDIR)/usr/share/doc/livecd-tools-$(VERSION)
dist : all
- git-archive --format=tar --prefix=livecd-tools-$(VERSION)/ HEAD | bzip2 -9v > livecd-tools-$(VERSION).tar.bz2
+ git archive --format=tar --prefix=livecd-tools-$(VERSION)/ HEAD | bzip2 -9v > livecd-tools-$(VERSION).tar.bz2
clean:
rm -f *~ creator/*~ installer/*~ config/*~ docs/*.8
diff --git a/livecd-tools.spec b/livecd-tools.spec
deleted file mode 100644
index 215b576..0000000
--- a/livecd-tools.spec
+++ /dev/null
@@ -1,242 +0,0 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "import distutils.sysconfig as d; print d.get_python_lib()")}
-
-%define debug_package %{nil}
-
-Summary: Tools for building live CD's
-Name: livecd-tools
-Version: 020
-Release: 1%{?dist}
-License: GPLv2
-Group: System Environment/Base
-URL: http://git.fedoraproject.org/?p=hosted/livecd
-Source0: %{name}-%{version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-Requires: util-linux
-Requires: coreutils
-Requires: e2fsprogs
-Requires: yum >= 3.2.18
-Requires: mkisofs
-Requires: squashfs-tools
-Requires: pykickstart >= 0.96
-Requires: dosfstools >= 2.11-8
-Requires: isomd5sum
-Requires: rhpl
-Requires: python-urlgrabber
-%ifarch %{ix86} x86_64
-Requires: syslinux
-%endif
-%ifarch ppc
-Requires: yaboot
-%endif
-BuildRequires: python
-BuildRequires: /usr/bin/pod2man
-
-
-%description
-Tools for generating live CD's on Fedora based systems including
-derived distributions such as RHEL, CentOS and others. See
-http://fedoraproject.org/wiki/FedoraLiveCD for more details.
-
-%prep
-%setup -q
-
-%build
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root,-)
-%doc AUTHORS COPYING README HACKING API
-%doc config/livecd-fedora-minimal.ks
-%{_mandir}/man*/*
-%{_bindir}/livecd-creator
-%{_bindir}/livecd-iso-to-disk
-%{_bindir}/livecd-iso-to-pxeboot
-%{_bindir}/image-creator
-%dir %{python_sitelib}/imgcreate
-%{python_sitelib}/imgcreate/*.py
-%{python_sitelib}/imgcreate/*.pyo
-%{python_sitelib}/imgcreate/*.pyc
-
-%changelog
-* Wed Nov 12 2008 Jeremy Katz <katzj(a)redhat.com> - 020-1
-- Support setting up a swap file
-- Verify integer args in livecd-iso-to-disk (#467257)
-- Set up persistent /home on internal mtd0 for XO
-- Default to resetting the overlay on XO
-- Support copying the raw ext3fs to the usb stick instead of the squash
-- Mactel fixes
-- Align initrd properly on XO (#467093)
-- Make initrd load addr work on newer XO firmwares
-- Fix up Xen paths for Xen live images (Michael Ansel)
-- Support --defaultdesktop (Orion Poplawski)
-
-* Fri Oct 10 2008 Jeremy Katz <katzj(a)redhat.com> - 019-1
-- livecd-iso-to-disk: Various other XO fixes
-- Cleanup rpmdb locks after package installation
-- Fix traceback due to lazy rhpl.keyboard import
-- Fix using groups with options (jkeating)
-- Support persistent /home on XO's internal flash
-- Fix ramdisk load addr in boot/olpc.fth for XO
-- Fix up boot from SD
-- Fix extracting boot parameters for pxe (apevec)
-- Make rpm macro information persist into the image (bkearney)
-- Support %packages --instLangs (bkearney)
-
-* Thu Aug 28 2008 Jeremy Katz <katzj(a)redhat.com> - 018-1
-- Use logging API for debugging messages (dhuff)
-- Some initial support for booting live images on an XO
-- Refactoring of mount code for appliance-creator (danpb, dhuff)
-- Make --base-on actually work again
-- Drop the image configs; these are now in the spin-kickstarts repo
-- plymouth support
-- Listen to bootloader --append in config
-- Add man pages (Pedro Silva)
-- Support booting from Intel based Macs via EFI on USB (#450193)
-- Fixes for SELinux enforcing (eparis)
-- Eject the CD on shutdown (#239928)
-- Allow adding extra kernel args with livecd-iso-to-disk
-- Support for persistent /home (#445218)
-- Copy timezone to /etc/localtime (#445624)
-- Ensure that commands run by livecd-creator exist
-- Mount a tmpfs for some dirs (#447127)
-
-* Tue May 6 2008 Bill Nottingham <notting(a)redhat.com> - 017-1
-- fix F9 final configs
-
-* Thu May 1 2008 Jeremy Katz <katzj(a)redhat.com> - 016-1
-- Config changes all around, including F9 final configs
-- Fix up the minimal image creation
-- Fix odd traceback error on __del__ (#442443)
-- Add late initscript and split things in half
-- livecd-iso-to-disk: Check the available space on the stick (#443046)
-- Fix partition size overriding (kanarip)
-
-* Thu Mar 6 2008 Jeremy Katz <katzj(a)redhat.com> - 015-1
-- Support for using live isos with pxe booting (Richard W.M. Jones and
- Chris Lalancette)
-- Fixes for SELinux being disabled (Warren Togami)
-- Stop using mayflower for building the initrd; mkinitrd can do it now
-- Create a minimal /dev rather than using the host /dev (Warren Togami)
-- Support for persistent overlays when using a USB stick (based on support
- by Douglas McClendon)
-
-* Tue Feb 12 2008 Jeremy Katz <katzj(a)redhat.com> - 014-1
-- Rework to provide a python API for use by other tools (thanks to
- markmc for a lot of the legwork here)
-- Fix creation of images with ext2 filesystems and no SELinux
-- Don't require a yum-cache directory inside of the cachedir (#430066)
-- Many config updates for rawhide
-- Allow running live images from MMC/SD (#430444)
-- Don't let a non-standard TMPDIR break things (Jim Meyering)
-
-* Mon Oct 29 2007 Jeremy Katz <katzj(a)redhat.com> - 013-1
-- Lots of config updates
-- Support 'device foo' to say what modules go in the initramfs
-- Support multiple kernels being installed
-- Allow blacklisting kernel modules on boot with blacklist=foo
-- Improve bootloader configs
-- Split configs off for f8
-
-* Tue Sep 25 2007 Jeremy Katz <katzj(a)redhat.com> - 012-1
-- Allow %%post --nochroot to work for putting files in the root of the iso
-- Set environment variables for when %%post is run
-- Add progress for downloads (Colin Walters)
-- Add cachedir option (Colin Walters)
-- Fixes for ppc/ppc64 to work again
-- Clean up bootloader config a little
-- Enable swaps in the default desktop config
-- Ensure all configs are installed (#281911)
-- Convert method line to a repo for easier config reuse (jkeating)
-- Kill the modprobe FATAL warnings (#240585)
-- Verify isos with iso-to-disk script
-- Allow passing xdriver for setting the xdriver (#291281)
-- Add turboliveinst patch (Douglas McClendon)
-- Make iso-to-disk support --resetmbr (#294041)
-- Clean up filesystem layout (Douglas McClendon)
-- Manifest tweaks for most configs
-
-* Tue Aug 28 2007 Jeremy Katz <katzj(a)redhat.com> - 011-1
-- Many config updates for Fedora 8
-- Support $basearch in repo line of configs; use it
-- Support setting up Xen kernels and memtest86+ in the bootloader config
-- Handle rhgb setup
-- Improved default fs label (Colin Walters)
-- Support localboot from the bootloader (#252192)
-- Use hidden menu support in syslinux
-- Have a base desktop config included by the other configs (Colin Walters)
-- Use optparse for optino parsing
-- Remove a lot of command line options; things should be specified via the
- kickstart config instead
-- Beginnings of PPC support (David Woodhouse)
-- Clean up kernel module inclusion to take advantage of files in Fedora
- kernels listing storage drivers
-
-* Wed Jul 25 2007 Jeremy Katz <katzj(a)redhat.com> - 010-1
-- Separate out configs used for Fedora 7
-- Add patch from Douglas McClendon to make images smaller
-- Add patch from Matt Domsch to work with older syslinux without vesamenu
-- Add support for using mirrorlists; use them
-- Let livecd-iso-to-disk work with uncompressed images (#248081)
-- Raise error if SELinux requested without being enabled (#248080)
-- Set service defaults on level 2 also (#246350)
-- Catch some failure cases
-- Allow specifying tmpdir
-- Add patch from nameserver specification from Elias Hunt
-
-* Wed May 30 2007 Jeremy Katz <katzj(a)redhat.com> - 009-1
-- miscellaneous live config changes
-- fix isomd5 checking syntax error
-
-* Fri May 4 2007 Jeremy Katz <katzj(a)redhat.com> - 008-1
-- disable screensaver with default config
-- add aic7xxx and sym53c8xx drivers to default initramfs
-- fixes from johnp for FC6 support in the creator
-- fix iso-to-stick to work on FC6
-
-* Tue Apr 24 2007 Jeremy Katz <katzj(a)redhat.com> - 007-1
-- Disable prelinking by default
-- Disable some things that slow down the live boot substantially
-- Lots of tweaks to the default package manifests
-- Allow setting the root password (Jeroen van Meeuwen)
-- Allow more specific network line setting (Mark McLoughlin)
-- Don't pollute the host yum cache (Mark McLoughlin)
-- Add support for mediachecking
-
-* Wed Apr 4 2007 Jeremy Katz <katzj(a)redhat.com> - 006-1
-- Many fixes to error handling from Mark McLoughlin
-- Add the KDE config
-- Add support for prelinking
-- Fixes for installing when running from RAM or usb stick
-- Add sanity checking to better ensure that USB stick is bootable
-
-* Thu Mar 29 2007 Jeremy Katz <katzj(a)redhat.com> - 005-3
-- have to use excludearch, not exclusivearch
-
-* Thu Mar 29 2007 Jeremy Katz <katzj(a)redhat.com> - 005-2
-- exclusivearch since it only works on x86 and x86_64 for now
-
-* Wed Mar 28 2007 Jeremy Katz <katzj(a)redhat.com> - 005-1
-- some shell quoting fixes
-- allow using UUID or LABEL for the fs label of a usb stick
-- work with ext2 formated usb stick
-
-* Mon Mar 26 2007 Jeremy Katz <katzj(a)redhat.com> - 004-1
-- add livecd-iso-to-disk for setting up the live CD iso image onto a usb
- stick or similar
-
-* Fri Mar 23 2007 Jeremy Katz <katzj(a)redhat.com> - 003-1
-- fix remaining reference to run-init
-
-* Thu Mar 22 2007 Jeremy Katz <katzj(a)redhat.com> - 002-1
-- update for new version
-
-* Fri Dec 22 2006 David Zeuthen <davidz(a)redhat.com> - 001-1%{?dist}
-- Initial build.
-
15 years, 3 months
3 commits - imgcreate/live.py tools/livecd-iso-to-disk.sh
by Jeremy Katz
imgcreate/live.py | 12 +--
tools/livecd-iso-to-disk.sh | 169 +++++++++++++++++++++++++++++---------------
2 files changed, 119 insertions(+), 62 deletions(-)
New commits:
commit 616642a5d56b8e453614f7a8845a61b033c9ac4f
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 19 11:14:10 2009 -0500
Use rootfstype='auto' instead of trying to discover iso9660 vs udf (#479846)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index a6a9c46..c75cc92 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -442,7 +442,7 @@ menu hiddenrow 5
cfg += self.__get_image_stanza(is_xen,
fslabel = self.fslabel,
- isofstype = self._isofstype,
+ isofstype = "auto",
liveargs = kernel_options,
long = long,
short = "linux" + index,
@@ -455,7 +455,7 @@ menu hiddenrow 5
if checkisomd5:
cfg += self.__get_image_stanza(is_xen,
fslabel = self.fslabel,
- isofstype = self._isofstype,
+ isofstype = "auto",
liveargs = kernel_options,
long = "Verify and " + long,
short = "check" + index,
@@ -549,13 +549,13 @@ hiddenmenu
if os.path.exists("%s/EFI/boot/xen%d.gz" %(isodir, index)):
continue
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- isofstype = self._isofstype,
+ isofstype = "auto",
liveargs = kernel_options,
long = name,
extra = "", index = index)
if checkisomd5:
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- isofstype = self._isofstype,
+ isofstype = "auto",
liveargs = kernel_options,
long = "Verify and Boot " + name,
extra = "check",
@@ -674,7 +674,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
kernel_options = self._get_kernel_options()
cfg += self.__get_image_stanza(fslabel = self.fslabel,
- isofstype = self._isofstype,
+ isofstype = "auto",
short = "linux",
long = "Run from image",
extra = "",
@@ -683,7 +683,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
if self._has_checkisomd5():
cfg += self.__get_image_stanza(fslabel = self.fslabel,
- isofstype = self._isofstype,
+ isofstype = "auto",
short = "check",
long = "Verify and run from image",
extra = "check",
commit 08da762ce7893c79bb22772c843e492765ff15f4
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 19 10:54:42 2009 -0500
Don't make an inability to find the hybrid gptmbr.bin fatal
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 3777c21..d37a2e9 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -74,9 +74,6 @@ resetMBR() {
cat /usr/lib/syslinux/gptmbr.bin > $device
elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
cat /usr/share/syslinux/gptmbr.bin > $device
- else
- echo "Could not find gptmbr.bin (syslinux)"
- exitclean
fi
else
if [ -f /usr/lib/syslinux/mbr.bin ]; then
commit f0ed14fce156fd97480e833440898cdc378e8f89
Author: Stweart Adam <s.adam(a)diffingo.com>
Date: Fri Jan 16 16:15:50 2009 -0500
Start to support creating/using hybrid GPT/MBR USB sticks
What it changes:
* Exit messages when syslinux's MBR files can't be found
* Unmounts $USBDEV after creating GPT, as HAL attempts to automount
* Allows for hybrid (GPT+MBR) USB keys
* Adds --skipcopy to skip copying the live OS
* Adds --format option to replace --mactel + --reset-mbr
* --reset-mbr will now reset the MBR, GPT or not.
* if --format is specified, a valid partition isn't required (only a valid
device instead)
Notes worth mentioning:
* --format + --mactel = new GPT table, resets PMBR (GPT's Protective MBR)
* --format = new MSDOS table, resets MBR
* syslinux support isn't complete let, hopefully coming soon
* GPT hybrid tables requires /usr/{lib,share}/syslinux/gptmbr.bin which is
only in the newest syslinux (not available in the Fedora repos yet).
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index fba2567..3777c21 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -4,6 +4,7 @@
# Jeremy Katz <katzj(a)redhat.com>
#
# overlay/persistence enhancements by Douglas McClendon <dmc(a)viros.org>
+# GPT+MBR hybrid enhancements by Stewart Adam <s.adam(a)diffingo.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +23,7 @@
export PATH=/sbin:/usr/sbin:$PATH
usage() {
- echo "$0 [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb <size>] [--unencrypted-home] <isopath> <usbstick device>"
+ echo "$0 [--format] [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb <size>] [--unencrypted-home] [--skipcopy] <isopath> <usbstick device>"
exit 1
}
@@ -67,12 +68,25 @@ resetMBR() {
return
fi
getdisk $1
- if [ -f /usr/lib/syslinux/mbr.bin ]; then
- cat /usr/lib/syslinux/mbr.bin > $device
- elif [ -f /usr/share/syslinux/mbr.bin ]; then
- cat /usr/share/syslinux/mbr.bin > $device
+ # if mactel, we need to use the hybrid MBR
+ if [ -n "$mactel" ];then
+ if [ -f /usr/lib/syslinux/gptmbr.bin ]; then
+ cat /usr/lib/syslinux/gptmbr.bin > $device
+ elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
+ cat /usr/share/syslinux/gptmbr.bin > $device
+ else
+ echo "Could not find gptmbr.bin (syslinux)"
+ exitclean
+ fi
else
- exitclean
+ if [ -f /usr/lib/syslinux/mbr.bin ]; then
+ cat /usr/lib/syslinux/mbr.bin > $device
+ elif [ -f /usr/share/syslinux/mbr.bin ]; then
+ cat /usr/share/syslinux/mbr.bin > $device
+ else
+ echo "Could not find mbr.bin (syslinux)"
+ exitclean
+ fi
fi
}
@@ -131,9 +145,35 @@ createGPTLayout() {
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
/sbin/parted --script $device unit b mkpart '"EFI System Partition"' fat32 17408 $(($size - 17408)) set 1 boot on
USBDEV=${device}1
+ # Sometimes automount can be _really_ annoying.
+ echo "Waiting for devices to settle..."
/sbin/udevadm settle
+ sleep 5
+ umount $USBDEV &> /dev/null
/sbin/mkdosfs -n LIVE $USBDEV
- USBLABEL="UUID=$(/lib/udev/vol_id -u $dev)"
+ USBLABEL="UUID=$(/lib/udev/vol_id -u $USBDEV)"
+}
+
+createMSDOSLayout() {
+ dev=$1
+ getdisk $dev
+
+ echo "WARNING: THIS WILL DESTROY ANY DATA ON $device!!!"
+ echo "Press Enter to continue or ctrl-c to abort"
+ read
+
+ /sbin/parted --script $device mklabel msdos
+ partinfo=$(/sbin/parted --script -m $device "unit b print" |grep ^$device:)
+ size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
+ /sbin/parted --script $device unit b mkpart primary fat32 17408 $(($size - 17408)) set 1 boot on
+ USBDEV=${device}1
+ # Sometimes automount can be _really_ annoying.
+ echo "Waiting for devices to settle..."
+ /sbin/udevadm settle
+ sleep 5
+ umount $USBDEV &> /dev/null
+ /sbin/mkdosfs -n LIVE $USBDEV
+ USBLABEL="UUID=$(/lib/udev/vol_id -u $USBDEV)"
}
checkGPT() {
@@ -142,7 +182,7 @@ checkGPT() {
if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep -c GPT)" -eq "0" ]; then
echo "EFI boot requires a GPT partition table."
- echo "This can be done manually or you can run with --reset-mbr"
+ echo "This can be done manually or you can run with --format"
exitclean
fi
@@ -273,6 +313,12 @@ while [ $# -gt 2 ]; do
--mactel)
mactel=1
;;
+ --format)
+ format=1
+ ;;
+ --skipcopy)
+ skipcopy=1
+ ;;
--xo)
xo=1
skipcompress=1
@@ -311,6 +357,7 @@ if [ ! -b "$ISO" -a ! -f "$ISO" ]; then
usage
fi
+# FIXME: If --format is given, we shouldn't care and just use /dev/foo1
if [ -z "$USBDEV" -o ! -b "$USBDEV" ]; then
usage
fi
@@ -327,17 +374,24 @@ if [ -z "$noverify" ]; then
fi
# do some basic sanity checks.
-checkFilesystem $USBDEV
checkMounted $USBDEV
-if [ -z "$mactel" ]; then
- checkSyslinuxVersion
- checkPartActive $USBDEV
- [ -n "$resetmbr" ] && resetMBR $USBDEV
- checkMBR $USBDEV
-elif [ -n "$mactel" ]; then
- [ -n "$resetmbr" ] && createGPTLayout $USBDEV
+if [ -n "$format" ];then
+ # checks for a valid filesystem
+ if [ -n "$mactel" ];then
+ createGPTLayout $USBDEV
+ else
+ createMSDOSLayout $USBDEV
+ fi
+fi
+checkFilesystem $USBDEV
+if [ -n "$mactel" ]; then
checkGPT $USBDEV
fi
+checkSyslinuxVersion
+# Because we can't set boot flag for EFI Protective on msdos partition tables
+[ -z "$mactel" ] && checkPartActive $USBDEV
+[ -n "$resetmbr" ] && resetMBR $USBDEV
+checkMBR $USBDEV
if [ "$overlaysizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
@@ -406,49 +460,54 @@ if [ $(($overlaysizemb + $homesizemb + $livesize + $swapsizemb)) -gt $(($free +
exitclean
fi
-if [ -d $USBMNT/LiveOS -a -z "$force" ]; then
- echo "Already set up as live image."
- if [ -z "$keephome" -a -e $USBMNT/LiveOS/$HOMEFILE ]; then
- echo "WARNING: Persistent /home will be deleted!!!"
- echo "Press Enter to continue or ctrl-c to abort"
- read
- else
- echo "Deleting old OS in fifteen seconds..."
- sleep 15
-
- [ -e "$USBMNT/LiveOS/$HOMEFILE" -a -n "$keephome" ] && mv $USBMNT/LiveOS/$HOMEFILE $USBMNT/$HOMEFILE
- fi
-
- rm -rf $USBMNT/LiveOS
+if [ -z "$skipcopy" ];then
+ if [ -d $USBMNT/LiveOS -a -z "$force" ]; then
+ echo "Already set up as live image."
+ if [ -z "$keephome" -a -e $USBMNT/LiveOS/$HOMEFILE ]; then
+ echo "WARNING: Persistent /home will be deleted!!!"
+ echo "Press Enter to continue or ctrl-c to abort"
+ read
+ else
+ echo "Deleting old OS in fifteen seconds..."
+ sleep 15
+
+ [ -e "$USBMNT/LiveOS/$HOMEFILE" -a -n "$keephome" ] && mv $USBMNT/LiveOS/$HOMEFILE $USBMNT/$HOMEFILE
+ fi
+
+ rm -rf $USBMNT/LiveOS
+ fi
fi
-echo "Copying live image to USB stick"
-[ -z "$mactel" -a ! -d $USBMNT/$SYSLINUXPATH ] && mkdir -p $USBMNT/$SYSLINUXPATH
+# Bootloader is always reconfigured, so keep these out of the if skipcopy stuff.
+[ ! -d $USBMNT/$SYSLINUXPATH ] && mkdir -p $USBMNT/$SYSLINUXPATH
[ -n "$mactel" -a ! -d $USBMNT/EFI/boot ] && mkdir -p $USBMNT/EFI/boot
-[ ! -d $USBMNT/LiveOS ] && mkdir $USBMNT/LiveOS
-[ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE $USBMNT/LiveOS/$HOMEFILE
-# cases without /LiveOS are legacy detection, remove for F10
-if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
- mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT
- cp $CDMNT/LiveOS/ext3fs.img $USBMNT/LiveOS/ext3fs.img || (umount $CDMNT ; exitclean)
- umount $CDMNT
-elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
- cp $CDMNT/LiveOS/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
-elif [ -f $CDMNT/squashfs.img ]; then
- cp $CDMNT/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
-elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
- cp $CDMNT/LiveOS/ext3fs.img $USBMNT/LiveOS/ext3fs.img || exitclean
-elif [ -f $CDMNT/ext3fs.img ]; then
- cp $CDMNT/ext3fs.img $USBMNT/LiveOS/ext3fs.img || exitclean
-fi
-if [ -f $CDMNT/LiveOS/osmin.img ]; then
- cp $CDMNT/LiveOS/osmin.img $USBMNT/LiveOS/osmin.img || exitclean
+
+if [ -z "$skipcopy" ];then
+ echo "Copying live image to USB stick"
+ [ ! -d $USBMNT/LiveOS ] && mkdir $USBMNT/LiveOS
+ [ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE $USBMNT/LiveOS/$HOMEFILE
+ # cases without /LiveOS are legacy detection, remove for F10
+ if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
+ mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT
+ cp $CDMNT/LiveOS/ext3fs.img $USBMNT/LiveOS/ext3fs.img || (umount $CDMNT ; exitclean)
+ umount $CDMNT
+ elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
+ cp $CDMNT/LiveOS/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
+ elif [ -f $CDMNT/squashfs.img ]; then
+ cp $CDMNT/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
+ elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
+ cp $CDMNT/LiveOS/ext3fs.img $USBMNT/LiveOS/ext3fs.img || exitclean
+ elif [ -f $CDMNT/ext3fs.img ]; then
+ cp $CDMNT/ext3fs.img $USBMNT/LiveOS/ext3fs.img || exitclean
+ fi
+ if [ -f $CDMNT/LiveOS/osmin.img ]; then
+ cp $CDMNT/LiveOS/osmin.img $USBMNT/LiveOS/osmin.img || exitclean
+ fi
fi
-if [ -z "$mactel" ]; then
- cp $CDMNT/isolinux/* $USBMNT/$SYSLINUXPATH
- BOOTCONFIG=$USBMNT/$SYSLINUXPATH/isolinux.cfg
-else
+cp $CDMNT/isolinux/* $USBMNT/$SYSLINUXPATH
+BOOTCONFIG=$USBMNT/$SYSLINUXPATH/isolinux.cfg
+if [ -n "$mactel" ];then
if [ -d $CDMNT/EFI/boot ]; then
cp $CDMNT/EFI/boot/* $USBMNT/EFI/boot
else
@@ -599,8 +658,9 @@ echo "Installing boot loader"
if [ -n "$mactel" ]; then
# replace the ia32 hack
if [ -f "$USBMNT/EFI/boot/boot.conf" ]; then cp -f $USBMNT/EFI/boot/bootia32.conf $USBMNT/EFI/boot/boot.conf ; fi
- cleanup
-elif [ "$USBFS" = "vfat" -o "$USBFS" = "msdos" ]; then
+fi
+
+if [ "$USBFS" = "vfat" -o "$USBFS" = "msdos" ]; then
# syslinux expects the config to be named syslinux.cfg
# and has to run with the file system unmounted
mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
15 years, 3 months
2 commits - imgcreate/live.py tools/livecd-creator
by Jeremy Katz
imgcreate/live.py | 2 +-
tools/livecd-creator | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit ea5320abc1500552e17a95710e0fb989b001c41b
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Wed Jan 14 22:19:28 2009 -0500
Fix traceback when not specifying a cachedir
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 211f6ee..1aab882 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -115,9 +115,11 @@ def main():
creator.tmpdir = os.path.abspath(options.tmpdir)
creator.skip_compression = options.skip_compression
creator.skip_minimize = options.skip_minimize
+ if options.cachedir:
+ options.cachedir = os.path.abspath(options.cachedir)
try:
- creator.mount(options.base_on, os.path.abspath(options.cachedir))
+ creator.mount(options.base_on, options.cachedir)
creator.install()
creator.configure()
if options.give_shell:
commit 1435e38ad9dda0d5440e028a5f38fe2a3ccf8346
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Jan 13 09:23:43 2009 -0500
Use the explicit form for ppc (not sure how I missed it) - thanks to Bruno Wolf
diff --git a/imgcreate/live.py b/imgcreate/live.py
index d99659a..a6a9c46 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -663,7 +663,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
label=%(short)s
initrd=/ppc/ppc%(bit)s/initrd.img
read-only
- append="root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s"
+ append="root=CDLABEL=%(fslabel)s rootfstype=%(isofstype)s %(liveargs)s %(extra)s"
""" % args
15 years, 3 months
Can I do this safely?
by Janina Sajka
Now that I know Orca is working on Fedora's Live CD, I want to try an
installation from the Live Desktop. But, I need to be absolutely certain
I won't overwrite data on /dev/sdb1. Short of opening the box and
removing the power or data connectors for that disc, can I rely on the
installer to give me the option of where on my drives Fedora will be
installed? Do I get a chance to say: "Put it at /dev/sda1?"
Please pardon this rather basic question, but I have no experience of
this installer and the data on /dev/sdb1 is very important to me.
--
Janina Sajka, Phone: +1.202.595.7777;
sip:janina@CapitalAccessibility.Com
Partner, Capital Accessibility LLC http://CapitalAccessibility.Com
Marketing the Owasys 22C talking screenless cell phone in the U.S. and Canada
Learn more at http://ScreenlessPhone.Com
Chair, Open Accessibility janina(a)a11y.org
Linux Foundation http://a11y.org
15 years, 3 months
tools/livecd-iso-to-disk.sh
by Jeremy Katz
tools/livecd-iso-to-disk.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 5813114b6f5e2497764593eb1b2f645d06d2fbb0
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Thu Jan 15 00:57:44 2009 -0500
Fix for udev deprecated syntax (#480109)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 5371db1..fba2567 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -45,7 +45,7 @@ getdisk() {
return
fi
- p=$(udevinfo -q path -n $DEV)
+ p=$(udevadm info -q path -n $DEV)
if [ -e /sys/$p/device ]; then
device=$(basename /sys/$p)
else
@@ -131,7 +131,7 @@ createGPTLayout() {
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
/sbin/parted --script $device unit b mkpart '"EFI System Partition"' fat32 17408 $(($size - 17408)) set 1 boot on
USBDEV=${device}1
- /sbin/udevsettle
+ /sbin/udevadm settle
/sbin/mkdosfs -n LIVE $USBDEV
USBLABEL="UUID=$(/lib/udev/vol_id -u $dev)"
}
15 years, 3 months