----------------------------------------------------------------------------
RIPLinuX 13.7 - Kent Robotti <kent.robotti@gmail.com> Jan 14, 2012

Recovery Is Possible (RIP) is a CD or USB boot/rescue/backup/maintenance
and general purpose system. It has support for many filesystem types
(Reiserfs, Btrfs, Ext2/3/4, HFS+, ISO-9660, NILFS2, UDF, XFS, JFS, UFS2,
CIFS, MS DOS, NTFS (using ntfs-3g), Squashfs+XZ+LZO, and VFAT) and
contains many utilities for system recovery. It also has IDE/SCSI/SATA,
RAID, LVM2, and Ethernet/Wireless network support.

You'll need at least 512MB of RAM and i686 (Pentium III with PAE
support) CPU to boot it. The 32 and 64 bit kernels are 3.2.1.

The bootable CD image `RIPLinuX-13.7.iso' can be written to a CD disk,
using cdrecord etc., or put on a USB flash drive.

The programs (fetchmail, curl, wget, ssh/sshd, mutt, links, lynx, msmtp,
tmsnc, slrn, epic5, lftp, and FireFOX) have SSL support.

It includes the CD/DVD UDF filesystem packet writing tools (cdrwtool,
mkudffs, and pktsetup).

The 'fsck.reiserfs' program is used to check and repair a Linux reiserfs
filesystem.

The 'xfs_repair' program is used to repair a Linux xfs filesystem.

The 'jfs_fsck' program is used to check and repair a Linux jfs filesystem.

The 'e2fsck' program is used to check and repair a Linux ext2/3/4 filesystem.

The 'ntfsresize' program non-destructively resizes Windows XP/Vista/7
NTFS filesystems. Read /usr/doc/RIPLinuX/ntfsresize.txt on the system.

The 'ntfs-3g' program will enable you to write to a Windows NTFS filesystem.

# ntfs-3g /dev/sda1 /mnt/sda1          "Mount NTFS partition read-write!"
# ntfs-3g /dev/sda1 /mnt/sda1 -o ro    "Mount NTFS partition read-only!"

The 'parted' program is used for creating, destroying, resizing fat16/32,
ext2/3, checking and copying partitions, and the file systems on them.
This is useful for creating space for new operating systems, reorganising
disk usage, copying data between hard disks and disk imaging.

The partition image program 'fsarchiver' can save partitions in the ext2/3/4,
reiserfs, reiser4, jfs, xfs, btrfs, and ntfs formats to an image file. Only
used blocks are copied to save space and increase the speed. The image file
can be compressed in gzip/lzma/lzop formats. The program 'partimage' (also
on the system) is similar.

============ Windows XP/Vista/7 password change/erase programs! ==============

The chntpw program will enable you to view some information and change/erase
user passwords in a Windows NT/XP/Vista SAM userdatabase file.

Read /usr/doc/RIPLinuX/chntpw/README.
# ntpasswd  "Script to automate the process!"

There's also a CMOS/BIOS password recovery tool 'cmospwd'. Read /usr/doc/
RIPLinuX/cmospwd.txt.

There's also pcloginnow and pccmosclean in the packages directory at another
site, but in X on the system you'll have the option to download and install
them on the system.

========= Writing RIPLinuX-13.7.iso to a CD, using Linux or Windows! ==========

You can use 'cdrecord' to write 'RIPLinuX-13.7.iso' to a CD under Linux.

The example below assumes a CD writer on device /dev/scd0.

# cdrecord -v blank=fast -tao dev=/dev/scd0 RIPLinuX-13.7.iso

Only use the 'blank=fast' option if the CD-RW disk has something on it.

Use the multi-session option and you can use the remaining space on the CD-R/RW.

# cdrecord -v blank=fast -multi -tao -data dev=/dev/scd0 RIPLinuX-13.7.iso

You don't use the blank option with a CD-R write once disk.

If you want to use Windows to write RIPLinuX-13.7.iso to a CD, use burncdcc
or another program.

ftp://terabyteunlimited.com/burncdcc.zip

You can then boot the CD disk.

=============================== Q & A =================================

Q. Is it possible to change something on the system?

A. You can remaster RIPLinuX.

# mkdir /tmp/rip1 /tmp/rip2 
# mount -o loop RIPLinuX-13.7.iso /tmp/rip1
# cp -a /tmp/rip1/* /tmp/rip2
# umount /tmp/rip1 ; rmdir /tmp/rip1
# mkdir /tmp/rip2/boot/1
# cd /tmp/rip2/boot/1
/tmp/rip2/boot/1# gzip -dc ../rootfs.cgz | cpio -iumdv

Make the changes and remove the old system.

/tmp/rip2/boot/1# rm ../rootfs.cgz

Then cpio/gzip the new system.

/tmp/rip2/boot/1# find . | bin/cpio -v -o -H newc | gzip -9 >../rootfs.cgz
                             ^^^
                     "Use 'bin/cpio' from rootfs, because the version
                      on your system may cause a problem!"

# rm -rf /tmp/rip2/boot/1
# mkdir /tmp/rip-iso
# cd /tmp/rip2 
/tmp/rip2# bash boot/mkiso.sh . /tmp/rip-iso rip.iso

NOTE: If you want to use GRUB2 as the bootloader, do this!
      /tmp/rip2# bash boot/mkiso.sh grub2 . /tmp/rip-iso rip.iso
      The default is to use ISOLinux as the bootloader!

      NOTE: The 'grub2' option only works on the GRUB2 version of RIPLinuX.

Write /tmp/rip-iso/rip.iso to a CD!

You can now delete the /rip2 directory.
# rm -rf /tmp/rip2

====================================================================
Q. Is it possible to replace the kernel?

A. # mkdir /tmp/rip1 /tmp/rip2 
   # mount -o loop RIPLinuX-13.7.iso /tmp/rip1
   # cp -a /tmp/rip1/* /tmp/rip2
   # umount /tmp/rip1 ; rmdir /tmp/rip1

   Replace the kernel in the /tmp/rip2/boot directory.

   Create and write /tmp/rip-iso/rip.iso to a CD as described above!

NOTE: The replacement kernel must have INITRD and TMPFS support builtin,
      use the respective kernel config file when compiling a kernel.
      If you want 'initramfs' to use TMPFS instead of RAMFS, apply
      the patch "tmpfs.gz" to the kernel source.
      The patch is in the '/boot/doc' directory on the ISO.
      It only works with kernel 3.2.1, and possibly later.

====================================================================
Q. Is it possible to install the system on my hard drive?

A. You need to create a Linux partition using 'fdisk' etc., then
   you need to put an ext3 etc. filesystem on it, then you need
   to mount the partition and extract 'rootfs.cgz' to it.

   The example below assumes you created a Linux partition on /dev/sda2,
   with an ext3 filesystem.
--------------------------------------------------------------------

   You can resize Windows to make room on your hard drive for Linux.

   You can resize a Windows Vista/7 NTFS partition, using its Disk
   Management program. This is the preferred resize method.

   Under Vista, click on Start.
   Right click on Computer and choose Manage.
   Click on Disk Management under Storage.
   Right click on the Vista partition you want to modify,
   then click on Shrink Volume.
   Enter the amount of space to shrink in MB: 40000

   You can then use fdisk under Linux to create a 40OOO MB Linux partition.

   # fdisk /dev/sda
   Command: p
   Command: n      "Add a new partition!"
   p               "Create primary partition!"
   Partition number: 2
   First cylinder: "Press enter for default!"
   Last cylinder:  "Press enter for default!"
   Command: p
   Command: w      "Write table to disk and exit, or q to Quit!"

   # mke2fs -t ext3 /dev/sda2  "Create Ext3 filesystem on /dev/sda2!"

   NOTE: You can also use GParted on RIPLinuX to shrink a Windows partition!

--------------------------------------------------------------------

   Mount the RIPLinuX CD or ISO image that has /boot/rootfs.cgz on it.

   # mount -rt iso9660 /dev/hdd /mnt/hdd        "Mount CD!"
   # mount -o loop RIPLinuX-13.7.iso /mnt/hdd   "Mount ISO image!"
   # mount -t ext3 /dev/sda2 /mnt/sda2
   # cd /mnt/sda2
   /mnt/sda2# gzip -dc /mnt/hdd/boot/rootfs.cgz | cpio -iumdv
            # cp /mnt/hdd/boot/kernel32 /mnt/sda2/boot

   Add this line to the top of the /mnt/sda2/etc/fstab file.

   /dev/sda2    /    ext3    defaults  1   1

   # rm /mnt/sda2/init  "Remove /init link!"

   You'll need to use GRUB etc. to boot it.

   From the RIP CD menu, you could do this to boot the Linux
   partition on /dev/sda2.

   Choose GRUB from the menu.

   Press the `c' key to get a command prompt.

   grub> root (hd0,1)
   grub> kernel /boot/kernel32 root=/dev/sda2 ro "Add 'nokeymap' to skip prompt!"
   grub> boot

   For GRUB2, it would be.

   grub> set root=(hd0,2)
   grub> linux /boot/kernel32 root=/dev/hda2 ro "Add 'nokeymap' to skip prompt!"
   grub> boot

