Linux FAQ's & Manuals
- Linux Scripts
- Debian Install
- Bash For Beginners
- Bugzilla
- Consultants Guide
- GCC Manual
- Linux Command Line Tools
- Gnu Pascal Coding Standards
- Linux Installation Disk
- Labolatorium Linux(PL)
- Budowa systemu Linux(PL)
- Linux Dictionary
- Network Administrators
- Rescue Disk for Linux
- Red Hat Installation
- Red Hat Customization
- Red Hat Getting Started
- Red Hat Security
- Secure & Optimize
- Slackware Manual
- Suse Support
- Suse FAQ
Linux.com: "WordPress plugins abound for Google AdSense and other third-party text ad brokers, but what happens when someone wants to buy ad space directly from you, on a specific category page in your blog...?"
Help! My Linux Won't Start
ITtoolbox: "At one stage of our Linux adventure we have all come across this situation. Here you are happily exploring and tweaking your system when all of a sudden it doesn't start any more..."
LogFS: A New Way of Thinking About Flash Filesystems
Linux.com: "Storage manufacturers are getting ready to start shipping solid state disks, and Linux-based devices like One Laptop per Child's XO and Intel's Classmate don't contain standard hard disks..."
Secure Websites Using SSL And Certificates
HowtoForge: "This how-to will guide you through the entire process of setting up a secure website using SSL and digital certificates..."
Linux Tip: Bash Parameters and Parameter Expansions
developerWorks: "In this tip you will learn how to handle parameters and options in your bash scripts and how to use the shell's parameter expansions to check or modify parameters..."
next: creating the install scripts up: making linux installation disks previous: making a bootable diskette contents
subsections
creating a cd-rom
most modern pcs can boot from cd-rom and in the near future most computers will not even have floppy drives. therefore we present an alternative configuration using a cd-rom. in our method we are essentially creating three levels of disk image files:
- at the outermost level there is the iso file created by mkisofs.
- at the intermediate level there is the diskette image file that the bios can boot from.
- at the innermost level there is the compressed ram disk image.
creating the ram disk image
creating the ram disk image for a cd is really the same as for a diskette, only this time we will fit the modules.tar.gz file into the ram disk and hence the ram disk will be larger. run the following commands (put them in a shell script):
cd $myboot dd if=/dev/zero of=initrd.img bs=1k count=3000 mke2fs -f -n 300 initrd.img mount -o loop initrd.img mnt cp -a rootfs/* mnt cp modules.tar.gz mnt/lib umount initrd.img gzip -9 initrd.img
creating the diskette image
on the cd-rom we will use a diskette image of 2.88mb. real diskettes of this size are really rare, but most pcs can boot from a diskette image on a cd.
first prepare an image file of a 2.88mb diskette and copy grub to it.
dd if=/dev/zero of=isoboot.img bs=1k count=2880 mke2fs -f isoboot.img mount -o loop isoboot.img mnt mkdir mnt/boot mkdir mnt/boot/grub cp grub-0.92/stage1/stage1 mnt/boot/grub cp grub-0.92/stage2/stage2 mnt/boot/grub
next create the file mnt/boot/grub/menu.lst with the following contents:
title linux installation disk root (fd0) kernel (fd0)/boot/kernel initrd (fd0)/boot/initrd.img.gz
unmount and run grub:
umount mnt grub-0.92/grub/grub
inside grub type the following commands:
device (fd0) isoboot.img root (fd0) setup (fd0) quit
now the diskette image (hopefully) contains a working boot loader. keep a copy of this image, so you can add your kernels and ram disk images later.
finally copy your ram disk and kernel to it:
mount -o loop isoboot.img mnt cp linux-2.4.21/arch/i386/boot/bzimage mnt/boot/kernel cp initrd.img.gz mnt/boot umount mntthis diskette image is already quite full, so this spells the worst for newer software versions or extensions. as a first measure we can remove the ethernet drivers from modules.tar.gz. if we can boot from a cd-rom, we may as well assume we have a cd-rom and we can install from there. otherwise you can consider the isolinux cd boot loader, which does not use diskette images, but can use kernels and ram disk images anywhere on the cd.
it's worth considering the removal of both module support and network support from the kernel and to compile most common scsi host adapters directly into the kernel. functionality related to modules and networking can then also be removed from busybox.
creating the bootable cd
first create a directory tree for the iso image.
mkdir iso mkdir iso/boot mkdir iso/datanext copy some files to the data subdirectory (in our example we use a hypothetical file distro.tar.gz and copy the diskette image to the boot directory.
cp distro.tar.gz iso/data cp isoboot.img iso/bootnow create the iso image.
mkisofs -o bootcd.iso -b boot/isoboot.img \ -c boot/boot.catalog -r isofinally burn it to a cd-rom. use the appropriate device id.
cdrecord dev=0,1,0 -eject -pad -data bootcd.iso
this cd is bootable and from the booted linux you should be able to mount the cd-rom to access the data files.
next: creating the install scripts up: making linux installation disks previous: making a bootable diskette contents lennart benschop 2003-07-16