public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Fedora 7 based Systemtap LiveCD for i686 machines
@ 2007-06-06 22:02 William Cohen
  2007-06-08 18:53 ` William Cohen
       [not found] ` <4669D266.6090304@us.ibm.com>
  0 siblings, 2 replies; 6+ messages in thread
From: William Cohen @ 2007-06-06 22:02 UTC (permalink / raw)
  To: SystemTAP

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

Hi All,

I have been working on a Fedora 7 based liveCD that can be used for
the OLS tutorial.  The process of generating the livecd is getting a
bit easier now that livecd-creator can use a kickstart file to
generate the iso image. I started with the
/usr/share/livecd-tools/livecd-fedora-desktop.ks, verified that I
could build a live CD (and a live usb key flash). Then added the RPMs
for systemtap (systemtap, kernel-devel, kernel-debuginfo). These
additional RPMs pushed the size well over the 700MB limit for a CDROM
(about 1GB). I used to USB flash key to veryify that I could boot the
image and run systemtap. I then started editing the list of packages
on the image to reduce the image size under the 700MB limit.  I ended
up using "yum remove [rpm package]" (with question "n") to determine what
other packages were dependent on a that RPM and ended up with a 687MB
image.

The resulting iso image has been uploaded for other people to test out
at:

ftp://sourceware.redhat.com/pub/systemtap/livecds/Fedora-7-systemtap-20070606.iso

For more information about the livecd tools and creating a livecd:

http://fedoraproject.org/wiki/FedoraLiveCD

Attached is the kickstart file (livecd-fedora-7-staptut7.ks) used to
create the livecd on a F7 machine. The following command was run as root to
create the image:

livecd-creator   --config=livecd-fedora-7-staptut8.ks  \
--fslabel=Fedora-7-systemtap-20070606 >& build_stap8.log

Please give it a try and let me know whether how it works.

-Will


[-- Attachment #2: livecd-fedora-7-staptut8.ks --]
[-- Type: text/plain, Size: 4380 bytes --]

lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --disabled
repo --name=f7 --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os
repo --name=d7 --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/debug/
xconfig --startxonboot
services --enabled=NetworkManager,dhcdbd --disabled=network,sshd

%packages
# basic desktop packages
@graphical-internet
#@graphics
#@sound-and-video
@gnome-desktop
@base-x
#@games
@base
@core
@admin-tools
#@dial-up
@hardware-support
#@printing
syslinux
kernel

-scim*

-m17n-*

-fonts-*

# dictionaries are big
-aspell-*
-m17n-db-*
-man-pages-*
# gimp help is huge
-gimp-help
# lose the compat stuff
-compat*

# space sucks
-gnome-user-docs
-specspo
-esc
-samba-client
-a2ps
-vino
-redhat-lsb
-sox
-tomboy

# smartcards won't really work on the livecd.  and we _need_ space
-coolkey
-ccid

# duplicate functionality
-pinfo
-vorbis-tools
-wget


# scanning takes quite a bit of space :/
-xsane
-xsane-gimp

# while hplip requires pyqt, it has to go
-hplip

# added games
#monkey-bubble
#ppracer

# we don't include @office so that we don't get OOo.  but some nice bits
#abiword
#gnumeric
evince
#gnome-blog
#planner

# lots of people want...
gparted
ntfs-3g
ntfsprogs

# livecd bits to set up the livecd and be able to install
anaconda
anaconda-runtime

## make sure debuginfo doesn't end up on the live image
#-*debuginfo

# Material added for OLS systemtap tutorial
kernel-devel
kernel-debuginfo
systemtap

#stuff removed to make more room for OLS systemtap tutorial
-mono-*
-beagle-*
-libbeagle
-telnet-*
-libpurple
-nautilus-sendto
-pidgin-*
-evolution
-anthy-*
-ghostscript
-gutenprint
-gutenprint-foomatic
-ImageMagick
-hal-cups-utils
-cups*
-libgnomecups
-gphoto2

-gthumb
-gnome-session
-gnome-volume-manager

-foomatic
-desktop-printing
-hal-cups-utils
-system-config-printer
-system-config-printer-libs
-nautilus
-ekiga

-gucharmap
-gedit

-urw-fonts
-system-config-lvm

-file-roller
-eog
-dejavu-lgc-fonts


# FIXME would prefer not to remove the assistive technology support
-festival
-festvox-slt-arctic-hts
-festival-speechtools-libs
-gnome-speech
-gok
-orca

%post
# FIXME: it'd be better to get this installed from a package
cat > /etc/rc.d/init.d/fedora-live << EOF
#!/bin/bash
#
# live: Init script for live image
#
# chkconfig: 345 00 99
# description: Init script for live image.

. /etc/init.d/functions

if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-configured ] ; then
    exit 0