NOTE: You can use the Linux system on the RIP CD to create the Linux
      partition, and extract rootfs.cgz to it.

---------------------------------------------------------------
Q. Is it possible to install the Linux system to a partition on
   a USB flash drive?

A. Use the mkextlin.sh script to do that.

   It will create a partition and put an ext2/3/4 or btrfs filesystem on it,
   then the Linux system 'rootfs.cgz' will be extracted to it. You'll be
   able to boot and use it, just like if it was installed to a hard drive
   Linux partition.
---------------------------------------------------------------

If you want to use a serial console, do this.

Put the serial line below at the top of isolinux.cfg for the CD version,
or syslinux.cfg for the USB version.

serial 0 19200

Pass 'console=' to the kernel in isolinux.cfg or syslinux.cfg.

APPEND vga=normal initrd=/boot/rootfs.cgz root=/dev/ram0 rw console=ttyS0,19200

-----------------------------------------------------------------------------
To remaster RIP and install add-on package(s).

The add-on package(s) must have a '.t[gx]z' (tar/gzip/xz) extension, and be
packed for extraction/installation from '/' on the Linux system.

It can be a self-made, third-party, or Slackware package (13.37 or later?).

# mkdir /rip1 /rip2
# mount -o loop RIPLinuX-X.X.iso /rip1
# cp -a /rip1/* /rip2
# umount /rip1 ; rmdir /rip1
# mkdir /rip2/boot/pkg

