Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 27 Oct 2011 15:26:07 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: syslinux

Hi,

The rough patch for isolinux based ISOs (the patch obviously needs a
cleanup):

cvs diff: Diffing .
Index: installisotree.sh
===================================================================
RCS file: /home/cvs/cvsroot/Owl/build/installisotree.sh,v
retrieving revision 1.18
diff -u -r1.18 installisotree.sh
--- installisotree.sh	7 Sep 2011 00:40:50 -0000	1.18
+++ installisotree.sh	27 Oct 2011 11:25:20 -0000
@@ -55,11 +55,18 @@
 # Should match exactly one file
 KERNEL_NAME="`echo vmlinuz-*`"
 ln -s "$KERNEL_NAME" vmlinuz
-chroot "$ROOT" sh -c 'cd /boot && ./floppy-update.sh'
+#cp "$KERNEL_NAME" vmlinuz
+
+mkdir -p "$ROOT/boot/isolinux/"
+cp /usr/share/syslinux/isolinux.bin \
+    "$ROOT/etc/isolinux.cfg" \
+    "$ROOT/boot/message" \
+    "$ROOT/boot/isolinux/"
+
 # We'll mount the floppy image when CD-booted, so there's no need to keep a
 # second copy of the kernel image outside of the floppy image.
-rm "$KERNEL_NAME"
-ln -s floppy/boot/"$KERNEL_NAME"
+# rm "$KERNEL_NAME"
+# ln -s floppy/boot/"$KERNEL_NAME"
 mkdir -m700 floppy
 
 # depmod is normally run on bootup, but /lib/modules is read-only on CD
@@ -70,27 +77,30 @@
 cd "$ROOT/etc"
 sed -i '/^tmpfs[[:space:]]/d' fstab
 sed -i 's|^\(/dev/cdrom[[:space:]]*\).*|\1/\t\t\tiso9660\tro\t\t\t0 0|' fstab
-echo -e '/boot/floppy.image /boot/floppy\t\text2\tloop,ro\t\t\t0 0' >> fstab
 sed -i 's|^\(~~:S:wait:\).*|\1/bin/bash --login|' inittab
 sed -i 's/^\(DISK_QUOTA=\)yes$/\1no/' vz/vz.conf
 
-log "Installing sources"
-cd "$ROOT/rom/world"
-tar -cf- --owner=build --group=sources --exclude Root -C "$HOME" \
-	"native/$BRANCH" Makefile |
-	tar -xf-
-if [ "`uname -m`" = x86_64 ]; then
-	pushd "native/$BRANCH"
-	tar cjf packages.tar.bz2 --remove-files packages
-	popd
+if [ "$COPY_SOURCES" != "NO" ]; then
+    log "Installing sources"
+    cd "$ROOT/rom/world"
+    tar -cf- --owner=build --group=sources --exclude Root -C "$HOME" \
+            "native/$BRANCH" Makefile |
+            tar -xf-
+    if [ "`uname -m`" = x86_64 ]; then
+            pushd "native/$BRANCH"
+            tar cjf packages.tar.bz2 --remove-files packages
+            popd
+    fi
+
+    cp -rpL "$HOME/RPMS" .
+    mkdir sources
+    cp -rpL "$HOME/sources/$BRANCH" sources/
+    chown -hR build:sources .
+    chmod -R u=rwX,go=rX .
+else
+    log "Skipping install sources"
 fi
 
-cp -rpL "$HOME/RPMS" .
-mkdir sources
-cp -rpL "$HOME/sources/$BRANCH" sources/
-chown -hR build:sources .
-chmod -R u=rwX,go=rX .
-
 log "Preparing README files"
 cd "$ROOT"
 if [ "$BRANCH" = "Owl" ]; then
Index: installorder.conf
===================================================================
RCS file: /home/cvs/cvsroot/Owl/build/installorder.conf,v
retrieving revision 1.138
diff -u -r1.138 installorder.conf
--- installorder.conf	24 Oct 2011 12:29:26 -0000	1.138
+++ installorder.conf	27 Oct 2011 11:25:20 -0000
@@ -80,6 +80,7 @@
 H:mdadm
 owl-startup
 H:lilo
+H:syslinux
 H:silo
 H:prtconf
 H:losetup
Index: makeiso.sh
===================================================================
RCS file: /home/cvs/cvsroot/Owl/build/makeiso.sh,v
retrieving revision 1.4
diff -u -r1.4 makeiso.sh
--- makeiso.sh	14 Dec 2010 10:57:09 -0000	1.4
+++ makeiso.sh	27 Oct 2011 11:25:20 -0000
@@ -6,7 +6,8 @@
 . installworld.conf
 
 ROOT="$ISOTREE_ROOT"
-if [ ! -d "$ROOT" -o ! -r "$ROOT/boot/floppy.image" -o \
+
+if [ ! -d "$ROOT" -o ! -r "$ROOT/boot/isolinux/isolinux.bin" -o \
      "$(readlink -e "$ROOT")" = / ]; then
 	echo >&2 "Invalid or unavailable ISOTREE_ROOT ($ROOT)"
 	exit 1
@@ -21,10 +22,13 @@
 	ISO="$BRANCH-$(TZ=UTC date +%Y%m%d).iso"
 fi
 
-if [ -z "$COMPRESS_ISO" ]; then
-	mkisofs -quiet -lRJ -b boot/floppy.image -c boot/boot.catalog \
-		-o "$ISO" "$ROOT"
-else
-	mkisofs -quiet -lRJ -b boot/floppy.image -c boot/boot.catalog "$ROOT" |
-		gzip -9 >"$ISO.gz"
+mkisofs -quiet -lRJ \
+    -no-emul-boot -boot-load-size 4 -boot-info-table \
+    -hide-rr-moved \
+    -b boot/isolinux/isolinux.bin \
+    -c boot/isolinux/isolinux.cat \
+    -o "$ISO" "$ROOT"
+
+if [ -n "$COMPRESS_ISO" ]; then
+    gzip -9 "$ISO" > "$ISO.gz"
 fi

---


The isolinux.cfg:

    timeout 50
    display /boot/message
    default normal
    prompt 1


    label normal
    kernel /boot/vmlinuz
    append single rootfstype=iso9660 root=/dev/cdrom rootdelay=30

    label safe
    kernel /boot/vmlinuz
    append single rootfstype=iso9660 root=/dev/cdrom rootdelay=30 acpi=ht

    label rescue
    kernel /boot/vmlinuz


The image boots OK in QEMU.

-- 
Vasiliy

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.