This crash2421-rpmrescue.iso image contain almost complete support for getting all your hardware going on a Intel i386/i486/i586/i686 Pentium Pro and Pentium II III 4 systems. All AMD CPU's like Athlon T-bird XP, Duron and Cyrix CPU's should be no problem either. Network, SCSI, USB, USB2 mass-storage, filesystem (also ext3) support is included. I use these images always first when I get a new Intel based system in front of me. crash2421-mdk91.iso : This crk version is the same as crash2421-ntfs.iso but is based upon the Mandrake 9.1 i586 Linux distribution. The ram filesystem for the mdk91 edition is 16 Mb. In addition the Logical Volume Manager (LVM) administration tools are added. crash2421-rpmrescue.iso : This crk version is the same as crash2421-ntfs.iso but has a special RPM rescue util added. Sofar the RedHat 6.x and RedHat 7.x series have had a static binary for /bin/rpm. RedHat 9 however has a dynamic shared elf binary for /bin/rpm. This has caused a tremendous misgrief amongst users. I created a script install-rpmrescue which installs symbolic links so that redhat's rpm can still be run with the option --root=/mnt if e.g. the root filesystem is mounted on /mnt. crash2421-ntfs.iso : This crk version is the same as crash2421.iso but has NTFS v2.1.4a and ntfsprogs 1.7.1-1 support which includes ntfsresize. see : http://linux-ntfs.sourceforge.net/info/index.html For a hands-on HOWTO for using ntfsresize see : http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html by Szabolcs Szakacsits. See also the HOWTO.ntfs in /root when the crk is booted. I have tested ntfsresize a couple a times, and sofar it just works. crash2421.iso : the bootable iso, boots linux kernel 2.4.21 this kernel is build for a i386. All possible stuff from kernel 2.4.21 has been enabled and possibly mostly as modules. Just burn the iso with your own favorite CD-Burn program. For instance Adaptec EASY CD-Creator, or Nero can do it. On linux use e.g. this command with cdrecord : # cdrecord -v dev=1,0,0 driveropts=burnfree -dao crash2421.iso The minimum RAM to boot it is 20 Mb physical ram. This is because a 12 Mb ramdisk filesystem is created. After booting the kernel it will loads through initrd the rootrh9.gz runtime. The thing has gone to big and i'm not able anymore to use 2.88 Mb floppy-emulation with mkisofs to make cdboot.img bootable inside my iso. Instead i now use the disk-emulation option. here's the one-liner to create the iso : /usr/bin/mkisofs -b boot/diskimage.img -c boot/boot.catalog \ -hard-disk-boot -o /mnt/data2/crash2421.iso -l -r -L -J \ -V "CRK for Linux 2.4.21" -P "CRK-2003061701" -p "stock" \ -A "CRK for Linux 2.4.21" "/mnt/data2/crash2421" The downside is i have to use a physical partition on my first harddisk (/dev/sda /dev/sda1) to manipulate the contents of diskimage.img. The procedure to activate lilo is : # fdisk /dev/sda Command (m for help): p Disk /dev/sda: 255 heads, 63 sectors, 555 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1 8001 83 Linux Command (m for help): q # mount /dev/sda1 /mnt/root # cd /mnt/root # lilo -C etc/lilo.conf # sync # sync # cd / # umount /mnt/root # dd if=/dev/sda of=diskimage.img bs=1k count=8192 here's the contents of /mnt/root/etc/lilo.conf : boot=/dev/sda map=boot/map install=boot/boot.b message=etc/message.txt compact prompt image=vmlinuz label=linux append="root=/dev/ram0 ramdisk_size=12288" initrd=boot/rootrh9.gz root=/dev/ram0 read-only IMPORTANT!! : If you use the procedure outlined above always rerun lilo on your ordinary /etc/lilo.conf . Otherwise you will only be able to boot your CRK for Linux 2.4.21 from harddisk ( i.e. /dev/sda1 ) afterwards. lilo version lilo-22.5.5 has been used during creation of this CRK. With every release of CRK for 2.4.x i will include a tar.gz tarball of the contents of the /dev/sda1 partition described above. It will be on the CRK cdrom and as a seperate download. They are located inside the boot directory and called in this case diskfiles2421.tar.gz . If you have only 20 Mb physical RAM and want to use some of the modules on the cdrom then for instance mount first a filesystem (e.g. msdos) and install a swapfile : login as root, no password required :) # mount -t msdos /dev/hda1 /mnt # dd if=/dev/zero of=/mnt/swapfile bs=1024 count=16384 # mkswap /mnt/swapfile 16384 # sync # swapon /mnt/swapfile To install extented utilities like : ( vim ftp ps telnet (tiny telnet) lspci and reiserfs utils) run : # install-cdrom install-cdrom will fail when you boot from a scsi cdrom, for a workaround see SCSI-CDROM-BOOT.txt. After that run # /cdrom/sbin/install-utils Or just copy manually from /cdrom/utils directory tree what you really need. After running install-cdrom the cdrom is mounted on /cdrom and the modules are then inside /cdrom/modules/2.4.21/ . To use a module just find it inside the modules directory tree and just do a insmod module.o. Say for instance you have a Boomerang 3com905b fastethernet card. Locate the apropiate module inside modules.list. The 3com905b card is supported under Linux by the 3c59x.o module. ( To find out which module name is supporting which hardware I, at this time of writing, point to the Linux kernel source. This source can be found at : ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.x.tar.gz I have included the kernel source Documentation inside /cdrom/modules/Documentation though. Inside /cdrom/modules/dev is now the MAKEDEV package. See below how to use it. Installing the 3c59x.o module is rather simple : # cd /cdrom/modules/2.4.21/kernel/drivers/net # insmod 3c59x.o You might even consider makeing a symlink like this : # cd /lib/modules # ln -s /cdrom/modules/2.4.21 . Then modprobe can be used, and even a /etc/modules.conf can be used, but I haven't tested that yet. Linking the modules directory on cdrom to /lib/modules (like above shown) is i think now the easiest thing to do. After you have fired up all the modules you need, you can just umount /cdrom so your own cdrom disks can be inserted. Getting the network going : 1. # vi /etc/hosts (plug in all your ip numbers and host names you are going to use .) 2. Make sure the apropiate ethernet card module is loaded (see above) # cd /etc/sysconfig/network-scripts # cp ifcfg-eth0.org ifcfg-eth0 # vi ifcfg-eth0 (plug your ip number and netmask and broadcast address) # cd /etc/rc.d/init.d # ./network stop ; ./network start # ping hostname ( ping some host on the network ) Mounting a remote NFS share to make a backup over the network : 1a. Here's a example : Imagine that your win2k server died because of a faulty service pack install. The win2k server is known on the network as win2000.company.net with ip-number 192.168.1.10 and netmask 255.255.255.0. Boot the win2k server with the crash2420.iso and configure the network as outlined above using 192.168.1.10 as the ip-number. Also on the network is running your redhat 7.1 workstation or server with hostname rh73.company.net and ip-number 192.168.1.21 and netmask 255.255.255.0. On the linux server rh73 configure a NFS share to be exported : [root@rh73 /]# vi /etc/exports and add this line : /backup win2000(rw,no_root_squash) [root@rh73 /]# mkdir /backup [root@rh73 /]# /etc/rc.d/init.d/nfs stop [root@rh73 /]# /etc/rc.d/init.d/nfs start [root@rh73 /]# showmount -e rh73 Export list for rh73: /backup win2000.company.net Now your NFS backup server rh73 is ready for use. We move over to win2k server which is booted with crash2421.iso. Make sure al modules for disk controllers like adaptec 2940U2W are loaded. Also load the NTFS file system module ntfs.o . Make sure /etc/hosts on the machine booted with the CRK contains at least these two lines: 192.168.1.10 win2000 192.168.1.21 rh73 Next mount your NTFS partitions : # cd /lib/modules # ln -s /cdrom/modules/2.4.21 . # modprobe ntfs # cd /mnt # mkdir part1 part2 part3 # mount -t ntfs -oro /dev/sda1 /mnt/part1 # mount -t ntfs -oro /dev/sda2 /mnt/part2 # mount -t ntfs -oro /dev/sdb1 /mnt/part3 Next make sure you have the portmapper running and then mount the NFS share. Its important that the ip-number you configured on your network card (eth0) is known by the nfsserver inside its /etc/exports. If the ip number you used is known by the local DNS servers, then use the hostname of that ip-number inside /etc/exports. # /sbin/portmap # mkdir /backup # mount -t nfs -orw,rsize=8192,wsize=8192 rh73:/backup /backup Now just copy all the important data from /mnt/part1 2 and 3 to /backup . 1b. Same scenario as 1a, but now you upfront know maybe something might go wrong, when applying a hotfix, servicepack etc. What you can do is do a "ghostlike" backup of your drive(s). On the win2k server (booted with the crk) mount the remote NFS share as above and make sure you don't have your local drives mounted : # /sbin/portmap # mkdir /backup # mount -t nfs -orw,rsize=8192,wsize=8192 rh73:/backup /backup Next just do a dd (data dump) of your local drives to /backup : # dd if=/dev/sda bs=10M | gzip -c > /backup/dd-sda.gz # dd if=/dev/sdb bs=10M | gzip -c > /backup/dd-sdb.gz Now restart the machine with its native win2k OS and apply service packs hotfixes or whatever patch is needed. If something goes wrong then boot the machine again with the crk and mount the NFS share again like above. Putting the just backup-ed dd images back on the drives is done like this : # gzip -dc /backup/dd-sda.gz | dd of=/dev/sda bs=10M # gzip -dc /backup/dd-sdb.gz | dd of=/dev/sdb bs=10M Getting SCSI going : 1. Make sure the apropiate scsi card module is loaded (see above) # cd /lib/modules # ln -s /cdrom/modules/2.4.21 . # modprobe aic7xxx ( If you have a Adaptec aha2940U2W card) Getting USB/USB2 Mass Storage going : 1. Make sure usbdevfs is mounted, and uhci-hcd and usb-storage are loaded. The commands below can also be run from the script /cdrom/sbin/install-usb2 after /cdrom/sbin/install-utils has been run. # cd /lib/modules # ln -s /cdrom/modules/2.4.21 . # mount -t usbdevfs usbdevfs /proc/bus/usb # modprobe ehci-hcd # modprobe usb-storage Creating extra Devices nodes : 1. Make a symlink as needed : # cd /etc # ln -s /cdrom/modules/dev/makedev.d . # cd /dev # cp /cdrom/modules/dev/MAKEDEV . # ./MAKEDEV rd/c0d0 ( DAC960 device nodes for controller0 disk0) # ./MAKEDEV ida/c0d0 ( Compaq Smart Array device nodes for c0d0 ) # ./MAKEDEV ataraid/d0 ( IDE RAID device nodes for disk0) Getting FAT32 going : 1. install the vfat.o module : # cd /lib/modules # ln -s /cdrom/modules/2.4.21 . # modprobe vfat # mount -t vfat /dev/hda1 /mnt ( If hda1 contains a FAT32 filesystem) RPM Recovery and Rescue : 1. Run install-cdrom and /cdrom/sbin/install-utils. Next make sure your RedHat 9 root filesystem is mounted. In case of a ext3 filesystem make sure ext3 is loaded. Next run /cdrom/sbin/install-rpmrescue : # modprobe ext3 # fdisk -l # mount /dev/hda2 /mnt ( mount your RedHat 9 root filesystem ) # /cdrom/sbin/install-rpmrescue # umount /cdrom ( remove the CRK cdrom ) # install-cdrom ( insert a RedHat 9 install cdrom ) now you can query and install RPMS relative to /mnt. As an example we show how to re-install glibc-2.3.2 : # /mnt/bin/rpm --root=/mnt -Uhv --force \ /cdrom/RedHat/RPMS/glibc-2.3.2-11.9.i686.rpm (recovering glibc-2.3.2 by forcing a rpm install on /mnt by using the /mnt/bin/rpm and /mnt/var/lib/rpm/* database # /mnt/bin/rpm --root=/mnt -q -l glibc-2.3.2-11.9 (listing the installed files of this RPM) # /mnt/bin/rpm --root=/mnt -q -f /mnt/bin/rpm rpm-4.2-0.69 (checking which RPM a file on /mnt belongs to ) Resizing NTFS : 1. When you have a desktop PC or laptop, they mostly come with restore cdrom's which will wipe your complete harddisk contents before writing a factory default installation of Windows 2000 or XP. Resizing your NTFS partition, which mostly always uses 100% of your diskspace, is then your only option to create unused diskspace to install e.g. a Linux distribution. For details how to use ntfsresize see HOWTO.ntfs which is a ascii version of this HOWTO from Szabolcs Szakacsits at http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html which i shamelessly copied . Getting EXT3 going : 1. install the ext3.o module : # cd /lib/modules # ln -s /cdrom/modules/2.4.21 . # modprobe ext3 # mkfs.ext3 /dev/hda1 ( make a journalled ext3 filesystem ) # mount /dev/hda1 /mnt ( /dev/hda1 is mounted after this as ext3, with ps ax , you can see a extra kjournald is fired up ) # umount /mnt # fsck.ext3 /dev/hda1 ( filesystem check for ext3 , -f option will force a check ) # mkfs.ext2 /dev/hda1 ( make a ordinary ext2 filesystem ) # mount /dev/hda1 /mnt ( /dev/hda1 is mounted as ext2 ) # umount /mnt # tune2fs -j /dev/hda1 ( the ext2 filesystem of /dev/hda1 is converted to ext3 ) # mount /dev/hda1 /mnt ( /dev/hda1 is now mounted as ext3 ) # mount ( double check to see how your partitions are mounted ) Getting PCMCIA going : 1. Make sure the cdrom is mounted on /cdrom and run /cdrom/sbin/install-pcmcia . Next edit ifcfg-eth0 like outlined above in case of a pcmcia network card. Then run this : # /etc/rc.d/init.d/pcmcia start ( insert your pcmcia card , and thats it) Recovering and re-installing LILO : 1. boot your machine with the kit. Next mount your root (/) partition on /mnt : # mount /dev/hda1 /mnt Eventually mount your boot partition on top of that : # mount /dev/hda2 /mnt/boot # vi /mnt/etc/lilo.conf (adjust lilo.conf ) # /mnt/sbin/lilo -r /mnt (re-install lilo relative to /mnt) Newer versions of lilo even might need this syntax: # /mnt/sbin/lilo -r /mnt -w Recovering and re-installing GRUB : 1. boot your machine with the kit. Next mount your root (/) partition on /mnt : # mount /dev/hda2 /mnt (root filesystem which contains all stuff) # mount /dev/hda1 /mnt/boot (boot filesystem, if on a seperate partition) # /mnt/usr/sbin/chroot /mnt (invoke chroot to /mnt and run from your linux installation mounted on /mnt e.g. RedHat 9) # /sbin/grub-install /dev/hda (freshly install GRUB again on the MBR of /dev/hda ) # sync # sync # exit (leave the chroot shell) # sync # sync # umount /mnt/boot # umount /mnt # umount /cdrom # shutdown -r now Sofar i haven't found an analoge option like -r inside LILO, to be used with GRUB to avoid the mandatory use of the chroot shell. Getting something else going : E-Mail me at stock@stokkie.net Robert M. Stockmann Last changed Sat Nov 22 03:37:34 CET 2003