KubuntuAlternateUsbNetBoot: Difference between revisions

From LLL
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://atosaca.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
----
=[http://atosaca.co.cc CLICK HERE]=
----
</div>
This small Tutorial shows you how to set up a small CD that allows you to install Kubuntu via USB or via the net. This is useful for old machines which neither support USB nor Net boot natively, but whose CD-Rom drive may be too old and faulty to afford an installation entirely by CD.
This small Tutorial shows you how to set up a small CD that allows you to install Kubuntu via USB or via the net. This is useful for old machines which neither support USB nor Net boot natively, but whose CD-Rom drive may be too old and faulty to afford an installation entirely by CD.


Line 7: Line 15:
# Make the CD by copying the install and isolinux directories
# Make the CD by copying the install and isolinux directories
# Run the mkInitrd script (see below) of this directory to merge vfat into the image
# Run the mkInitrd script (see below) of this directory to merge vfat into the image
# Move <code>install/netboot/ubuntu-installer/i386/initrd.gz</code> to <code>install/initrd-net.gz</code> under the CD
# Move &lt;code&gt;install/netboot/ubuntu-installer/i386/initrd.gz&lt;/code&gt; to &lt;code&gt;install/initrd-net.gz&lt;/code&gt; under the CD
# install/netboot can now be removed...
# install/netboot can now be removed...
# Edit isolinux to add lines to boot from net (just use standard lines and substitude initrd.gz with initrd-net.gz
# Edit isolinux to add lines to boot from net (just use standard lines and substitude initrd.gz with initrd-net.gz
Line 24: Line 32:
# mount /dev/sdx1 /media/ubuntu710
# mount /dev/sdx1 /media/ubuntu710
# cp -a $CD/ /media/ubuntu710
# cp -a $CD/ /media/ubuntu710
# Make sure the <code>.disk/info</code> directory has been copied
# Make sure the &lt;code&gt;.disk/info&lt;/code&gt; directory has been copied
# cd /media/ubuntu710
# cd /media/ubuntu710
# cp -a dists/gutsy dists/stable
# cp -a dists/gutsy dists/stable
# <code>cp $BUILD/image/install/initrd.gz install/</code> (where <code>BUILD</code> is the path to your initrd.gz . Example <code> BUILD=alain/VirtualMachines/CdUsbBuntu</code>)
# &lt;code&gt;cp $BUILD/image/install/initrd.gz install/&lt;/code&gt; (where &lt;code&gt;BUILD&lt;/code&gt; is the path to your initrd.gz . Example &lt;code&gt; BUILD=alain/VirtualMachines/CdUsbBuntu&lt;/code&gt;)
# Copy isolinux/isolinux.cfg to syslinux.cfg and remove all GFXBOOT , menu and f* (function key help) lines
# Copy isolinux/isolinux.cfg to syslinux.cfg and remove all GFXBOOT , menu and f* (function key help) lines
# If needed:  lilo -M /dev/sdx
# If needed:  lilo -M /dev/sdx
Line 33: Line 41:
====mkInitrd script====
====mkInitrd script====


In this script, the <code>cd=</code> line needs to be changed to point to a directory where a standard ''Kubuntu Alternate'' CD is mounted.
In this script, the &lt;code&gt;cd=&lt;/code&gt; line needs to be changed to point to a directory where a standard ''Kubuntu Alternate'' CD is mounted.


<pre>
&lt;pre&gt;
#!/bin/sh
#!/bin/sh


Line 63: Line 71:
sed -e 's/list-devices cd/list-devices partition/g' \
sed -e 's/list-devices cd/list-devices partition/g' \
     -e 's/iso9660/vfat/g' \
     -e 's/iso9660/vfat/g' \
     -e 's/\(\t*\)\(log "CD-ROM mount succeeded: device=.device"\)/\1if [ ! -e \/cdrom\/.disk\/info ] ; then umount \/cdrom ; continue; fi\n\1\2/' \
     -e 's/\(\t*\)\(log &quot;CD-ROM mount succeeded: device=.device&quot;\)/\1if [ ! -e \/cdrom\/.disk\/info ] ; then umount \/cdrom ; continue; fi\n\1\2/' \
     var/lib/dpkg/info/cdrom-detect.postinst > var/lib/dpkg/info/usb-detect.postinst
     var/lib/dpkg/info/cdrom-detect.postinst &gt; var/lib/dpkg/info/usb-detect.postinst
chmod 755 var/lib/dpkg/info/usb-detect.postinst
chmod 755 var/lib/dpkg/info/usb-detect.postinst
mv var/lib/dpkg/info/usb-detect.postinst var/lib/dpkg/info/cdrom-detect.postinst
mv var/lib/dpkg/info/usb-detect.postinst var/lib/dpkg/info/cdrom-detect.postinst
Line 70: Line 78:


# Pack it up
# Pack it up
find . -print | cpio -H newc -o | gzip -9 >../image/install/initrd.gz
find . -print | cpio -H newc -o | gzip -9 &gt;../image/install/initrd.gz


</pre>
&lt;/pre&gt;


====mkImage script====
====mkImage script====


<pre>
&lt;pre&gt;
#!/bin/sh
#!/bin/sh


cd `dirname $0`/image
cd `dirname $0`/image


mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -hide-rr-moved -V "Net&USB Boot CD" -o ../boot.iso -R .
mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -hide-rr-moved -V &quot;Net&amp;USB Boot CD&quot; -o ../boot.iso -R .
</pre>
&lt;/pre&gt;

Revision as of 04:55, 24 November 2010


This small Tutorial shows you how to set up a small CD that allows you to install Kubuntu via USB or via the net. This is useful for old machines which neither support USB nor Net boot natively, but whose CD-Rom drive may be too old and faulty to afford an installation entirely by CD.

The boot image generate herein is small enough to fit in just 16 Megs. Even old drives should still be able to read images that small.

Preparing the CD

  1. Make the CD by copying the install and isolinux directories
  2. Run the mkInitrd script (see below) of this directory to merge vfat into the image
  3. Move <code>install/netboot/ubuntu-installer/i386/initrd.gz</code> to <code>install/initrd-net.gz</code> under the CD
  4. install/netboot can now be removed...
  5. Edit isolinux to add lines to boot from net (just use standard lines and substitude initrd.gz with initrd-net.gz
  6. Run the mkImage script

Preparing the USB stick (not bootable)

  1. Copy everything on CD to the USB stick formatted as VFAT
  2. As the Vfat filesystem does not support symlinks, copy the gutsy directory to stable

Making the USB bootable

  1. (If not yet done) Make a single partition on the flash drive, and make it bootable
  2. mkfs.vfat -F16 -n ubuntu710 /dev/sdx1
  3. syslinux -sf /dev/sdx1
  4. mount /dev/sdx1 /media/ubuntu710
  5. cp -a $CD/ /media/ubuntu710
  6. Make sure the <code>.disk/info</code> directory has been copied
  7. cd /media/ubuntu710
  8. cp -a dists/gutsy dists/stable
  9. <code>cp $BUILD/image/install/initrd.gz install/</code> (where <code>BUILD</code> is the path to your initrd.gz . Example <code> BUILD=alain/VirtualMachines/CdUsbBuntu</code>)
  10. Copy isolinux/isolinux.cfg to syslinux.cfg and remove all GFXBOOT , menu and f* (function key help) lines
  11. If needed: lilo -M /dev/sdx

mkInitrd script

In this script, the <code>cd=</code> line needs to be changed to point to a directory where a standard Kubuntu Alternate CD is mounted.

<pre>

  1. !/bin/sh

cd=$HOME/Download/7.10

DIR=`dirname $0` cd $DIR

if [ -d initrd ] ; then

  rm -rf initrd

fi

mkdir initrd cd initrd

  1. As root, uncpio initrd

zcat ../image/install/initrd.gz | cpio -i --make-directories

  1. Unpack vfat:

kernel=`ls lib/modules`

ar p $cd/pool/main/l/linux-source-*/fat-modules-$kernel-di_*_i386.udeb data.tar.gz | tar xfzv -

  1. Re-run depmod to include new module

depmod -b .

  1. Patch cdrom-detect script to detect USB sticks instead

sed -e 's/list-devices cd/list-devices partition/g' \

   -e 's/iso9660/vfat/g' \
   -e 's/\(\t*\)\(log "CD-ROM mount succeeded: device=.device"\)/\1if [ ! -e \/cdrom\/.disk\/info ] ; then umount \/cdrom ; continue; fi\n\1\2/' \
   var/lib/dpkg/info/cdrom-detect.postinst > var/lib/dpkg/info/usb-detect.postinst

chmod 755 var/lib/dpkg/info/usb-detect.postinst mv var/lib/dpkg/info/usb-detect.postinst var/lib/dpkg/info/cdrom-detect.postinst


  1. Pack it up

find . -print | cpio -H newc -o | gzip -9 >../image/install/initrd.gz

</pre>

mkImage script

<pre>

  1. !/bin/sh

cd `dirname $0`/image

mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -hide-rr-moved -V "Net&USB Boot CD" -o ../boot.iso -R . </pre>