Author: alexander
Date: 2006-09-05 21:41:57 -0600 (Tue, 05 Sep 2006)
New Revision: 1718
Added:
branches/6.2/doc/lfscd-remastering-howto.txt
Removed:
branches/6.2/packages/livecd-bootscripts/customize
Modified:
branches/6.2/doc/README
branches/6.2/packages/livecd-bootscripts/Makefile
trunk/Makefile
Log:
Not everyone's BIOS handles multisession bootable CDs correctly.
Thus, the method to customize the CD contents using a second session has
been dropped in favour of proper remastering.
Modified: branches/6.2/doc/README
===================================================================
--- branches/6.2/doc/README 2006-09-05 13:10:57 UTC (rev 1717)
+++ branches/6.2/doc/README 2006-09-06 03:41:57 UTC (rev 1718)
@@ -141,32 +141,12 @@
===========================
It is possible to burn a customized version of the official Linux From
Scratch LiveCD, with your own files added. To do that, follow the
-instructions below.
+instructions in the /root/lfscd-remastering-howto.txt file.
-* Burn the official CD in multi session mode:
- cdrecord dev=/dev/cdrom -v -multi -tao lfslivecd-[version].iso
-
-* Prepare a directory with the files you want to add, delete or change:
- mkdir second-session && cd second-session
- vim path/to/new-file
- vim path/to/file-to-be-changed
- echo path/to/file1-to-be-deleted >.delete
- echo path/to/file2-to-be-deleted >>.delete
- cd ..
-
-* Make an image contatining those files:
- mkisofs -l -M lfslivecd-[version].iso \
- -C `cdrecord -msinfo dev=/dev/cdrom` \
- -R -o second-session.iso second-session
-
-* Append the image you just created to the official Linux From Scratch
- LiveCD:
- cdrecord dev=/dev/cdrom -v -multi -tao second-session.iso
-
AUTOSSHD
============================
It is possible to start the sshd daemon automatically upon boot. To do that,
-you have to customize the CD as described above. Add the following files:
+you have to customize the CD. Modify the following files:
* /.autosshd
This is the file that indicates that the sshd daemon should be
@@ -191,7 +171,7 @@
section "7.12. Configuring the network Script".
* /etc/udev/rules.d/50-network.rules
- Create an empty file in order to prevent udev from running dhcpcd.
+ Remove this file in order to prevent udev from running dhcpcd.
INTERNATIONALIZATION
============================
Added: branches/6.2/doc/lfscd-remastering-howto.txt
===================================================================
--- branches/6.2/doc/lfscd-remastering-howto.txt
(rev 0)
+++ branches/6.2/doc/lfscd-remastering-howto.txt 2006-09-06 03:41:57 UTC
(rev 1718)
@@ -0,0 +1,172 @@
+
+AUTHOR: Alexander E. Patrakov <[EMAIL PROTECTED]>, Sylvie
Migneault <[EMAIL PROTECTED]>
+
+DATE: 2006-08-06
+
+LICENSE: GNU Free Documentation License Version 1.2
+
+SYNOPSIS: lfscd-remastering-HOWTO, for LFS LiveCD version 6.2-x
+
+DESCRIPTION: This is a guide that will show you how to remaster LFS
liveCD-x86-6.2-x
+
+PREREQUISITES: LFS LiveCD 6.2-x.
+
+For LFS LiveCD 6.1-x, see the old "lfscd-remastering-howto-6.1.txt" hint by
+Sylvie Migneault. For LFS LiveCD 6.1.1-x, the old hint should work if one
+globally replaces LFS_CD with lfslivecd-VERSION, e.g. lfslivecd-x86-6.1.1-3
+
+HINT:
+
+You will need:
+
+ * Any Linux system with loop device, CD-ROM and ISO9660 filesystem support.
+ * 3 GB of free hard disk space on one partition.
+
+This hint uses the $WORK environment variable as a name of a directory on that
+partition. E.g.:
+ export WORK=/mnt/lfslivecd
+
+The LiveCD uses the ISO9660 filesystem with Linux-specific transparent
+decompression extension. On that filesystem, there are the following files:
+
+ boot/*
+ root.ext2
+
+The boot directory contains the Linux kernel, the initramfs image and the
+bootloader. The actual root filesystem (ext2) is in the root.ext2 file.
+
+In order to remaster the CD, you have to install the following packages:
+
+cdrtools-2.01:
+ see the BLFS book
+
+zisofs-tools-1.0.6:
+ Download from http://www.kernel.org/pub/linux/utils/fs/zisofs/
+ Build with ./configure --prefix=/usr && make && make install
+
+Mount the CD:
+ mount /media/cdrom
+
+Look at the root.ext2 file size:
+ ls -l /media/cdrom/root.ext2
+
+If it is approximately 1.5 GB, the kernel uncompresses the CD for you. In
+this case, you can copy the file to your hard disk as usual:
+ cp /media/cdrom/root.ext2 $WORK/root.ext2
+
+If it is only 500 MB, you have to rebuild your kernel with ZISOFS support, or
+uncompress this file manually:
+ mkzftree -u -F /media/cdrom/root.ext2 $WORK/root.ext2
+
+In either case, you end up with a $WORK/root.ext2 file that is 1.5 GB in size.
+
+This may or may not be sufficient for your remastered CD (or DVD) filesystem.
+If you want, you can resize the file with the resize2fs program from e2fsprogs
+version >= 1.39. Earlier versions of e2fsprogs cannot resize filesystem images
+directly.
+
+Mounting the filesystem image is achieved with a loop device:
+
+ mkdir $WORK/root
+ mount -o loop $WORK/root.ext2 $WORK/root
+
+It is a good idea to create and bind-mount a temporary directory, in order to
+preserve as many zeroed sectors as possible:
+
+ mkdir $WORK/build $WORK/root/build
+ mount --bind $WORK/build $WORK/root/build
+
+Mount other directories necessary for chrooting:
+ mount -t proc proc $WORK/root/proc
+ mount -t sysfs sysfs $WORK/root/sys
+ mount -t devpts devpts $WORK/root/dev/pts
+ mount -t tmpfs tmpfs $WORK/root/dev/shm
+
+Note: contrary to the instructions in the LFS book, tmpfs is not mounted on
+$WORK/root/dev. This is because all the necessary devices are already created
+as static nodes.
+
+Chroot to the filesystem:
+ chroot $WORK/root
+
+In the chroot, change the current directory to /build, and install any
+additional packages you want. Modify other files as necessary.
+
+Get the initramfs files as a zip archive from
+
http://wiki.linuxfromscratch.org/livecd/browser/tags/6.2-1/packages/initramfs
+
+Unzip the archive. Remove the "include $(ROOT)/scripts/functions" line from the
+Makefile. Generate the initramfs image for your CD:
+ make compile-stage2 VERSION="x86-6.2-custom"
+
+(you can replace the "x86-6.2-custom" with your own string). This produces the
+initramfs_data.cpio.gz file in the current directory. If this directory is not
+"/build", copy it to /build:
+ cp initramfs_data.cpio.gz /build
+
+Exit from the chroot and clean up the mounts:
+ exit
+ umount $WORK/root/dev/shm
+ umount $WORK/root/dev/pts
+ umount $WORK/root/sys
+ umount $WORK/root/proc
+ umount $WORK/root/build
+ rmdir $WORK/root/build
+
+Clean up bash history:
+ rm $WORK/root/root/.bash_history
+
+You may also want to remove other history files.
+
+If you, by mistake, created and removed some files, the sectors previously
+occupied by those files begin to contain non-zero data. Such sectors are
+useless, but they don't compress well. Zero them out:
+ dd if=/dev/zero of=$WORK/root/zeroes
+
+This command will print a message that the disk is full. This is not an error.
+Then, remove the file that fills the filesystem:
+ rm $WORK/root/zeroes
+
+Now you can unmount the root.ext2 file:
+ umount $WORK/root
+ sync
+
+The "sync" command is needed due to a bug in the loop driver in some kernels
+that leads to a filesystem with errors otherwise.
+
+Now make the directory structure for your LiveCD:
+ mkdir $WORK/iso
+
+Copy the boot directory from the original LiveCD:
+ cp -r /media/cdrom/boot $WORK/iso
+
+Replace the stock initramfs image with your own:
+ cp $WORK/build/initramfs_data.cpio.gz \
+ $WORK/iso/boot/isolinux/iniramfs_data_cpio.gz
+
+(the underscore before "cpio" in the previous command is not a typo).
+
+Recompress the root.ext2 file:
+ mkzftree -F $WORK/root.ext2 $WORK/iso/root.ext2
+
+Recreate the CD image:
+ cd $WORK/iso ; mkisofs -z -R -l --allow-leading-dots -D -o \
+ ../lfslivecd-x86-6.2-custom.iso -b boot/isolinux/isolinux.bin \
+ -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
+ -V "lfslivecd-x86-6.2-custom" ./
+
+Burn and test. Have a fun.
+
+ACKNOWLEDGEMENTS:
+
+ The team of "Linux From Scratch" and all users.
+ Sylvie Migneault <[EMAIL PROTECTED]> for the initial hint.
+ All users wich contribute at the OpenSource project. :-)
+
+CHANGELOG:
+
+ [2005-11-07]
+ * Initial hint by Sylvie Migneault.
+
+ [2006-08-06]
+ * Updated to LFS LiveCD based on device mapper (6.2-pre4 and later)
\ No newline at end of file
Modified: branches/6.2/packages/livecd-bootscripts/Makefile
===================================================================
--- branches/6.2/packages/livecd-bootscripts/Makefile 2006-09-05 13:10:57 UTC
(rev 1717)
+++ branches/6.2/packages/livecd-bootscripts/Makefile 2006-09-06 03:41:57 UTC
(rev 1718)
@@ -3,7 +3,7 @@
# Targets
-SCRIPTS= customize clkconf langconf brltty brltty-restart
+SCRIPTS= clkconf langconf brltty brltty-restart
DATA= font.dat font-errors.dat lang.dat
include $(ROOT)/scripts/functions
@@ -21,7 +21,6 @@
install -d -m755 /etc/langconf
install -m754 $(SCRIPTS) /etc/rc.d/init.d
install -m644 $(DATA) /etc/langconf
- ln -sf ../init.d/customize /etc/rc.d/rcsysinit.d/S09customize
ln -sf ../init.d/brltty /etc/rc.d/rcsysinit.d/S11brltty
ln -sf ../init.d/clkconf /etc/rc.d/rcsysinit.d/S59clkconf
ln -sf ../init.d/langconf /etc/rc.d/rcsysinit.d/S69langconf
Deleted: branches/6.2/packages/livecd-bootscripts/customize
===================================================================
--- branches/6.2/packages/livecd-bootscripts/customize 2006-09-05 13:10:57 UTC
(rev 1717)
+++ branches/6.2/packages/livecd-bootscripts/customize 2006-09-06 03:41:57 UTC
(rev 1718)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# this script runs before "console",
-# thus translated error messages are not allowed
-
-LC_ALL=C
-export LC_ALL
-
-. /etc/sysconfig/rc
-. ${rc_functions}
-
-case "${1}" in
- start)
- boot_mesg "Applying CD customizations..."
- cd /
- cat /dev/shm/.cdrom/.remove 2>/dev/null | xargs rm -rvf
- cd /dev/shm/.cdrom
- find . ! -path ./root.ext2 ! -path ./boot\* ! -path ./.remove |
\
- cpio -pvd / 2>&1 | sed 's,^//\.,,'
- echo_ok
- ;;
- *)
- echo "Usage: ${0} {start}"
- exit 1
- ;;
-esac
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2006-09-05 13:10:57 UTC (rev 1717)
+++ trunk/Makefile 2006-09-06 03:41:57 UTC (rev 1718)
@@ -396,7 +396,7 @@
@sed -i "s/Version:/Version: $(VERSION)/" $(MP)/boot/isolinux/boot.msg
endif
@sed -i "s/Version:/Version: $(VERSION)/" $(MP)/etc/issue
- @install -m644 doc/README $(MP)/root/README
+ @install -m644 doc/README doc/lfscd-remastering-howto.txt
$(MP)/root/README
@sed -i "s/\[version\]/$(VERSION)/" $(MP)/root/README
@install -m600 root/.bashrc $(MP)/root/.bashrc
@install -m755 scripts/{net-setup,greeting,livecd-login,ll}
$(MP)/usr/bin/
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page