---------------------------------------------------------------------------- RIPLinuX v9.3 - Kent Robotti Jul 4, 2009 Recovery Is Possible (RIP) is a CD or USB boot/rescue/backup/maintenance system. It has support for many filesystem types (Reiserfs, Reiser4, Btrfs, Ext2/3/4, HFS+, ISO-9660, UDF, XFS, JFS, UFS2, CIFS, MS DOS, NTFS (ntfs-3g), Squashfs, 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.29.6. There's a 32bit kernel, and a 64bit kernel. The bootable CD image `RIPLinuX-9.3.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' 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 '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 ============ 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 the RIPLinux site. Read the README at the site. ========= Writing RIPLinuX-9.3.iso to a CD, using Linux or Windows! ========== You can use 'cdrecord' to write 'RIPLinuX-9.3.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-9.3.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-9.3.iso You don't use the blank option with a CD-R write once disk. If you want to use Windows to write RIPLinuX-9.3.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-9.3.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 GRUB or GRUB2 as the bootloader, do this! /tmp/rip2# bash boot/mkiso.sh grub . /tmp/rip-iso rip.iso /tmp/rip2# bashboot/mkiso.sh grub2 . /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-9.3.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-2.6.28.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-9.3.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. --------------------------------------------------------------- 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/lzma) extension, and be packed for extraction/installation from '/' on the Linux system. It can be a self-made, third-party, or Slackware package (12.2 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/menu.lst (if using GRUB 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 grub . /rip-iso rip.iso "Use GRUB 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 tgz packages can be on any media, just as long as you pass the location to the kernel with the 'pkg=' option. ------------------------------------------------------------------- Using ClamAV or F-PROT virus scanner. -------------------------------------------------------------------- # dhcpcd eth0 "Setup network connection." ----------- ClamAV instructions! ----------- Run 'freshclam' to download the clamav virus data files (about 20MB!). # 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. ========================================================================