fi

exists() {
    which \$1 >/dev/null 2>&1 || return
    \$*
}

touch /.liveimg-configured

# mount live image
if [ -b /dev/live ]; then
   mkdir -p /mnt/live
   mount -o ro /dev/live /mnt/live
fi

# configure X
exists system-config-display --noui --reconfig --set-depth=24

# unmute sound card
exists alsaunmute 0 2> /dev/null

# add fedora user with no passwd
useradd -c "Fedora Live" fedora
passwd -d fedora > /dev/null
# disable screensaver locking
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null
# set up timed auto-login for after 60 seconds
sed -i -e 's/\[daemon\]/[daemon]\nTimedLoginEnable=true\nTimedLogin=fedora\nTimedLoginDelay=60/' /etc/gdm/custom.conf
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
    cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png /home/fedora/.face
    chown fedora:fedora /home/fedora/.face
    # TODO: would be nice to get e-d-s to pick this one up too... but how?
fi

# turn off firstboot for livecd boots
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

# don't start yum-updatesd for livecd boots
chkconfig --level 345 yum-updatesd off

# don't start cron/at as they tend to spawn things which are
# disk intensive that are painful on a live image
chkconfig --level 345 crond off
chkconfig --level 345 atd off
chkconfig --level 345 anacron off
chkconfig --level 345 readahead_early off
chkconfig --level 345 readahead_later off

# Stopgap fix for RH #217966; should be fixed in HAL instead
touch /media/.hal-mtab
EOF
chmod 755 /etc/rc.d/init.d/fedora-live
/sbin/restorecon /etc/rc.d/init.d/fedora-live
/sbin/chkconfig --add fedora-live

# save a little bit of space at least...
rm -f /boot/initrd*

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fedora 7 based Systemtap LiveCD for i686 machines
  2007-06-06 22:02 Fedora 7 based Systemtap LiveCD for i686 machines William Cohen
@ 2007-06-08 18:53 ` William Cohen
  2007-06-10 15:45   ` Frank Ch. Eigler
       [not found] ` <4669D266.6090304@us.ibm.com>
  1 sibling, 1 reply; 6+ messages in thread
From: William Cohen @ 2007-06-08 18:53 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

William Cohen wrote:
> Hi All,
> 
> I have been working on a Fedora 7 based liveCD that can be used for
> the OLS tutorial.  The process of generating the livecd is getting a
> bit easier now that livecd-creator can use a kickstart file to
> generate the iso image. I started with the
> /usr/share/livecd-tools/livecd-fedora-desktop.ks, verified that I
> could build a live CD (and a live usb key flash). Then added the RPMs
> for systemtap (systemtap, kernel-devel, kernel-debuginfo). These
> additional RPMs pushed the size well over the 700MB limit for a CDROM
> (about 1GB). I used to USB flash key to veryify that I could boot the
> image and run systemtap. I then started editing the list of packages
> on the image to reduce the image size under the 700MB limit.  I ended
> up using "yum remove [rpm package]" (with question "n") to determine what
> other packages were dependent on a that RPM and ended up with a 687MB
> image.
> 
> The resulting iso image has been uploaded for other people to test out
> at:
> 
> ftp://sourceware.redhat.com/pub/systemtap/livecds/Fedora-7-systemtap-20070606.iso 
> 
> 
> For more information about the livecd tools and creating a livecd:
> 
> http://fedoraproject.org/wiki/FedoraLiveCD
> 
> Attached is the kickstart file (livecd-fedora-7-staptut7.ks) used to
> create the livecd on a F7 machine. The following command was run as root to
> create the image:
> 
> livecd-creator   --config=livecd-fedora-7-staptut8.ks  \
> --fslabel=Fedora-7-systemtap-20070606 >& build_stap8.log
> 
> Please give it a try and let me know whether how it works.
> 
> -Will

There was a question on how much memory is used by the fedora 7 stap livecd when 
running.  This was done on a IBM thinkpad t41 laptop with 512MB of RAM.  Here is 
the output of "free" when just one terminal open on the GUI after boot up:

              total       used       free     shared    buffers     cached
Mem:        514712     508852       5860          0      61552     330872
-/+ buffers/cache:     116428     398284
Swap:            0          0          0


There is still lots of memory available. Output of free when running the an 
example from the /usr/share/docs/systemtap-0.5.13 directory (kmalloc2.stp) still 
shows a fair amount of memory available.

              total       used       free     shared    buffers     cached
Mem:        514712     490568      24144          0      48304     300488
-/+ buffers/cache:     141776     372936
Swap:            0          0          0

Given that the livecd doesn't mount swap, it is possible that for some examples 
to get oom kills if there is a large amount of debug information pulled in by 
the translator.

-Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fedora 7 based Systemtap LiveCD for i686 machines
  2007-06-08 18:53 ` William Cohen
