On Thu, Jul 12, 2007 at 01:32:12PM +0400, Vladimir Stavrinov wrote:
> Found. The problem is template handling. Either pxelnux.cfg
Here is patch attached for svn live-helper rev. 2454
Changes:
1. Remove symlinks form chroot/boot
2. Remove renaming kernels and initrd if its numbers > 1 (for
netboot only)
3. Add server type (nfs or cifs) and mount options for netboot
to config
4. Append netboot options to LIVE_BOOTAPPEND
5. Used syslinux.cfg template instead pxelinux.cfg for netboot
6. Fixed variables substitution in pxelinux.cfg/default. Changed
order: LIVE_BOOTAPPEND substituted first.
The patched live-helper successfully tested for this config:
LIVE_BINARY_IMAGES="net"
LIVE_LINUX_FLAVOURS="686 k7"
LIVE_DISTRIBUTION="sid"
LIVE_PACKAGES_LISTS="standard"
LIVE_CHROOT_FILESYSTEM="plain"
LH_INITRAMFS="live-initramfs"
LIVE_NET_TYPE="cifs"
LIVE_NET_MOUNTOPTS="-ouser=root,password=xxxxxx,ro"
*********************************
**** Vladimir Stavrinov ******
******* [EMAIL PROTECTED] ******
*********************************
diff -ur live-helper-2454/helpers/lh_binary_linux-image live-helper/helpers/lh_binary_linux-image
--- live-helper-2454/helpers/lh_binary_linux-image 2007-07-09 15:31:18.000000000 +0400
+++ live-helper/helpers/lh_binary_linux-image 2007-07-12 12:58:41.000000000 +0400
@@ -95,6 +95,7 @@
mkdir -p "${DESTDIR}"
# Installing linux-image
+find chroot/boot/ -type l -exec rm -f \{} \;
cp chroot/boot/"${LINUX}"* "${DESTDIR}"
cp chroot/boot/initrd.img* "${DESTDIR}"
diff -ur live-helper-2454/helpers/lh_binary_syslinux live-helper/helpers/lh_binary_syslinux
--- live-helper-2454/helpers/lh_binary_syslinux 2007-07-10 10:25:30.000000000 +0400
+++ live-helper/helpers/lh_binary_syslinux 2007-07-12 20:51:24.000000000 +0400
@@ -210,6 +210,21 @@
LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} union=${LIVE_UNION_FILESYSTEM}"
fi
+if [ "${LIVE_BINARY_IMAGES}" = "net" ]
+then
+ if [ -z "${LIVE_NET_TYPE}" ] || [ "${LIVE_NET_TYPE}" = nfs ]
+ then
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} netboot nfsroot=LIVE_NET_SERVER:LIVE_NET_PATH"
+ else
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} netboot=$LIVE_NET_TYPE nfsroot=//LIVE_NET_SERVERLIVE_NET_PATH"
+ fi
+
+ if [ -n "${LIVE_NET_MOUNTOPTS}" ]
+ then
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} nfsopts=${LIVE_NET_MOUNTOPTS}"
+ fi
+fi
+
LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
@@ -354,8 +369,8 @@
cp chroot/usr/lib/syslinux/pxelinux.0 tftpboot
mkdir -p tftpboot/pxelinux.cfg
cp -r "${LIVE_TEMPLATES}"/syslinux/* tftpboot/pxelinux.cfg
- mv tftpboot/pxelinux.cfg/pxelinux.cfg tftpboot/pxelinux.cfg/default
- rm -f tftpboot/pxelinux.cfg/syslinux.cfg
+ mv tftpboot/pxelinux.cfg/syslinux.cfg tftpboot/pxelinux.cfg/default
+ rm -f tftpboot/pxelinux.cfg/pxelinux.cfg
sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/boot.txt
@@ -378,24 +393,13 @@
# Configure syslinux templates
sed -i -e "[EMAIL PROTECTED]@${LINUX_LIVE}@" -e "[EMAIL PROTECTED]@${LINUX_INSTALL}@" -e "[EMAIL PROTECTED]@${MEMTEST}@" tftpboot/pxelinux.cfg/default
- sed -i -e "s/LIVE_NET_SERVER/${LIVE_NET_SERVER}/" -e "s#LIVE_NET_PATH#${LIVE_NET_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" tftpboot/pxelinux.cfg/default
+ sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" -e "s#LIVE_NET_SERVER#${LIVE_NET_SERVER}#" -e "s#LIVE_NET_PATH#${LIVE_NET_PATH}#" tftpboot/pxelinux.cfg/default
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" tftpboot/pxelinux.cfg/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt
# Working arround syslinux 8.3 limitation
- if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
+ if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -eq "1" ]
then
- NUMBER="0"
-
- for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
- do
- NUMBER="$(($NUMBER + 1))"
-
- mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
- mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
- sed -i -e "s/vmlinuz-.*-${FLAVOUR}$/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR} /initrd${NUMBER}.img /g" tftpboot/pxelinux.cfg/default
- done
- else
mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" tftpboot/pxelinux.cfg/default
diff -ur live-helper-2454/helpers/lh_config live-helper/helpers/lh_config
--- live-helper-2454/helpers/lh_config 2007-07-02 18:59:26.000000000 +0400
+++ live-helper/helpers/lh_config 2007-07-12 14:15:50.000000000 +0400
@@ -365,6 +365,14 @@
# (Default: ${LIVE_NET_SERVER})
LIVE_NET_SERVER="${LIVE_NET_SERVER}"
+# \$LIVE_NET_TYPE: set netboot server type: nfs or cifs
+# (Default: ${LIVE_NET_TYPE})
+LIVE_NET_TYPE="${LIVE_NET_TYPE}"
+
+# \$LIVE_NET_MOUNTOPTS: set netboot mount options
+# (Default: ${LIVE_NET_MOUNTOPTS})
+LIVE_NET_MOUNTOPTS="${LIVE_NET_MOUNTOPTS}"
+
# \$LIVE_SYSLINUX_SPLASH: set custom syslinux splash
# (Default: empty)
LIVE_SYSLINUX_SPLASH="${LIVE_SYSLINUX_SPLASH}"
_______________________________________________
Debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel