SOURCES: linux-live-config.patch (NEW), linux-live-fixes.patch (NE...

glen glen at pld-linux.org
Tue Oct 3 11:35:13 CEST 2006


Author: glen                         Date: Tue Oct  3 09:35:13 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- my fixes

---- Files affected:
SOURCES:
   linux-live-config.patch (NONE -> 1.1)  (NEW), linux-live-fixes.patch (NONE -> 1.1)  (NEW), linux-live-modprobe.patch (NONE -> 1.1)  (NEW), linux-live-modules.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/linux-live-config.patch
diff -u /dev/null SOURCES/linux-live-config.patch:1.1
--- /dev/null	Tue Oct  3 11:35:13 2006
+++ SOURCES/linux-live-config.patch	Tue Oct  3 11:35:08 2006
@@ -0,0 +1,64 @@
+--- _broken-linux-live-5.5.0/config	2006-09-21 19:09:14.000000000 +0300
++++ linux-live-5.5.0/config	2006-09-27 01:47:53.000000000 +0300
+@@ -13,11 +13,24 @@
+ 
+ # change this variable if you installed your distro to some directory.
+ # for example ROOT=/tmp/newdir. You may leave it empty, then it defaults to /
+-ROOT=
++ROOT=/vservers/anaconda/root
+ 
+ # kernel version. Change it to "2.6.10" for example, if you are building
+ # LiveCD with a different kernel than the one you are actually running
+-KERNEL="`uname -r`"
++image=$(cd $ROOT; readlink boot/vmlinuz)
++KERNEL="${image#vmlinuz-}"
++
++initrddir="${ROOT%/root}/linux-live-$LINUX_LIVE_VERSION/initrd/kernel-modules/$KERNEL"
++if [ ! -d $initrddir ]; then
++	echo >&2 "Creating $initrd dir"
++	mkdir -p $initrddir
++	cp -af $ROOT/lib/modules/$KERNEL/kernel/fs/squashfs/squashfs.ko* $initrddir
++	if [ -f $ROOT/lib/modules/$KERNEL/kernel/fs/unionfs.ko* ]; then
++		cp -af $ROOT/lib/modules/$KERNEL/kernel/fs/unionfs.ko* $initrddir
++	else
++		cp -af $ROOT/lib/modules/$KERNEL/kernel/fs/unionfs/unionfs.ko* $initrddir
++	fi
++fi
+ 
+ # list of directories which will be modularized
+ # You may add 'dev' inthere in the case your distro doesn't have udev installed
+@@ -28,15 +41,15 @@
+-CDDATA=/tmp/live_data_$$
++CDDATA=../live_data_$$
+ 
+ # name of initrd image
+ INITRDIMG=initrd
+ 
+ # Enable debug by setting the following parameter to "logfile.log"
+-DEBUG=/tmp/linux-live-debug.log
++DEBUG=../linux-live-debug.log
+ 
+ # Install/uninstall all scripts from /tools to /usr/sbin and /usr/lib
+ # so the user is able to use all these commands while running his/her Live Linux
+ # Disable if your distro already contains installed linux live tools.
+-INSTALL_TOOLS=1
++INSTALL_TOOLS=0
+ 
+ # where to save resulting livecd ISO image
+-ISO_IMAGE=/tmp/livecd.iso
++ISO_IMAGE=${ISO_IMAGE:-/home/glen/livecd.iso}
+--- linux-live-5.5.0/runme.sh	2006-09-26 22:21:02.000000000 +0300
++++ _broken-linux-live-5.5.0/runme.sh	2006-09-21 20:07:07.000000000 +0300
+@@ -19,9 +19,9 @@
+ # search for kernel
+ VMLINUZ=$ROOT/boot/vmlinuz
+ if [ -L "$VMLINUZ" ]; then VMLINUZ=`readlink -f $VMLINUZ`; fi
+-echo -ne "Enter path for the kernel you wanna use [hit enter for $VMLINUZ]: "
+-read NEWKERNEL
+-if [ "$NEWKERNEL" != "" ]; then VMLINUZ="$NEWKERNEL"; fi
++#echo -ne "Enter path for the kernel you wanna use [hit enter for $VMLINUZ]: "
++#read NEWKERNEL
++#if [ "$NEWKERNEL" != "" ]; then VMLINUZ="$NEWKERNEL"; fi
+ if [ "`ls $VMLINUZ 2>>$DEBUG`" = "" ]; then echo "cannot find $VMLINUZ"; exit 1; fi
+ 
+ header "Creating LiveCD from your Linux"

================================================================
Index: SOURCES/linux-live-fixes.patch
diff -u /dev/null SOURCES/linux-live-fixes.patch:1.1
--- /dev/null	Tue Oct  3 11:35:13 2006
+++ SOURCES/linux-live-fixes.patch	Tue Oct  3 11:35:08 2006
@@ -0,0 +1,84 @@
+--- linux-live-5.5.0/config	2006-06-25 12:35:46.000000000 +0300
++++ linux-live-5.5.0.fixes/config	2006-08-30 00:17:26.000000000 +0300
+@@ -11,6 +11,10 @@
+ # also in the following files: ./cd-root/isolinux.cfg, ./cd-root/boot/DOS/config
+ RAM0SIZE=4444
+ 
++# change this variable if you installed your distro to some directory.
++# for example ROOT=/tmp/newdir. You may leave it empty, then it defaults to /
++ROOT=
++
+ # kernel version. Change it to "2.6.10" for example, if you are building
+ # LiveCD with a different kernel than the one you are actually running
+ KERNEL="`uname -r`"
+@@ -26,9 +30,13 @@
+ # name of initrd image
+ INITRDIMG=initrd
+ 
+-# change this variable if you installed your distro to some directory.
+-# for example ROOT=/tmp/newdir. You may leave it empty, then it defaults to /
+-ROOT=
+-
+ # Enable debug by setting the following parameter to "logfile.log"
+ DEBUG=/tmp/linux-live-debug.log
++
++# Install/uninstall all scripts from /tools to /usr/sbin and /usr/lib
++# so the user is able to use all these commands while running his/her Live Linux
++# Disable if your distro already contains installed linux live tools.
++INSTALL_TOOLS=1
++
++# where to save resulting livecd ISO image
++ISO_IMAGE=/tmp/livecd.iso
+--- linux-live-5.5.0/runme.sh	2006-06-25 12:35:50.000000000 +0300
++++ linux-live-5.5.0.fixes/runme.sh	2006-08-30 00:16:16.000000000 +0300
+@@ -11,14 +11,11 @@
+ cd $CHANGEDIR
+ 
+ . ./config || exit 1
+-./install $ROOT
+-
+ . liblinuxlive || exit 1
+ 
+ # only root can continue, because only root can read all files from your system
+ allow_only_root
+ 
+-
+ # search for kernel
+ VMLINUZ=$ROOT/boot/vmlinuz
+ if [ -L "$VMLINUZ" ]; then VMLINUZ=`readlink -f $VMLINUZ`; fi
+@@ -30,6 +27,10 @@
+ header "Creating LiveCD from your Linux"
+ echo "some debug information can be found in $DEBUG"
+ 
++if [ "$INSTALL_TOOLS" = 1 ]; then
++	./install $ROOT
++fi
++
+ mkdir -p $CDDATA/base
+ mkdir -p $CDDATA/modules
+ mkdir -p $CDDATA/optional
+@@ -66,7 +67,6 @@
+ 
+ echo "creating LiveCD ISO image..."
+ cd $CDDATA
+-./make_iso.sh /tmp/livecd.iso
++./make_iso.sh $ISO_IMAGE
+ 
+-cd /tmp
+-header "Your ISO is created in /tmp/livecd.iso"
++header "Your ISO is created in $ISO_IMAGE"
+--- _broken-linux-live-5.5.0/initrd/linuxrc	2006-09-26 18:37:04.000000000 +0300
++++ linux-live-5.5.0/initrd/linuxrc	2006-09-28 01:19:28.000000000 +0300
+@@ -176,9 +179,9 @@
+ mkdir -p $INITRAMDISK
+ if [ ! -e dev/console ]; then mknod dev/console c 5 1; fi
+ 
+-if [ -x $UNION/usr/sbin/chroot ];
+-  then CHROOT=/usr/sbin/chroot
+-  else CHROOT=/usr/bin/chroot
++if [ -x usr/sbin/chroot ];
++  then CHROOT=usr/sbin/chroot
++  else CHROOT=usr/bin/chroot
+ fi
+ 
+ header "linux live end, starting the Linux distribution"

================================================================
Index: SOURCES/linux-live-modprobe.patch
diff -u /dev/null SOURCES/linux-live-modprobe.patch:1.1
--- /dev/null	Tue Oct  3 11:35:13 2006
+++ SOURCES/linux-live-modprobe.patch	Tue Oct  3 11:35:08 2006
@@ -0,0 +1,66 @@
+--- _broken-linux-live-5.5.0/initrd/initrd_create	2006-09-26 17:45:45.000000000 +0300
++++ linux-live-5.5.0/initrd/initrd_create	2006-09-27 15:27:17.000000000 +0300
+@@ -109,7 +109,22 @@
+ ln -s busybox $INITRD_TREE/bin/cat
+ ln -s busybox $INITRD_TREE/bin/grep
+ ln -s busybox $INITRD_TREE/bin/sleep
++cp -a /bin/mawk $INITRD_TREE/bin/awk
+ ln -s bin $INITRD_TREE/sbin
++mkdir -p $INITRD_TREE/usr/share
++cp -a /usr/bin/pcidev $INITRD_TREE/bin
++cp -a /usr/share/pci-database $INITRD_TREE/usr/share
++rm -f $INITRD_TREE/lib/*
++rcopy /lib/ld-linux.so.2 $INITRD_TREE
++rcopy /lib/libc.so.6 $INITRD_TREE
++rcopy /lib/libblkid.so.1 $INITRD_TREE
++rcopy /lib/libuuid.so.1 $INITRD_TREE
++rcopy /lib/libz.so.1 $INITRD_TREE
++rcopy /lib/libm.so.6 $INITRD_TREE
++rcopy /lib/libdevmapper.so.1.02 $INITRD_TREE
++rcopy /lib/libselinux.so.1 $INITRD_TREE
++rcopy /lib/libsepol.so.1 $INITRD_TREE
++rcopy /lib/libdl.so.2 $INITRD_TREE
+ 
+ LMK="lib/modules/$KERNEL"
+ 
+--- _broken-linux-live-5.5.0/initrd/linuxrc	2006-09-26 18:37:04.000000000 +0300
++++ linux-live-5.5.0/initrd/linuxrc	2006-09-28 01:19:28.000000000 +0300
+@@ -157,5 +157,8 @@
+ fstab_update $UNION
+ 
++echolog "creating /etc/modprobe.conf"
++modprobe_update $UNION
++
+ # More likely these directories aren't there.
+ # Even if they are, this won't hurt.
+ # Even if they are, this won't hurt.
+--- _broken-linux-live-5.5.0/tools/liblinuxlive	2006-09-26 17:18:28.000000000 +0300
++++ linux-live-5.5.0/tools/liblinuxlive	2006-09-28 03:14:39.000000000 +0300
+@@ -367,6 +367,13 @@
+    list_partition_devices
+ }
+ 
++# List all network drivers
++#
++list_network_drivers()
++{
++	pcidev /m net
++}
++
+ # Find file-path on given device
+ # Mounts the device in $1 and returns path if found,
+ # else unmounts and exits
+@@ -561,0 +569,13 @@
++
++# create modprobe.conf file $1/etc/modprobe.conf with appropriate ethX module aliases
++# $1 = root directory (union)
++#
++modprobe_update()
++{
++	i=0
++	> $1/etc/modprobe.conf
++	for drv in $(list_network_drivers); do
++		echo "alias eth$i $drv" >> $1/etc/modprobe.conf
++		i=$((i+1))
++	done
++}

================================================================
Index: SOURCES/linux-live-modules.patch
diff -u /dev/null SOURCES/linux-live-modules.patch:1.1
--- /dev/null	Tue Oct  3 11:35:13 2006
+++ SOURCES/linux-live-modules.patch	Tue Oct  3 11:35:08 2006
@@ -0,0 +1,182 @@
+--- r/linux-live-5.5.0/config	2006-10-02 20:19:58.000000000 +0300
++++ linux-live-5.5.0/config	2006-09-29 15:30:28.000000000 +0300
+@@ -24,12 +24,21 @@
+ if [ ! -d $initrddir ]; then
+ 	echo >&2 "Creating $initrd dir"
+ 	mkdir -p $initrddir
+-	cp -af $ROOT/lib/modules/$KERNEL/kernel/fs/squashfs/squashfs.ko* $initrddir
+-	if [ -f $ROOT/lib/modules/$KERNEL/kernel/fs/unionfs.ko* ]; then
+-		cp -af $ROOT/lib/modules/$KERNEL/kernel/fs/unionfs.ko* $initrddir
+-	else
+-		cp -af $ROOT/lib/modules/$KERNEL/kernel/fs/unionfs/unionfs.ko* $initrddir
+-	fi
++	for mod in \
++		drivers/cdrom/cdrom \
++		drivers/ide/ide-cd \
++		drivers/ide/ide-core \
++		fs/isofs/isofs \
++		fs/squashfs/squashfs \
++		fs/unionfs \
++		fs/unionfs/unionfs \
++		fs/vfat/vfat \
++		lib/zlib_inflate/zlib_inflate \
++		; do
++		if [ -f $ROOT/lib/modules/$KERNEL/kernel/$mod.ko* ]; then
++			cp -af $ROOT/lib/modules/$KERNEL/kernel/$mod.ko* $initrddir
++		fi
++	done
+ fi
+ 
+ # list of directories which will be modularized
+--- r/linux-live-5.5.0/initrd/initrd_create	2006-10-02 20:19:58.000000000 +0300
++++ linux-live-5.5.0/initrd/initrd_create	2006-09-29 19:07:20.000000000 +0300
+@@ -8,6 +8,7 @@
+ # rcopy is a recursive cp, which copies also symlink's real source
+ # $1 = source (may be a regular file or symlink)
+ # $2 = target PARENT
++# $3 = optional PREFIX to strip from $1
+ #
+ rcopy()
+ {
+@@ -16,7 +17,11 @@
+       cp --parent -R "$REALPATH" "$2"
+       ln -sf "$REALPATH" "$2/$1"
+    else
+-      cp --parent -R "$1" "$2"
++	  if [ "$3" ]; then
++		  tar ${3:+-C "$3"} -cf - "${1#$3/}" | tar -C "$2" -xf -
++	  else
++		  cp --parent -R "$1" "$2"
++	  fi
+    fi
+    if [ "$?" -ne 0 ]; then
+       echo "---------------------------"
+@@ -31,11 +36,12 @@
+ # copy file/dir only if it exists, else skip with no error
+ # $1 = source (may not exist)
+ # $2 = target PARENT
++# $3 = optional PREFIX to strip from $1
+ #
+ rcopy_ex()
+ {
+    if [ -a "$1" ]; then
+-      rcopy "$1" "$2"
++      rcopy "$1" "$2" "$3"
+    fi
+ }
+ 
+@@ -130,34 +136,56 @@
+ 
+ #necessary modules and dependency files
+ mkdir -p $INITRD_TREE/$LMK/kernel/fs
+-cp kernel-modules/$KERNEL/unionfs.ko* $INITRD_TREE/$LMK/kernel/fs
+-cp kernel-modules/$KERNEL/squashfs.ko* $INITRD_TREE/$LMK/kernel/fs
++#cp kernel-modules/$KERNEL/*.ko* $INITRD_TREE/$LMK/kernel/fs
++#cp kernel-modules/$KERNEL/squashfs.ko* $INITRD_TREE/$LMK/kernel/fs
++#cp kernel-modules/$KERNEL/zlib_inflate.ko* $INITRD_TREE/$LMK/kernel/fs
+ 
++(
+ #copy filesystem modules, if not directly copied into kernel
+-rcopy_ex /$LMK/kernel/lib/zlib_inflate $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/lib/zlib_deflate $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/drivers/block/loop* $INITRD_TREE 2>>$DEBUG
+-
+-rcopy_ex /$LMK/kernel/fs/isofs $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/fs/fat $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/fs/vfat $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/fs/ntfs $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/fs/ext3 $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/fs/reiserfs $INITRD_TREE 2>>$DEBUG
++rcopy $ROOT/$LMK/kernel/lib/zlib_inflate $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/lib/zlib_deflate $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/block/loop.ko* $INITRD_TREE $ROOT
++
++rcopy $ROOT/$LMK/kernel/fs/isofs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/fat $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/vfat $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/ntfs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/ext3 $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/xfs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/exportfs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/reiserfs $INITRD_TREE $ROOT
+ 
+ # add language support for filesystems
+-rcopy_ex /$LMK/kernel/fs/nls/ $INITRD_TREE 2>>$DEBUG
++rcopy $ROOT/$LMK/kernel/fs/nls/nls_cp437.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/nls/nls_iso8859-1.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/nls/nls_iso8859-2.ko* $INITRD_TREE $ROOT
+ 
+ #usb modules
+-rcopy_ex /$LMK/kernel/drivers/usb/storage $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/drivers/usb/host/ehci-hcd* $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/drivers/usb/host/ohci-hcd* $INITRD_TREE 2>>$DEBUG
+-rcopy_ex /$LMK/kernel/drivers/usb/host/uhci-hcd* $INITRD_TREE 2>>$DEBUG
++rcopy $ROOT/$LMK/kernel/drivers/usb/core/usbcore.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/usb/storage $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/usb/host/ehci-hcd.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/usb/host/ohci-hcd.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/usb/host/uhci-hcd.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/usb/storage/libusual.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/scsi/scsi_mod.ko* $INITRD_TREE $ROOT
++#rcopy_ex $ROOT/$LMK/kernel/ $INITRD_TREE $ROOT
++
++rcopy $ROOT/$LMK/kernel/drivers/cdrom/cdrom.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/ide/ide-cd.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/ide/ide-core.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/ide/pci/piix.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/isofs/isofs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/squashfs $INITRD_TREE $ROOT
++#rcopy_ex $ROOT/$LMK/kernel/fs/squashfs/squashfs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/unionfs.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/fs/unionfs/unionfs $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/lib/zlib_inflate/zlib_inflate $INITRD_TREE $ROOT
+ 
+ #disk (scsi, ide, raid, pcmcia) modules
+ #rcopy_ex /$LMK/kernel/drivers/scsi $INITRD_TREE
+ #rcopy_ex /$LMK/kernel/drivers/ide $INITRD_TREE
+ #rcopy_ex /$LMK/kernel/drivers/pcmcia $INITRD_TREE
++) 2>>$DEBUG
+ 
+ if [ "$COMPRESS" = 1 ]; then
+    debug "gzipping kernel modules"
+--- r/linux-live-5.5.0/initrd/linuxrc	2006-10-02 20:19:58.000000000 +0300
++++ linux-live-5.5.0/initrd/linuxrc	2006-09-28 01:19:28.000000000 +0300
+@@ -185,6 +185,9 @@
+ fi
+ 
+ header "linux live end, starting the Linux distribution"
++
++$DEBUGCMD
++
+ pivot_root . $INITRAMDISK
+ exec $CHROOT . sbin/init <dev/console >dev/console 2>&1
+ 
+--- r/linux-live-5.5.0/tools/liblinuxlive	2006-10-02 20:19:58.000000000 +0300
++++ linux-live-5.5.0/tools/liblinuxlive	2006-09-29 18:04:58.000000000 +0300
+@@ -441,10 +441,13 @@
+ #
+ modprobe_essential_modules()
+ {
++   echolog "starting IDE device support"
++   modprobe_module piix
+    echolog "starting loop device support"
+    modprobe_module loop max_loop=255
+    echolog "starting cdrom filesystem support"
+    modprobe_module isofs
++   modprobe_module ide-cd
+    echolog "starting squashfs support"
+    modprobe_module squashfs
+    echolog "starting unionfs support"
+@@ -456,6 +459,12 @@
+    modprobe_module vfat
+    echolog "starting ntfs support"
+    modprobe_module ntfs
++   echolog "starting xfs support"
++   modprobe_module xfs
++   echolog "starting reiserfs support"
++   modprobe_module reiserfs
++   echolog "starting ext3 support"
++   modprobe_module ext3
+    create_block_devices
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list