Author: alexander
Date: 2005-05-11 21:53:33 -0600 (Wed, 11 May 2005)
New Revision: 139
Added:
branches/unionfs/packages/lfs-bootscripts/udev
Modified:
branches/unionfs/TODO
branches/unionfs/etc/fstab
branches/unionfs/initramfs/Makefile
branches/unionfs/initramfs/init
branches/unionfs/packages/lfs-bootscripts/Makefile
Log:
Removed tmpfs redundancy. Allowed the user to change tmpfs size by remounting
/dev/shm after login. This change is experimental and can result in a kernel
oops if a user touches files in /dev/shm/.overlay directly.
Modified: branches/unionfs/TODO
===================================================================
--- branches/unionfs/TODO 2005-05-12 03:33:16 UTC (rev 138)
+++ branches/unionfs/TODO 2005-05-12 03:53:33 UTC (rev 139)
@@ -8,7 +8,6 @@
* Menus and background for xfce
* Add some Greek TrueType fonts.
* Remove Bitstream Vera, adjust /etc/fonts/fonts.conf accordingly
-* There are THREE instances of tmpfs: /.tmpfs, /dev, /dev/shm. Are all of them
needed?
* Ask someone how to use USB to serial converters. Add support to the kernel.
* Find out why via-agp.ko doesn't load properly here
* Find out exact requirements for Intel framebuffer
Modified: branches/unionfs/etc/fstab
===================================================================
--- branches/unionfs/etc/fstab 2005-05-12 03:33:16 UTC (rev 138)
+++ branches/unionfs/etc/fstab 2005-05-12 03:53:33 UTC (rev 139)
@@ -5,6 +5,6 @@
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
-tmpfs /dev/shm tmpfs defaults 0 0
+# tmpfs /dev/shm tmpfs defaults 0 0
# End /etc/fstab
Modified: branches/unionfs/initramfs/Makefile
===================================================================
--- branches/unionfs/initramfs/Makefile 2005-05-12 03:33:16 UTC (rev 138)
+++ branches/unionfs/initramfs/Makefile 2005-05-12 03:53:33 UTC (rev 139)
@@ -9,8 +9,8 @@
KLIBC= /usr/lib/klibc
initramfs_data.cpio.gz: init
- mkdir -p $(WD)/{dev,bin,lib,.cdrom,.sqfs,.tmpfs,.union}
- $(CP) $(KLIBC)/bin/{insmod,isoinfo,losetup,mount,run-init,sh,sleep}
$(WD)/bin
+ mkdir -p $(WD)/{dev,bin,lib,.tmpfs,.union}
+ $(CP)
$(KLIBC)/bin/{insmod,isoinfo,losetup,mkdir,mount,run-init,sh,sleep} $(WD)/bin
$(CP) $(KLIBC)/lib/klibc-*.so $(WD)/lib
$(CP) /lib/modules/$(KVERS)/kernel/fs/unionfs.ko $(WD)/lib
$(CP) init $(WD)
Modified: branches/unionfs/initramfs/init
===================================================================
--- branches/unionfs/initramfs/init 2005-05-12 03:33:16 UTC (rev 138)
+++ branches/unionfs/initramfs/init 2005-05-12 03:53:33 UTC (rev 139)
@@ -23,10 +23,20 @@
echo "LFS Live CD is $CDROM"
fi
-mount -w -t tmpfs -o mode=755,size=90% tmpfs /.tmpfs
-mount -r -t iso9660 $CDROM /.cdrom
-losetup /dev/loop0 /.cdrom/root.sqfs
-mount -r -t squashfs /dev/loop0 /.sqfs
+mount -w -t tmpfs -o size=90% tmpfs /.tmpfs
+mkdir /.tmpfs/.overlay
+
+# Probably redundant, but might be useful in the future for ejecting the CD
+mkdir /.tmpfs/.overlay/dev
+mkdir /.tmpfs/.overlay/dev/shm
+mkdir /.tmpfs/.overlay/proc
+
+mkdir /.tmpfs/.cdrom
+mkdir /.tmpfs/.sqfs
+mount -r -t iso9660 $CDROM /.tmpfs/.cdrom
+losetup /dev/loop0 /.tmpfs/.cdrom/root.sqfs
+mount -r -t squashfs /dev/loop0 /.tmpfs/.sqfs
insmod /lib/unionfs.ko
-mount -w -t unionfs -o dirs=/.tmpfs=rw:/.cdrom=ro:/.sqfs=ro unionfs /.union
+mount -w -t unionfs -o
dirs=/.tmpfs/.overlay=rw:/.tmpfs/.cdrom=ro:/.tmpfs/.sqfs=ro unionfs /.union
+mount -o move /.tmpfs /.union/dev/shm
exec run-init /.union /sbin/init
Modified: branches/unionfs/packages/lfs-bootscripts/Makefile
===================================================================
--- branches/unionfs/packages/lfs-bootscripts/Makefile 2005-05-12 03:33:16 UTC
(rev 138)
+++ branches/unionfs/packages/lfs-bootscripts/Makefile 2005-05-12 03:53:33 UTC
(rev 139)
@@ -23,8 +23,9 @@
mv $(FILE) $(SRC) ; fi
@if [ ! -f /etc/rc.d/init.d/functions ] ; then tar xjvf ${SRC}/${FILE}
&& \
cd ${DIR} && make install-livecd && \
- install -m 755 lfs/init.d/{mountkernfs,udev} /etc/rc.d/init.d && \
+ install -m 755 lfs/init.d/mountkernfs /etc/rc.d/init.d && \
ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernks && \
+ install -m 755 ../udev /etc/rc.d/init.d/ && \
ln -sf ../init.d/udev /etc/rc.d/rcsysinit.d/S10udev && \
install -m 755 ../mountfs /etc/rc.d/init.d/ && \
ln -sf ../init.d/mountfs /etc/rc.d/rcsysinit.d/S40mountfs && \
Added: branches/unionfs/packages/lfs-bootscripts/udev
===================================================================
--- branches/unionfs/packages/lfs-bootscripts/udev 2005-05-12 03:33:16 UTC
(rev 138)
+++ branches/unionfs/packages/lfs-bootscripts/udev 2005-05-12 03:53:33 UTC
(rev 139)
@@ -0,0 +1,57 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/udev
+#
+# Description : Udev cold-plugging script
+#
+# Authors : Zack Winkles
+#
+# Version : 00.01
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+# Create some things that sysfs does not, and should not export for us. Feel
+# free to add devices to this list.
+make_extra_nodes() {
+ ln -s /proc/self/fd /dev/fd
+ ln -s /proc/self/fd/0 /dev/stdin
+ ln -s /proc/self/fd/1 /dev/stdout
+ ln -s /proc/self/fd/2 /dev/stderr
+ ln -s /proc/kcore /dev/core
+ mkdir /dev/pts
+}
+
+case "${1}" in
+ start)
+ boot_mesg "Populating /dev with device nodes..."
+
+ # Assign udevsend to get hotplug events. udevsend can manage
the whole
+ # hotplug handling by taking over the kernel spawned event
process
+ echo /sbin/udevsend > /proc/sys/kernel/hotplug
+
+ # Populate /dev with all the devices that are already available,
+ # and save it's status so we can report failures.
+ udevstart || failed=1
+
+ # Now, create some required files/directories/devices that sysfs
+ # doesn't export for us.
+ make_extra_nodes
+
+ # When reporting the status, base it on the success or failure
+ # of the `udevstart' command, since that's the most important.
+ (exit ${failed})
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/udev
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page