All pastes #1093224 Raw Edit

Stuff

public text v1 · immutable
#1093224 ·published 2008-08-05 22:18 UTC
rendered paste body
----------------------------------------------------------------------------
RIPLinuX v6.1 - Kent Robotti <krobotti@gmail.com> 7-20-2008

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

The kernel is version 2.6.26. There's a 32bit kernel and a 64bit kernel.

The bootable CD image `RIPLinuX-6.1.iso' can be written to a CD disk,
using cdrecord etc.

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

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

The 'fsck.reiserfs' and 'fsck.reiser4' programs are used to check and repair
a Linux reiserfs and reiser4 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 or ext3
filesystem.

The 'ntfsresize' program non-destructively resizes Windows XP/Vista/2k/NT4
or Windows Server 2003 NTFS filesystems. Read /usr/doc/RIPLinuX/ntfsresize.txt
on the rescue system.

The 'ntfs-3g' or 'ntfsmount' 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!"

# ntfsmount /dev/sda1 /mnt/sda1        "Mount NTFS partition read-write!"
# ntfsmount /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 'partimage' saves partitions in the ext2,
ext3, reiserfs, jfs, xfs, ufs, ntfs, fat16 and fat32 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 or bzip2 formats.

A complete listing of the system's contents can be found here:
http://www.tux.org/pub/people/kent-robotti/looplinux/rip/docs

============ WinNT/XP/Vista password change/erase program! ==============

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.

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

You can use 'cdrecord' to write 'RIPLinuX-6.1.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-6.1.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-6.1.iso

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

If you want to use Windows to write RIPLinuX-6.1.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-6.1.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 the RIPLinuX 'bin/cpio' here!"

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

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

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-6.1.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.
      If you want *initramfs* to use TMPFS instead of RAMFS, apply
      the patch "inittmpfs.diff" to the kernel source.
      http://www.tux.org/pub/people/kent-robotti/looplinux/rip

====================================================================
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 a 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 a ext3 filesystem.

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

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

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

   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 -j /dev/sda2  "Create Ext3 filesystem on /dev/sda2, if
                           that's the Linux partition!"

   NOTE: You can use GParted on RIPLinuX to shrink a Windows XP 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-6.1.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/kernel /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 RIPLinuX CD ISOLinux 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/kernel root=/dev/sda2 ro
   grub> boot

NOTE: You can use the Linux system on the RIPLinuX 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 or Ext3 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. 
---------------------------------------------------------------

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

                      Using CLAMAV virus scanner.

  --------------------------------------------------------------------
  # dhclient (or) dhcpcd  "Setup network connection."

  You need to download the latest virus data (about 15MB).

  # freshclam

  # mount -t ntfs -o ro /dev/sda1 /mnt/sda1  "Mount your Windows partition."

  It could take an hour or two to scan for viruses.

  # clamscan --exclude=pagefile.sys --exclude=hiberfil.sys \
    -l /var/log/clamscan.log -r /mnt/sda1

  If you're short on space, you can tell clamscan to use a temp directory
  on a mounted Linux partition.

  # clamscan --tempdir=/mnt/sda2/tmp --exclude=pagefile.sys \
    --exclude=hiberfil.sys -l /var/log/clamscan.log -r /mnt/sda1

  If any viruses are found, you can mount the partition read-write
  and delete the infected files.

  # umount /mnt/sda1
  # ntfs-3g /dev/sda1 /mnt/sda1  "Mount read-write!"

  ATTENTION!   ATTENTION!   ATTENTION!

  There's a script 'vscan' on RIPLinuX that automates the above!

  usage: vscan device

  Run 'freshclam' first to download the virus data files!

  # freshclam

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

  example: vscan /dev/sda1
  example: vscan -q /dev/sda1  "Be Quiet, unless VIRUS found!"

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

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

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