KubuntuAlternateUsbNetBoot: Difference between revisions
From LLL
Jump to navigationJump to search
AlainKnaff (talk | contribs) |
m (Reverted edits by Yxawyjo (Talk) to last version by AlainKnaff) |
(One intermediate revision by one other user not shown) | |
(No difference)
|
Latest revision as of 19:47, 26 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[edit]
- 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
- Move
install/netboot/ubuntu-installer/i386/initrd.gz
toinstall/initrd-net.gz
under the CD - 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
- Run the mkImage script
Preparing the USB stick (not bootable)[edit]
- Copy everything on CD to the USB stick formatted as VFAT
- As the Vfat filesystem does not support symlinks, copy the gutsy directory to stable
Making the USB bootable[edit]
- (If not yet done) Make a single partition on the flash drive, and make it bootable
- mkfs.vfat -F16 -n ubuntu710 /dev/sdx1
- syslinux -sf /dev/sdx1
- mount /dev/sdx1 /media/ubuntu710
- cp -a $CD/ /media/ubuntu710
- Make sure the
.disk/info
directory has been copied - cd /media/ubuntu710
- cp -a dists/gutsy dists/stable
cp $BUILD/image/install/initrd.gz install/
(whereBUILD
is the path to your initrd.gz . ExampleBUILD=alain/VirtualMachines/CdUsbBuntu
)- Copy isolinux/isolinux.cfg to syslinux.cfg and remove all GFXBOOT , menu and f* (function key help) lines
- If needed: lilo -M /dev/sdx
mkInitrd script[edit]
In this script, the cd=
line needs to be changed to point to a directory where a standard Kubuntu Alternate CD is mounted.
#!/bin/sh cd=$HOME/Download/7.10 DIR=`dirname $0` cd $DIR if [ -d initrd ] ; then rm -rf initrd fi mkdir initrd cd initrd # As root, uncpio initrd zcat ../image/install/initrd.gz | cpio -i --make-directories # 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 - # Re-run depmod to include new module depmod -b . # 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 # Pack it up find . -print | cpio -H newc -o | gzip -9 >../image/install/initrd.gz
mkImage script[edit]
#!/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 .