Previous Page | Next Page

  1. Introduction
  2. About Linux
  3. Installation and getting started
  4. Logging in and out
  5. Basic Linux Commands
  6. Linux Files and File Permissions
  7. Linux Directory Structure
  8. Finding Files
  9. Linux Help
  10. Setting Time
  11. Devices
  12. Tips
  13. Accessing Other Filesystems
  14. Accessing Removable Media
  15. Making and Managing Filesystems
  16. Emergency Filesystems and Procedures
  17. LILO and Runlevels
  18. Init
  19. Environment, Shell Selection, and Startu
  20. Linux Kernel
  21. Package Installation and Printing
  22. Configuration, Logging and CRON
  23. Keys and Terminal Configuration
  24. Sound Configuration
  25. Managing Users
  26. Passwords
  27. Process Control
  28. Configuration and Diagnostic Tools
  29. Overall Configuration
  30. Using PAM
  31. Basic Network Setup
  32. Tools and Terms
  33. Novell and Printing
  34. Inetd Services
  35. Xinetd Services
  36. Other Network Services
  37. FTP and Telnet
  38. Samba
  39. Identd (auth)
  40. X Configuration
  41. X Use
  42. Using X Remotely
  43. X Documentation
  44. DNS
  45. DHCP and BOOTP
  46. Apache
  47. NFS
  48. PPP
  49. Mail
  50. Routing
  51. IP Masquerading
  52. Proxy Servers and ipchains
  53. UUCP
  54. News
  55. NIS
  56. Network Security
  57. Secure Shell
  58. Text Processing
  59. Shell Programming
  60. Emacs
  61. VI
  62. Recommended Reading
  63. Credits

Linux Emergency Filesystems and Procedures

There are several ways to make a boot floppy, but basically there would be two types of boot floppys that make sense. The first is a simple boot floppy with a copy of your kernel that will mount your root device which is usually on your hard drive. This will give you another way to boot to your system and allow you to repair some problems such as a bad re-compile of a kernel or a lilo failure, but will not do much good if you develop a serious problem with your root filesystem. The second is a more elaborate boot floppy including a boot and root floppy and will independently support some tools that will allow repair of a root filesystem, or at least help you rescue files.

Making a simple Emergency boot floppy

How to make a single boot floppy:

  1. Find the kernel. It is usually /vmlinuz or /boot/vmlinuz. The file vmlinuz may be a softlink to the actual kernel executable. Find the executable kernel.
  2. Copy the kernel image to the floppy.

    dd if=/vmlinuz of=/dev/fd0

  3. Type the command "df" and examine it's output to determine where your root filesystem is. Your root is "/" and is mounted on something like "/dev/hda2".
  4. Set the kernel image on the floppy to the location of your root system.

    rdev /dev/fd0 /dev/hda2

    Your root filesystem may be somewhere other than "/dev/hda2".

  5. Test the floppy by rebooting your system and attempting to boot from it.

    You can use the command "badblocks /dev/fd01440 1440" to check the floppy for badblocks.

Making a Boot Floppy with a Root Filesystem (not yet complete or accurate)

To make a Linux boot floppy with a root floppy will require two floppy disks. One will be used for the kernel, and the other will hold the root filesystem.

Important functions needed by an emergency boot filesystem:
e2fsck, mount, tar, gzip, insmod, ftape module for kernel if using tape backups

Please note, that it is best to recompile your kernel to do this. This is because most kernel images use modules for support that are stored on your root filesystem and if your root filesystem is corrupt, it may not work properly. The good news is, however, that you will only need a kernel with minimal support, since this is for emergency use only, and you won't need networking support and some other features. The other option is to use a kernel image already compiled that does not depend on modular support if you can find one.

  1. Compile the kernel:
    Most options, you may answer no to with the following exceptions.
    • Make processor type 386 to support all machines with 1Gb of memory.
    • Enable PCI support with access mode=any and quirks=y.
    • CONFIG_SYSVIPC=y
    • CONFIG_BINFMT_ELF=Y
    • CONFIG_PNP=Y

    To compile the kernel make sure you provide floppy, CD-ROM and hard disk support for your types of devices such as IDE or SCSI. In my compile, I support IDE only. Set CONFIG_BLK_DEV_IDE=Y and all in the IDE category may be set to Y except for "other IDE chipset support", CONFIG_IDE_CHIPSETS=N. Ramdisk support (CONFIG_BLK_DEV_RAM=Y) with initial support. Virtual terminals (CONFIG_VT=Y). CONFIG_VT_CONSOLE=Y, CONFIG_SERIAL=Y, CONFIG_MOUSE=Y, CONFIG_PS2MOUSE=Y. Under filesystems I supported all but quota, kernel automounter support, and UMSDOS. Include all under partition table support. Include VGA text console and Magic SysRq key.

  2. Copy the kernel image to the first floppy.

    dd if=/vmlinuz of=/dev/fd0

  3. Set the image on the floppy to boot to a root filesystem on your floppy device.

    rdev /dev/fd0 /dev/fd0

  4. Prepare the root floppy (the second floppy disk)
    1. type "fdformat /dev/fd0H1440" to format the floppy
    2. type "mkfs -t ext2 -c /dev/fd0H1440" to create a filesystem on the floppy