You could put the add-on package(s) in /rip2/boot/pkg.

If you pass this to the kernel 'pkg=/dev/hdc,/boot/pkg', when the
system boots it will mount /dev/hdc and prompt you to install any
'*.tgz' packages it finds in /boot/pkg.

If you pass this to the kernel 'pkg=/dev/hdc,/boot/pkg,noprompt', you
won't be prompted.

If you pass this to the kernel 'pkg=/dev/hdc,/boot/pkg,prune', any docs,
and development files and libraries won't be installed if found in a package.
That means header files '*.h' and libraries '*.a' and docs in /usr/doc.

If you pass this to the kernel 'pkg=/dev/hdc,/boot/pkg,noprompt,prune',
you won't be prompted, and any docs and development files and libraries
won't be installed if found in a package.

You can pass that to the kernel in /rip2/boot/isolinux/isolinux.cfg, or
/rip2/boot/grub/grub.cfg (if using GRUB2 as the bootloader).

# mkdir /rip-iso
# cd /rip2
/rip2# bash boot/mkiso.sh . /rip-iso rip.iso       "Use ISOLinux as bootloader!"
/rip2# bash boot/mkiso.sh grub2 . /rip-iso rip.iso "Use GRUB2 as bootloader!"

Write /rip-iso/rip.iso to a CD or USB drive!  "You can only boot an ISOLinux
                                               ISO from a USB drive!"

You can now delete the /rip2 directory.
# rm -rf /rip2

NOTE: The t[gx]z packages can be on any media, just as long as you
      pass the location to the kernel with the 'pkg=' option.

----------------------------------------------------------------------------
To remaster RIP and install bash shell script to be run at boot time.

# mkdir /rip1 /rip2
# mount -o loop RIPLinuX-X.X.iso /rip1
# cp -a /rip1/* /rip2
# umount /rip1 ; rmdir /rip1
# mkdir /rip2/boot/script

You could put the shell script in /rip2/boot/script.

If you pass this to the kernel 'script=/dev/hdc,/boot/script/foo.sh', when
the system boots it will mount /dev/hdc and run /boot/script/foo.sh.

You can pass that to the kernel in /rip2/boot/isolinux/isolinux.cfg, or
/rip2/boot/grub/grub.cfg (if using GRUB2 as the bootloader).

# mkdir /rip-iso
# cd /rip2
/rip2# bash boot/mkiso.sh . /rip-iso rip.iso       "Use ISOLinux as bootloader!"
/rip2# bash boot/mkiso.sh grub2 . /rip-iso rip.iso "Use GRUB2 as bootloader!"

Write /rip-iso/rip.iso to a CD or USB drive!  "You can only boot an ISOLinux
                                               ISO from a USB drive!"

You can now delete the /rip2 directory.
# rm -rf /rip2

  -------------------------------------------------------------------

                    Using ClamAV or F-PROT virus scanner.

  --------------------------------------------------------------------
  # dhcpup -u      "Setup wired network connection."
  # wificonfig     "Setup wireless network connection."

              ----------- ClamAV instructions! -----------

  Run 'freshclam' to download the clamav virus data files (about 30MB!).

  # freshclam

  If you have a Windows partition on /dev/sda1 you want to scan!

  example: vscan /dev/sda1               "It's quiet, unless virus is found!"

  example: vscan -t /temp_dir /dev/sda1  "Specify temp directory to use,
                                          the default is /tmp!"

              ----------- F-PROT instructions! -----------

  example: vscan -f /dev/sda1
  Use the "-d" option to automatically disinfect infected files without asking.
  example: vscan -f -d /dev/sda1 

  --------------------------------------------------------------------

========================================================================
        If you want to boot RIPLinuX from a USB Flash/Pen drive.
========================================================================

Read the USB README.
========================================================================