@ 2007-06-10 15:45   ` Frank Ch. Eigler
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2007-06-10 15:45 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

William Cohen <wcohen@redhat.com> writes:

> [...]  There was a question on how much memory is used by the fedora
> 7 stap livecd when running.  [...]

I've had good experiences on a i686 vmware run with ~800MB virtual
RAM.  I didn't try too hard, but I couldn't make the thing crash.  The
worst I got were probe overload errors and slow cleanups.

- FChE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fedora 7 based Systemtap LiveCD for i686 machines
       [not found]       ` <466D99BB.7070502@redhat.com>
@ 2007-06-11 19:09         ` Mike Mason
  2007-06-11 19:44           ` William Cohen
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Mason @ 2007-06-11 19:09 UTC (permalink / raw)
  To: William Cohen, SystemTAP

Moving this thread to the systemtap list...

William Cohen wrote:
> Mike Mason wrote:
>> Hi Will,
>>
>> I tried the live CD on another Windows-only laptop and had no problems 
>> rebooting back to Windows.  I did it several times.  I guess we 
>> shouldn't worry about it for now.
> 
> Hmmm. All the machine I have are dual boot, so I can't verify this 
> problem. I guess we won't worry about this.

For those new to this thread, I had a problem a couple times when I ran a live CD on a Windows-only system.  The live CD ran fine, but I couldn't boot back to Windows.  However, my latest test worked fine.  We've had no problems with linux-only and dual-boot systems. We've decided not to worry about this for now.  It's not clear it's a real problem.  Plus it's unlikely OLS attendees will bring Windows-only laptops.

> 
>> I noticed that the sockets tapset doesn't contain the fix I made that 
>> allows it to work with later kernels.  If we can't include a later 
>> systemtap rpm, then I'll just update socket.stp with my examples rpm.  
>> Does that sound okay?  I'll also probably install the 
>> tutorial-specific examples under /usr/share/doc/systemtap-0.5.13.  I'd 
>> like to get people used to looking there.
> 
> Yes, just be sure to have an example that works. We can put all the 
> examples together in an rpm.

Will do.

> 
>>
>> I was going to ask if we could include the kernel source and cscope, 
>> but I realize that's out of the question.  The kernel source alone is 
>> 437 MB!
>>
>> Regards,
>> Mike
> 
> The source is already in the debuginfo rpm. However, I don't know about 
> getting the cscope information in there. It isn't in an rpm. Generating 
> the stuff on the fly probably won't work too well either.

I don't see any source coming from the debuginfo rpm.  Where is it located?

> 
> -Will
> 
> PS could we take this discussion to the public mailing list?
> 

np, moving to the public list as of this message.

