Main
CouchMan
Flac-Jacket
Downloads
 -mostly scripts
Script Bits
Docs
Misc Notes
Tasks
Personal
hash bang slash
      bin slash bash

Cheat Sheet for Tasks



Also have a look at the Problem Resolution Page

Format a Floppy Disk:

    Actually, you want to format the disk, then add a file system.
  1. Format the disk with fdformat.
      Example: For a 1.44MB disk, in fd0 (windows A: drive)
      fdformat /dev/fd0H1440
  2. Use mkfs to add a filesystem so you can write to the disk.
      mkfs /dev/fd0
  3. Now you can mount the floppy drive and access the disk.
      mount /mnt/floppy



Create an Emergency Boot Disk

  • There are two methods to create this disk depending on the kernel type (modular or monolithic). Both are explained below.
  • An Emergency Boot Disk is different from a Rescue Disk
      An Emergency Boot Disk starts the system using the kernel which is on the system hard drive. It is similar to Lilo.
      A Rescue Disk is used in conjunction with the Emergency Boot Disk and it contains a working kernel image. It is covered in the next section.

      Most systems will use a kernel that supports loadable modules, known as a Modular Kernel. If you compiled the kernel not to use modules, maybe a firewall or similar device, then use the monolithic section that follows.

  • Standard System Emergency Boot Disk:
    • run mkbootdisk (optionally you can point to a different device ete, but /dev/fd0 is default)

  • Monolithic Kernel Boot Disk:
    1. format a disk with fdformat /dev/fd0H1440
    2. copy the link of the boot image to the raw device with
      cp /boot/vmlinuz /dev/fd0H1440 (answering y to override "/dev/fd0H1440")
    3. confirm the root device (where the root file system is located)
      rdev
    4. set the floppy to use the device as indicated with rdev
      rdev /dev/fd0H1440 /dev/hda6 (or whatever from step 3)
    5. force the root file system to initially be mounted as read-only
      rdev -R /dev/fdH1440 1
  • You should try booting with the newly created disk, or wait till you really really need it, then test :)



Creating a Rescue Disk:

  1. locate the rescue.img disk image off the install CD-ROM. You may want to copy it to your hard drive, but this is optional.
  2. cd to the directory with the image
  3. dd if=rescue.img of=dev/fd0 bs=72k (you may not need to set the block size)
  4. to test (or use) boot with the Emergency Boot Disk (above) and type "rescue" at the prompt.
    You will be prompted for the Rescue Disk.



Mount an NFS file system without fstab:

Normally, you would have all your NFS mounts defined within /etc/fstab, but if you need to manually mount them, here is the command:
    For a remote NFS server called Nova exporting /usr/data, and a local mount point called /mnt/data1 use:
    mount -t nfs nova:/usr/data /mnt/data1



Mount an ISO-9660 Image File:

You don't need to burn a CD to access the contents of an ISO image file:
    Where /tmp/source_file.iso is an image file and /mnt/iso_dir is an empty directory use:
    mount /tmp/source_file.iso /mnt/iso_dir/ -t iso9660 -o loop



Mount a Windows Share without fstab:

    You can manually access a Windows Share with this:
    mount -t smbfs -o username=<user>,password=<passwd>,workgroup=<workgroup>,ip=<xxx.xxx.xxx.xxx> //<netbiosname>/<sharename> <mountpoint>
    You can also use credentials=<filename> instead of the username and password options. (see man smbmount)



Runlevels

These are the runlevels that you may want ot change using init or telinit
    Runlevels:
    0    shutdown
    1    single user mode (for system maintenance or recovery only)
    2    multiuser mode (networking is enabed, but no NFS)
    3    standard runlevel (includes file sharing and most other services)
    4    user defined or empty
    5    same as 3, but with DNS, X11, xdm
    6    reboot

    An example: to reboot the saystem use telinit 6
    Each Runlevel activates the scripts in its respective rcX.d directory (/etc/rc.d/rc0.d, rc1.d, etc)
    The runlevel scripts are actually links to scripts in /etc/rc.d/init.d which can be controlled with the chkconfig command.



Create a Data DVD

  1. gather the files into an ISO9660 image file:
      mkisofs -R -o /path/to/cdimagefile.raw <path to file1> <path to file2>
      You may want to use -r instead of -R, see the man page for details.
  2. copy the image to a DVD:
      cdrecord /data/temp/cdimage.raw


Page created September 2001.
Last Updated March 2005.


Back to Main Page
Site maintained by: Pete Nesbitt RHCE
Date: Thursday, 02-Sep-2010 16:06:37 PDT