Site Tools

Site menu


Translations of this page:
en:tech:tools:trinity_rescue_kit_patched

Trinity Rescue Kit 3.4 build 372-2 patched

I sometimes ran into situations where I had to transfer files from a PC without output screen (caused by lack of monitor, graphic card failure…) to another computer.

When one wants to quickly make a PC running as a SMB (CIFS) file server, the live boot CD Trinity Rescue Kit created by Tom Kerremans did the trick without effort. This live boot CD tool based on Mandriva 2005 loads into memory, getting an IP address by DHCP request, and displays a simple menu for everyone to be able to start a SSH server, to mount all partitions and to start a public file sharing Samba server without password. Unfortunately, it requires to select two different entries in the menu, and resetting the root password is expected before starting the SSH server. So, without any display under a QWERTY keyboard for an AZERTY one, all that manipulations become a little bit risky…

Trinity Rescue Kit menu screen

Patch version 2

That's why I have patched the initial linux ramdisk in order to add the following boot options:

  • autoserver : start SSH server, mount partitions into /share_points and start Samba server
  • rootpass=…: change the root password as noticed after the sign =
  • setkmap=…: change the keyboard layout as noticed after the sign =
  • setlocale=…: change the locale as noticed after the sign =
  • voluuid=…: alternative option to vollabel=, to point the Trinity Rescue Kit partition out
    (From now on, that partition can be in a linux format like ext2)

Sample grub2 menu to launch Trinity Rescue Kit 3.4 build 372-2:

## Note: for splash image, boot option gfxpayload=800x600 is not supported
## by prog /usr/bin/fbresolution. Use vga=788 instead.
 
## Init variable fs_opt_id to allow starting on any media support
insmod extcmd
probe -f -s fstype "($root)"
if test "$fstype" == "iso9660"; then
  probe -l -s fs_opt_id "($root)"
  fs_opt_id="vollabel=$fs_opt_id"
else
  probe -u -s fs_opt_id "($root)"
  fs_opt_id="voluuid=$fs_opt_id"
fi
unset fstype
 
menuentry --class="trk" "TRK 3.4 build 372-2 - SCSI drivers, text menu, autoserver from RAM (256Mb min)" "$fs_opt_id" {
  set fs_opt_id="$2"
  echo "Loading linux kernel..."
  linux /kernel.trk ramdisk_size=65536 root=/dev/ram0 $fs_opt_id vga=788 splash=verbose pci=conf1 scsidrv trkinmem trkmenu rootpass=trk setkmap=fr setlocale=fr_FR.UTF-8 autoserver
  echo "Loading initial ramdisk..."
  initrd /initrd.trk
}
 
menuentry --class="trk" "TRK 3.4 build 372-2 - SCSI drivers, text menu, autoserver" "$fs_opt_id" {
  set fs_opt_id="$2"
  echo "Loading linux kernel..."
  linux /kernel.trk ramdisk_size=65536 root=/dev/ram0 $fs_opt_id vga=788 splash=verbose pci=conf1 scsidrv trkmenu rootpass=trk setkmap=fr setlocale=fr_FR.UTF-8 autoserver
   echo "Loading initial ramdisk..."
  initrd /initrd.trk
}

CD-ROMs Trinity Rescue Kit 3.4 build 372-2 versions a, b, c (patched)

To personalize the CD-ROM, I have added at the top of the Isolinux/Syslinux menus, a default boot entry after 5 seconds. In that configuration, Trinity Rescue Kit mounts all the partitions, starts automatically the SMB (CIFS), SSH, FTP (and SFTP) servers, and according to the CD version, loads SCSI drivers (version c) and ejects the CD-ROM (versions b and c).
The version a doesn't eject the CD-ROM so that old PC can work with less than 512 MB RAM.

All the boot menu entries set the locale and the keyboard layer to french and have the option rootpass=trk (default password). In that way, one can easily change the root password in the menu entry. I also lift the entry menu number #8 up to the second position, because It seems to me to have similarities with entry #1.

Finally, I wrote three bash scripts at the root of the CD. This programs are running perfectly under Debian 7 but can hold minor bugs. Here they are:

  • make-trk-isolinux.sh: generates a new live boot iso file from its own base directory (Isolinux technology).
  • make-trk-syslinux.sh: copies the files from its own base directory to a FAT formatted USB stick (Syslinux technology).
  • make-trk-usbhd_grub.sh: copies the files from its own base directory to any "/media mounted" write access device, whatever the target file system type is (GRUB-PC aka grub2 technology with a syslinux sub-menu (experimental chainload)). For booting USB sticks, I recommend that last method which is more reliable for any kind of BIOSes.

Trinity Rescue Kit CD patched start menu

Trinity Rescue Kit build 372-2 (patched) is released under the GPL free licence in the hope that it will be useful, but WITHOUT ANY WARRANTY.

I added two directories on the CD:

  • boot/ contains GRUB-PC
  • doc/ contains official documentation of TRK 3.4 and informations on my modifications
├── AUTORUN.INF
├── boot/
│   ├── grub/
│   └── mbr.syslinux.bin
├── boot.cat
├── bootlogo.jpg
├── changelog
├── disableautorun.exe
├── doc/
│   ├── official-trk-doc/
│   │   ├── trk-doc.html
│   │   └── trk-doc-img/
│   ├── repacked-doc/
│   │   ├── scripts.changelog/
│   │   ├── howto-patch.txt
│   │   ├── initrd.trk.changelog
│   │   ├── initrd.trk-scripts.tar.gz
│   │   ├── lisezmoi.txt
│   │   ├── readme.txt
│   │   └── trk-root-password.txt
│   └── Trinity Rescue Kit website.URL
├── initrd.trk
├── initrd.trk.old
├── isolinux.bin
├── isolinux.cfg
├── kernel.trk
├── ldlinux.sys
├── make-trk-isolinux.sh
├── make-trk-syslinux.sh
├── make-trk-usbhd_grub.sh
├── memdisk
├── memtest.x86
├── pxelinux.0
├── pxelinux.cfg/
├── syslinux.cfg
├── trinity.ico
├── trk3/
└── vesamenu.c32

Download CD images

iso files build #2a + #2b + #2c – 2016-01-07 02:04:29 +0100:

iso file build #2 – 2014-09-06 04:09:43 +0100:

Comments

Enter your comment:
If you can't read the letters on the image, download this .wav file to get them read to you.
 
en/tech/tools/trinity_rescue_kit_patched.txt · Last modified: 05/01/2019 00:46 (external edit)