Mike

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fedora 7 based Systemtap LiveCD for i686 machines
  2007-06-11 19:09         ` Mike Mason
@ 2007-06-11 19:44           ` William Cohen
  2007-06-11 20:04             ` Mike Mason
  0 siblings, 1 reply; 6+ messages in thread
From: William Cohen @ 2007-06-11 19:44 UTC (permalink / raw)
  To: Mike Mason; +Cc: SystemTAP

Mike Mason wrote:
> Moving this thread to the systemtap list...
> 
> William Cohen wrote:
>> Mike Mason wrote:
>>> Hi Will,
>>>
>>> I tried the live CD on another Windows-only laptop and had no 
>>> problems rebooting back to Windows.  I did it several times.  I guess 
>>> we shouldn't worry about it for now.
>>
>> Hmmm. All the machine I have are dual boot, so I can't verify this 
>> problem. I guess we won't worry about this.
> 
> For those new to this thread, I had a problem a couple times when I ran 
> a live CD on a Windows-only system.  The live CD ran fine, but I 
> couldn't boot back to Windows.  However, my latest test worked fine.  
> We've had no problems with linux-only and dual-boot systems. We've 
> decided not to worry about this for now.  It's not clear it's a real 
> problem.  Plus it's unlikely OLS attendees will bring Windows-only laptops.
> 
>>
>>> I noticed that the sockets tapset doesn't contain the fix I made that 
>>> allows it to work with later kernels.  If we can't include a later 
>>> systemtap rpm, then I'll just update socket.stp with my examples 
>>> rpm.  Does that sound okay?  I'll also probably install the 
>>> tutorial-specific examples under /usr/share/doc/systemtap-0.5.13.  
>>> I'd like to get people used to looking there.
>>
>> Yes, just be sure to have an example that works. We can put all the 
>> examples together in an rpm.
> 
> Will do.
> 
>>
>>>
>>> I was going to ask if we could include the kernel source and cscope, 
>>> but I realize that's out of the question.  The kernel source alone is 
>>> 437 MB!
>>>
>>> Regards,
>>> Mike
>>
>> The source is already in the debuginfo rpm. However, I don't know 
>> about getting the cscope information in there. It isn't in an rpm. 
>> Generating the stuff on the fly probably won't work too well either.
> 
> I don't see any source coming from the debuginfo rpm.  Where is it located?

What I said wasn't quite true. The .c and .h files are around. However, the make 
and script files are not there. Take a look in /usr/src/debug/kernel-2.6.21 (or 
similar directory).

-Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fedora 7 based Systemtap LiveCD for i686 machines
  2007-06-11 19:44           ` William Cohen
@ 2007-06-11 20:04             ` Mike Mason
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Mason @ 2007-06-11 20:04 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

William Cohen wrote:
> Mike Mason wrote:

[snip]

>>>
>>> The source is already in the debuginfo rpm. However, I don't know 
>>> about getting the cscope information in there. It isn't in an rpm. 
>>> Generating the stuff on the fly probably won't work too well either.
>>
>> I don't see any source coming from the debuginfo rpm.  Where is it 
>> located?
> 
> What I said wasn't quite true. The .c and .h files are around. However, 
> the make and script files are not there. Take a look in 
> /usr/src/debug/kernel-2.6.21 (or similar directory).

Oops, I forgot about kernel-debuginfo-common.  That's where the source comes from.  

I actually was able to do a "yum install cscope", then run "cscope -R" on the kernel source and it worked fine.  All that running the live CD on a 512MB laptop.  If there's room, can we add the cscope rpm to the live CD?  We can just build the cscope database on the fly if needed.

Thanks,
Mike

> 
> -Will
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-11 20:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06 22:02 Fedora 7 based Systemtap LiveCD for i686 machines William Cohen
2007-06-08 18:53 ` William Cohen
2007-06-10 15:45   ` Frank Ch. Eigler
     [not found] ` <4669D266.6090304@us.ibm.com>
     [not found]   ` <466AB438.40506@redhat.com>
     [not found]     ` <466D9119.6080702@us.ibm.com>
     [not found]       ` <466D99BB.7070502@redhat.com>
2007-06-11 19:09         ` Mike Mason
2007-06-11 19:44           ` William Cohen
2007-06-11 20:04             ` Mike Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).