F7 general question about livecd-creator and timezones
by Skunk Worx
My ks scripts have the timezone set to PDT (America/Los_Angeles).
Installation to a hard drive works as expected. PDT in startup and in
shells, etc.
Creating a livecd-creator iso with the same tz setting, then booting,
shows A/L_A in the /etc/sysconfig/clock file, as expected.
However the date is always EDT in the boot messages, shells, etc.
During startup I see :
(lvm)
Press I to enter interactive startup
Setting clock (utc) Mon Jun 4 00:12:59 EDT 2007
(udev)
I'm not clear on what is happening between lvm and udev in the Linux
startup sequence.
If someone could give me a hint about what to look for and where to look
for it I would appreciate the help.
---
John
14 years, 5 months
imgcreate/creator.py
by Jeremy Katz
imgcreate/creator.py | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
New commits:
commit f216bd2505d7de33028b229d57ca34735e86452d
Author: Daniel J Walsh <dwalsh(a)redhat.com>
Date: Fri Jan 30 16:55:15 2009 -0500
Support booleans
These changes to livecd-tools are needed to allow a rpm that sets booleans (xguest) to install
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 82db284..498f7e6 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -431,6 +431,13 @@ class ImageCreator(object):
os.symlink(src, self._instroot + dest)
os.umask(origumask)
+ def __getbooleans(self):
+ booleans = []
+ for i in selinux.security_get_boolean_names()[1]:
+ on = selinux.security_get_boolean_active(i)
+ booleans.append(("/booleans/%s" % i, "%d %d" % (on, on)))
+ return booleans
+
def __create_selinuxfs(self):
# if selinux exists on the host we need to lie to the chroot
if os.path.exists("/selinux/enforce"):
@@ -438,18 +445,18 @@ class ImageCreator(object):
# enforce=0 tells the chroot selinux is not enforcing
# policyvers=999 tell the chroot to make the highest version of policy it can
- files = (('/enforce', '0'),
- ('/policyvers', '999'))
- for (file, value) in files:
+
+ files = [('/enforce', '0'),
+ ('/policyvers', '999'),
+ ('/commit_pending_bools', ''),
+ ('/mls', str(selinux.is_selinux_mls_enabled()))]
+
+ for (file, value) in files + self.__getbooleans():
fd = os.open(selinux_dir + file, os.O_WRONLY | os.O_TRUNC | os.O_CREAT)
os.write(fd, value)
os.close(fd)
# we steal mls from the host system for now, might be best to always set it to 1????
- files = ("/mls",)
- for file in files:
- shutil.copyfile("/selinux" + file, selinux_dir + file)
-
# make /load -> /dev/null so chroot policy loads don't hurt anything
os.mknod(selinux_dir + "/load", 0666 | stat.S_IFCHR, os.makedev(1, 3))
@@ -466,13 +473,11 @@ class ImageCreator(object):
def __destroy_selinuxfs(self):
# if the system was running selinux clean up our lies
if os.path.exists("/selinux/enforce"):
- files = ('/enforce',
- '/policyvers',
- '/mls',
- '/load')
- for file in files:
+ for root, dirs, files in os.walk(self._instroot + "/selinux"):
+ if root == self._instroot + "/selinux":
+ continue
try:
- os.unlink(self._instroot + "/selinux" + file)
+ os.unlink(root)
except OSError:
pass
@@ -502,7 +507,7 @@ class ImageCreator(object):
self._mount_instroot(base_on)
- for d in ("/dev/pts", "/etc", "/boot", "/var/log", "/var/cache/yum", "/sys", "/proc", "/selinux"):
+ for d in ("/dev/pts", "/etc", "/boot", "/var/log", "/var/cache/yum", "/sys", "/proc", "/selinux/booleans"):
makedirs(self._instroot + d)
cachesrc = cachedir or (self.__builddir + "/yum-cache")
14 years, 8 months
Re: [Fedora-livecd-list] Building a Kiosk Live CD
by Clint Savage
On Thu, Jan 22, 2009 at 10:03 AM, Daniel J Walsh <dwalsh(a)redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Livecd is faking out SELinux to think that the machine is enable and
> implements some /selinux interfaces to cause the rpms, to think they are
> successful.
>
> When xguest tries to modify the booleans setting using setsebool,
> setsebool not only modifies the on disk policy it also attempts to
> change the running kernel. The /selinux/booleans interface was not
> faked out, so setsebool blows up causing xguest to not be installed.
>
> I have built xguest-1.0.6-8.fc10 in koji which uses semanage rather then
> setsebool to change the booleans. This should write the boolean
> settings to disk, and should allow xguest to be installed in a livecd.
>
> I am setting up an environment to test this out.
>
> Dan
So I was able to download the koji build of xguest tonight and attempt
a build of the LiveCD with xguest again, the same error appears. Any
luck on your side Dan?
Cheers,
Clint
14 years, 8 months
Re: [Fedora-livecd-list] Overlay File Health?
by Kam Salisbury
-----Original Message-----
From: Stewart Adam <maillist(a)diffingo.com>
Subj: Re: [Fedora-livecd-list] Overlay File Health?
Date: Tue Jan 27, 2009 9:45 am
Size: 1K
To: fedora-livecd-list(a)redhat.com
On 1/27/09 9:21 AM, Forrest Taylor wrote:
> On Wed, 2009-01-14 at 06:42 -0500, Kam Salisbury wrote:
>> How do I see how much space is used in the overlay file (Fedora USB)?
>>
>> [liveuser@localhost ~]$ df -h
>> Filesystem Size Used Avail Use% Mounted on
>> /dev/mapper/live-rw 3.0G 2.2G 771M 75% /
>> tmpfs 1013M 288K 1013M 1% /dev/shm
>> /dev/sdb1 15G 8.3G 6.8G 55% /mnt/live
>> varcacheyum 1013M 0 1013M 0% /var/cache/yum
>> /tmp 1013M 104K 1013M 1% /tmp
>> vartmp 1013M 0 1013M 0% /var/tmp
>>
>> The above command output does not seem to reflect the 2GB overlay.
>>
>> Is there a way to output "just" the overlay contents? Something like 'du -hs' (du shows what /dev/mapper shows).
>
> Kam,
>
> I wrote a script to check the status of the overlay (attached). I'll
> see if I can get it included for future use.
Has anyone else had the overlay become corrupted when it gets full? I had
this problem too... df -h said I had a bunch of free space so I installed
lots of extra packages but then I got a error message saying "read only
filesystem" I after that I couldn't run "rm" or even "ls". When I rebooted
from the USB key again, it complained about logical buffer errors and I had
to regenerate the overlay to fix it.
Stewart
--
Fedora-livecd-list mailing list
Fedora-livecd-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Hi Stewart, I am hoping to understand the issue enough to build a suitable application for montoring the overall overlay health including free space. Something simple such as green, yellow, red light in a task bar applet.
--
Kam
http://kamsalisbury.com
GPG key: FAF1751E
14 years, 8 months
Overlay File Health?
by Kam Salisbury
How do I see how much space is used in the overlay file (Fedora USB)?
[liveuser@localhost ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/live-rw 3.0G 2.2G 771M 75% /
tmpfs 1013M 288K 1013M 1% /dev/shm
/dev/sdb1 15G 8.3G 6.8G 55% /mnt/live
varcacheyum 1013M 0 1013M 0% /var/cache/yum
/tmp 1013M 104K 1013M 1% /tmp
vartmp 1013M 0 1013M 0% /var/tmp
The above command output does not seem to reflect the 2GB overlay.
Is there a way to output "just" the overlay contents? Something like 'du
-hs' (du shows what /dev/mapper shows).
--
Kam Salisbury
http://kamsalisbury.com
GPG key: FAF1751E
14 years, 8 months
Using both EFI and MBR at once on Live USB images
by Stewart Adam
Hi,
I've been trying to get the Fedora 10 Snapshot ISO to work boot via a USB key
on my MacBook Pro using the --mactel option, and while I think GRUB's EFI
image has a bug in it since no kernels boot [1], it gave me another idea.
I thought it would be pretty cool if we could synchronize the GPT and
MSDOS partition tables (complete with MBR), similar to how it's used in
BootCamp/rEFIt so that any given live media could be used with EFI or with
BIOS. I've packaged rEFIt [2] (which includes gptsync) but since there's
only one partition on the Live USB media, gptsync immediately says "nothing
to do" and exits. One way around this would be to use two-partitions on the
live media, but that would troublesome since Windows will only recognize the
first readable partition. The other way would be to patch gptsync and have
it translate the EFI partition to "FAT32" for the MSDOS partition table.
I'd like to hear your comments/feedback on this - Do you think it's a
feature worth spending time on? Any other ideas for workarounds?
Stewart
[1] https://bugzilla.redhat.com/show_bug.cgi?id=466954
[2] http://downloads.diffingo.com/refit-0.11-1.fc9.src.rpm
14 years, 8 months
tools/livecd-iso-to-disk.sh
by Jeremy Katz
tools/livecd-iso-to-disk.sh | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 90c15a1993e6356de4b0134bc018834a22ba6b59
Author: Stewart Adam <maillist(a)diffingo.com>
Date: Mon Jan 26 17:50:44 2009 -0500
Using both EFI and MBR at once on Live USB images and other misc. fixes
Good news - syslinux's gptmbr.bin is working fine. I was using the partition
type UUID, not its unique UUID. With this correction, things work fine when
booting with BIOS or EFI!
I've attached a patch which re-adds the check for gptmbr.bin and if it's
found, then the script will now automatically grab the partition's unique
UUID and write a compatible MBR. It should work on all drives with an LBA
size of 512 bytes.
The patch also includes a minor fix: If --format is specified and the user
has accepted the first warning by hitting <enter>, then it will
automatically unmount all partitions on the device so that the parted
commands don't fail.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index d37a2e9..85dba7e 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -71,10 +71,15 @@ resetMBR() {
# 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
+ gptmbr='/usr/lib/syslinux/gptmbr.bin'
elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
- cat /usr/share/syslinux/gptmbr.bin > $device
+ gptmbr='/usr/share/syslinux/gptmbr.bin'
+ else
+ echo "Could not find gptmbr.bin (syslinux)"
+ exitclean
fi
+ # our magic number is LBA-2, offset 16 - (512+512+16)/$bs
+ dd if=$device bs=16 skip=65 count=1 | cat $gptmbr - > $device
else
if [ -f /usr/lib/syslinux/mbr.bin ]; then
cat /usr/lib/syslinux/mbr.bin > $device
@@ -136,7 +141,7 @@ createGPTLayout() {
echo "WARNING: THIS WILL DESTROY ANY DATA ON $device!!!"
echo "Press Enter to continue or ctrl-c to abort"
read
-
+ umount ${device}? &> /dev/null
/sbin/parted --script $device mklabel gpt
partinfo=$(/sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -158,7 +163,7 @@ createMSDOSLayout() {
echo "WARNING: THIS WILL DESTROY ANY DATA ON $device!!!"
echo "Press Enter to continue or ctrl-c to abort"
read
-
+ umount ${device}? &> /dev/null
/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$//')
14 years, 8 months
[PATCH] localboot is available only in ISOLINUX and PXELINUX
by apevec@redhat.com
so it should be removed from sys/extlinux.cfg to avoid error message:
unknown keyword in syslinux.cfg
It is masked by the menu, shows up only with custom image builds where
isolinux.cfg is modified.
See http://syslinux.zytor.com/wiki/index.php/SYSLINUX#LOCALBOOT_type_.5BISOLI...
Signed-off-by: Alan Pevec <apevec(a)redhat.com>
---
tools/livecd-iso-to-disk.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index d37a2e9..364deb1 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -544,6 +544,9 @@ echo "Updating boot config file"
# adjust label and fstype
sed -i -e "s/CDLABEL=[^ ]*/$USBLABEL/" -e "s/rootfstype=[^ ]*/rootfstype=$USBFS/" $BOOTCONFIG
if [ -n "$kernelargs" ]; then sed -i -e "s/liveimg/liveimg ${kernelargs}/" $BOOTCONFIG ; fi
+# localboot is available only in ISOLINUX and PXELINUX
+# http://syslinux.zytor.com/wiki/index.php/SYSLINUX#LOCALBOOT_type_.5BISOLI...
+sed -i -e '/label local/d' -e '/localboot 0xffff/d' $BOOTCONFIG
if [ "$overlaysizemb" -gt 0 ]; then
echo "Initializing persistent overlay file"
--
1.6.0.6
14 years, 8 months
Re: [Fedora-livecd-list] Anyone using the overlay file?
by Daire Byrne
----- "Jeremy Katz" <katzj(a)redhat.com> wrote:
> > We use "aufs" to union a COW filesystem for our custom "Live"
> system. It does seem a little odd that many of the other distros now
> use a union filesystem approach to LiveCDs and NFS read-only roots but
> Fedora has for the time being stayed away from it. It's not like there
> isn't lots of custom stuff being put into fedora/redhat kernels that
> isn't yet upstream. In fact there was a discussion about getting
> UnionFS upstream recently on the kernel list....
>
> A discussion that went nowhere fast. Just like every previous
> discussion of unionfs. And actually, we're _very_ resistent to
> adding not-upstreamed stuff into the Fedora kernels. Things that are in an
> appropriate staging tree? Yeah. But unionfs isn't even there
I have been playing around with the 2.6.28 fc10 kernel from Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=79697
It looks like it has the UnionFS patches included. Maybe it'll drop out of a
final release though.
Daire
14 years, 8 months
Re: [Fedora-livecd-list] Anyone using the overlay file?
by Daire Byrne
----- "Jeremy Katz" <katzj(a)redhat.com> wrote:
> Not usefully -- you can string together some 'dm table' commands and
> get the number of blocks used but it requires being root and also had
> some oddities.
>
> My kingdom for an upstreamable unionfs :/
We use "aufs" to union a COW filesystem for our custom "Live" system. It does seem a little odd that many of the other distros now use a union filesystem approach to LiveCDs and NFS read-only roots but Fedora has for the time being stayed away from it. It's not like there isn't lots of custom stuff being put into fedora/redhat kernels that isn't yet upstream. In fact there was a discussion about getting UnionFS upstream recently on the kernel list....
Saying all this the dm-snapshot approach will be more efficient space wise as it works with blocks instead of whole files.
Daire
14 years, 8 months