AUTHOR: Sylvie Migneault DATE: 2008-01-13 LICENSE: GNU Free Documentation License Version 1.2 http://www.gnu.org/licenses/fdl.html SYNOPSIS: Zenwalk-Install_from_usb-HOWTO DESCRIPTION: This guide shows you how to create an installation USB To create an installation USB with the minimum package With the Zenwalk GNU/Linux Zenwalk for Asus EeePC 701 ==> ZenEee PREREQUISITE: Any Linux System, USB stick, syslinux and lilo HINT: ========= CONTENTS: ========= 1- Download Zenwalk ISO file 2- Mount ISO file & copy in the tmp directory 3- Copy files in the zen5 directory 4- Umount tmp directory 5- Customize the zen5 directory 6- Copy files on your usb stick 7- Copy syslinux and lilo on usb stick 8- Copy bootinst.sh on usb stick 9- Make usb stick bootable Annex A - Packages list for minimal install Annex B - bootinst.sh script ============================ 1- Download Zenwalk ISO file ============================ Go to Distrowatch web site at http://distrowatch.com Search for Zenwalk on Distrowatch http://distrowatch.com/table.php?distribution=zenwalk Click on the link of Zenwalk 5.0 Beta (or an other version) http://distrowatch.com/?newsid=04676 Copy link location http://zen-repo.meticul.eu/people/jp/20071226/zenwalk-5.0.iso Open a terminal and change directory $ cd /home/foo/download/iso Download the ISO file with wget $ wget -c http://zen-repo.meticul.eu/people/jp/20071226/zenwalk-5.0.iso ============================================= 2- Mount ISO file & copy in the tmp directory ============================================= Create a tmp direrectory $ mkdir /home/foo/download/iso/tmp Change directory $ cd /home/foo/download/iso Mount ISO file (root user) # mount -o loop zenwalk-5.0.iso tmp/ =================================== 3- Copy files in the zen5 directory =================================== # mkdir zen5 # cd tmp/ # cp -Rp * ../zen5 ======================= 4- Umount tmp directory ======================= # cd .. # umount tmp/ =============================== 5- Customize the zen5 directory =============================== Using your favorite browser and go to zen5 directory Remove packages not required for a minimal installation I deleted "/x/" and "/xap/" directories and other packages Packages used for minimal install are listed in Annex A Remark: The netpkg and pkgtool TGZ files have been modified; the package installation directory "/var/log/" has been changed to "/var/plog/" =============================== 6- Copy files on your usb stick =============================== Using an usb stick formatted fat16 or fat32 Plug your usb stick and mount it if not mounted # mkdir /mnt/usb # mount /dev/sdc1 /mnt/usb REM Adjust "/dev/sdc1" according to your device Copy files on usb stick # cd /home/foo/download/iso/zen5 # cp -a * /mnt/usb ====================================== 7- Copy syslinux and lilo on usb stick ====================================== Create syslinux directory # mkdir -p /mnt/usb/syslinux Copy syslinux and mbr.bin # cp -a /usr/bin/syslinux /mnt/usb/syslinux/ # cp -a /usr/lib/syslinux/mbr.bin /mnt/usb/syslinux/ Copy files # cd /mnt/usb/isolinux # cp -a f2.txt ../syslinux/ # cp -a initrd.img ../syslinux/ # cp -a isolinux.cfg ../syslinux/syslinux.cfg # cp -a message.txt ../syslinux/ # cp -a splash.lss ../syslinux/ Copy lilo # cp -a /sbin/lilo /mnt/usb/syslinux/ ================================ 8- Copy bootinst.sh on usb stick ================================ Create bootinst.sh file (see Annex B) Put bootinst.sh on usb stick # cp bootinst.sh /mnt/usb Change file mode # cd /mnt/usb/ # chmod 755 bootinst.sh ========================== 9- Make usb stick bootable ========================== Execute bootinst.sh script # cd /mnt/usb # sh bootinst.sh It's done. Your usb stick is now bootable. =========================================== ANNEX A - Packages list for minimal install =========================================== ./a: aaa_base-5.0-noarch-50.1.tgz acl-2.2.45_1-i486-48.1.tgz acpid-1.0.4-i486-2.tgz attr-2.4.39_1-i486-48.1.tgz bash-3.1.017-i486-2.tgz bin-11.1-i486-1.tgz bzip2-1.0.4-i486-1.tgz coreutils-6.9-i486-1.tgz cpio-2.5-i486-3.tgz cxxlibs-6.0.8-i486-4.tgz dcron-2.3.3-i486-6.tgz devs-2.3.1-noarch-24.tgz dosfstools-2.11-i486-1.tgz e2fsprogs-1.40.3-i486-50.1.tgz etc-48-noarch-48.1.tgz file-4.21-i486-1.tgz findutils-4.2.31-i486-1.tgz gawk-3.1.5-i486-3.tgz gettext-0.16.1-i486-2.tgz gpm-1.20.1-i486-1z30.tgz grep-2.5-i486-3.tgz gzip-1.3.12-i486-1.tgz hal-0.5.10-i486-50.2.tgz infozip-5.52-i486-2.tgz kbd-1.12-i486-1z32.tgz kernel-2.6.23.12-i486-50.1.tgz less-394-i486-1.tgz lha-114i-i486-1.tgz logrotate-3.7.4-i486-1.tgz mkinitrd-1.3.0-i486-4.tgz module-init-tools-3.4-i486-1.tgz ncompress-4.2.4-i486-1.tgz patch-2.5.4-i486-1.tgz pciutils-2.2.5-i486-1.tgz procps-3.2.7-i486-2.tgz rpm2tgz-1.0-i486-1.tgz sed-4.1.5-i486-1.tgz shadow-4.0.3-i486-2z30.tgz smartmontools-5.36-i486-1.tgz sysfsutils-2.1.0-i486-1.tgz sysvinit-2.86-i486-50.3.tgz tar-1.16.1-i486-1.tgz time-1.7-i486-1.tgz tree-1.5.0-i486-1.tgz udev-115-i486-50.1.tgz usbutils-0.72-i486-2.tgz utempter-1.1.4-i486-1.tgz util-linux-2.12r-i486-6.tgz which-2.16-i486-1.tgz zoo-2.10-i486-1.tgz ./ap: alsa-utils-1.0.15-i486-50.1.tgz at-3.1.10-i486-1.tgz dbus-1.0.2-i486-48.1.tgz dialog-1.0_20060221-i486-46.1.tgz diffutils-2.8.1-i486-3.tgz dmidecode-2.9-i486-1.tgz groff-1.19.2-i486-1.tgz hdparm-7.7-i486-50.1.tgz htop-0.7-i486-50.1.tgz lsof-4.78-i486-1.tgz lsscsi-0.19-i486-1.tgz man-1.6c-i486-2.tgz man-pages-2.55-noarch-1.tgz mc-4.6.1_20070309-i486-2.tgz most-4.10.2-i486-2.tgz netpkg-3.7.4-i486-48.1-eeepc.tgz pkgtools-12.1.0-noarch-50.2-eeepc.tgz sdparm-1.02-i486-46.1.tgz sudo-1.6.8p12-i486-46.1.tgz systemtools-5.0-i486-50.4.tgz vim-7.1-i486-50.3.tgz ./d: gcc-4.1.2-i486-1.tgz perl-5.8.8-i486-50.1.tgz ./l: alsa-lib-1.0.15-i486-50.1.tgz alsa-oss-1.0.15-i486-50.1.tgz dbus-glib-0.74-i486-48.1.tgz expat-2.0.1-i486-48.1.tgz glib2-2.14.4-i486-50.1.tgz glibc-2.7-i486-3.tgz gmp-4.2.1-i486-2.tgz gtk+2-2.12.2-i486-50.1.tgz libdaemon-0.12-i486-48.1.tgz libidn-0.6.10-i486-1.tgz libjpeg-6b-i486-5.tgz libpng-1.2.24-i486-50.1.tgz libtermcap-1.2.3-i486-7.tgz libusb-0.1.12-i486-2.tgz ncurses-5.6-i486-2.tgz nss-mdns-0.9-i486-44.1.tgz pcre-7.4-i486-48.1.tgz popt-1.7-i486-2.tgz readline-5.2-i486-50.1.tgz slang-2.0.7-i486-46.1.tgz zlib-1.2.3-i486-2.tgz ./n: cyrus-sasl-2.1.22-i486-1.tgz dhcpcd-3.1.8-i486-50.1.tgz dnstools-9.4.2-i486-50.1.tgz ethtool-5-i486-1.tgz iputils-s20070202-i486-2.tgz nc-1.10-i386-1.tgz net-tools-1.60-i486-1.tgz network-scripts-5.0-i486-50.1.tgz nmap-4.50-i486-1.tgz openldap-client-2.4.7-i486-50.2.tgz openssh-4.7p1-i486-50.1.tgz openssl-0.9.8g-i486-1.tgz ppp-2.4.4-i486-50.1.tgz rp-pppoe-3.8-i486-2.tgz rsync-2.6.9-i486-2.tgz tcp_wrappers-7.6-i486-1.tgz tcpdump-3.9.7-i486-1.tgz telnet-0.17-i486-1.tgz traceroute-1.4a12-i386-2.tgz vlan-1.9-i486-2.tgz wget-1.10.2-i486-2.tgz whois-4.7.21-i486-1.tgz wireless-tools-28-i486-5.tgz wpa-supplicant-0.5.8-i486-48.2.tgz ... ============================ ANNEX B - bootinst.sh script ============================ #!/bin/bash # script writed by Tomas Matejicek developer of SLAX livecd (http://slax.org) # modified by alisou for Zenwalk Installation USB # # set -e TARGET="" MBR="" # Find out which partition or disk are we using MYMNT=$(cd -P $(dirname $0) ; pwd) while [ "$MYMNT" != "" -a "$MYMNT" != "." -a "$MYMNT" != "/" ]; do TARGET=$(egrep "[^[:space:]]+[[:space:]]+$MYMNT[[:space:]]+" /proc/mounts | cut -d " " -f 1) if [ "$TARGET" != "" ]; then break; fi MYMNT=$(dirname "$MYMNT") done if [ "$TARGET" = "" ]; then echo "Can't find device to install to." echo "Make sure you run this script from a mounted device." exit 1 fi MBR=$(echo "$TARGET" | sed -r "s/[0-9]+\$//g") NUM=${TARGET:${#MBR}} cd "$MYMNT" clear echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" echo " Welcome to Zenwalk boot installer " echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" echo echo "This installer will setup disk $TARGET to boot only Zenwalk." if [ "$MBR" != "$TARGET" ]; then echo echo "Warning! Master boot record (MBR) of $MBR will be overwritten." echo "If you use $MBR to boot any existing operating system, it will not work" echo "anymore. Only Zenwalk will boot from this device. Be careful!" fi echo echo "Press any key to continue, or Ctrl+C to abort..." read junk clear echo "Flushing filesystem buffers, this may take a while..." sync # setup MBR if the device is not in superfloppy format if [ "$MBR" != "$TARGET" ]; then echo "Setting up MBR on $MBR..." ./syslinux/lilo -S /dev/null -M $MBR ext # this must be here to support -A for extended partitions echo "Activating partition $TARGET..." ./syslinux/lilo -S /dev/null -A $MBR $NUM echo "Updating MBR on $MBR..." # this must be here because LILO mbr is bad. mbr.bin is from syslinux cat ./syslinux/mbr.bin > $MBR fi echo "Setting up boot record for $TARGET..." ./syslinux/syslinux -d syslinux $TARGET echo "Disk $TARGET should be bootable now. Installation finished." echo echo "Read the information above and then press any key to exit..." read junk ACKNOWLEDGEMENTS: * The Zenwalk team * All users wich contribute at the OpenSource project. :-) CHANGELOG: [2007-01-14] * Edit step 9 and Annex B [2007-01-13] * Initial hint