PXE boot Trinity Rescue Disk

Friday, 22 August 2008

Here's how I managed to PXE boot TRK(Trinity Rescue disk) using free software tools and a Windows XP sp2 machine as the server.

In order to PXE boot a computer you need

  • a wired PXE enabled (ethernet)network adapter. You should configure BIOS to network boot using PXE
  • a TFTP server(to serve boot files to PXE network clients) 
  • a DHCP server(to automatically assign IP addresses)

Trinity also requires a NFS server.

Here we go 

0) Download and burn/mount Trinity Rescue Disk  

1) Download TFTPD32 (a free zero installation windows TFTP/DHCP server)

2) Download Cygwin , the Windows Unix-like GNU environment. Cygwin is a large download, but I happened to have it already installed so I chose to use its tftp daemon.

Cygwin will serve Trinity files to the network client through its  NFS server.

You need to install the NFS package by launching CygWin's setup.exe. After selecting a download mirror, Click on the "Net" category and click nfs-server.

You should also select cygrunsrv from the "Admin" category. This will allow Cygwin nfs-server to be installed and run as a Windows service. Click next and finish to install and configure the packages

The system will download the nfs-server package and needed dependencies and will prompt you to do some initial configuration.

Please note that the configuration tool will prompt you to create a Windows user account for the nfs-server. You must set a password, too, otherwise your nfs-server service will not be able to run.

Once you configured NFS server through the wizard, it's time to edit /etc/exports (the file is located at c:\cygwin\etc\exports) and "share" your trinity files. Add this line at the bottom of the file by using your favorite text editor:

/cygdrive/c/PXE 192.168.0.0/255.255.255.0(ro, no_root_squash)

You need to replace 192.168.0.0 with the actual IP(*) of your network card. (this is in fact a network address, notice the subnet mask) 

Now we need to copy Trinity Rescue Disk files to a folder on the Windows XP machine.

Mount your Trinity ISO using an ISO/virtual CD tool(such as the free Daemon Tools Lite), or insert your Trinity Rescue Disk CD.

  • Download the Trinity PXE generator script (trkpxesetup.bat) to your C drive.
  •  Open a windows command prompt: Start->Run, type 'cmd' without the quotes and hit <ENTER>.
  • Write the following commands,  line by line, and hit  <ENTER> after each line
c:
cd \
trkpxesetup.bat

This script will  create a c:\PXE folder(warning: it will be deleted if it already exists),lookup your trinity CD and copy the files. Next, it will prompt you to input your nfs server IP (*mentioned above) and generate the pxelinux configuration file for you.

The files are there, we need to start the NFS, TFTP, and DHCP servers.

To start NFS, just right click My Computer on your windows desktop, and choose Manage, then go to Services(under Services and applications). Right click CygWin portmap and choose restart. NFS is up.

To start TFTP/DHCP, please unpack your tftp32(which you downloaded earlier) into c:\tftp32, enter the folder and launch tftpd32.exe

  • Click the settings button, and tick PXE compatibility
  • Browse and choose c:\PXE as the base directory, then hit OK.
  • Next, go to the DHCP tab,  and configure leases. For our example i would set the IP pool starting address to 192.168.0.2(because , in our example, 192.168.0.1 is already taken by the server), and pool size to 10 so we can accommodate 10 clients.
  • Boot file should be set to /pxelinux.0 

That's it, you're done. You can now boot a remote system by choosing PXE from its BIOS boot menu/BIOS boot settings. Make sure you watch the Log tab of tftp32 to see what happens.

Succesful? Here are a few useful TRK(they also call it Trinity Rescue Kit) commands

  • mc: midnight Commander, a text based file manager 
  • mountallfs : will mount all linux and windows drives in read-write mode. umountallfs will unmount all. 
  • fileserver [-s] : will setup a windows share for each mounted filesystem. If -s is specified, you can setup an user/pass. You can remotely access those shares fdrom another windows/SAMBA machine by searching for TRKSRV. You can even type it in windows(not internet) explorer address bar as this: '\\TRKSRV'
  • passwd root : will change your root password. Once you setup a password, you can start a ssh server by typing /etc/init.d sshd start 

More info on Trinity can be found on Trinity Home and Trinity forums  

A bit of glossary

  • PXE (preexecution environment) allows you to boot a machine over the (wired) network, without needing a CDROM drive or a floppy drive. You can even boot and run an operating system such as Linux over the network, without a harddisk.
  • Trinity Rescue Disk is a "live" Linux distribution design to help with data recovery  and  service  tasks (virus removal, partitioning, disk cloning over the network.)


Give us some social love (it really works now)!

Reddit! Del.icio.us! StumbleUpon! Yahoo! Swik!



Comments (1)
RSS comments
1. 26-10-2008 17:00
Alex

It doesn't work. I'm using the latest beta version of TRK 3.3 and te latest version of sygwin. I use an etherboot chip on my nic to boot via PXE. I have followed your intructions. All required services are running. 
 
However, when loading "trkramfs" it says "mount: RPC program not registered". When I launch wireshark: the protocol that has been used is sunrpc. Sunrpc is automatically installed with cygwin. I'm not a linux expert, but how can I be sure NFS works properly? Is there a way to test it? I think NFS is the problem.

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Please don't use comments to plug your web site. Links are rel='nofollow'-ed
  • Please refresh the page if you're having trouble with the security image code
Name:
E-mail
Homepage
Title:
Comment:

:) :grin ;) 8) :p
:roll :eek :upset :zzz :sigh
:? :cry :( :x
Code:* Code

Last Updated ( Thursday, 18 September 2008 )
 
Post and Bid on Joomla/PHP projects! Join EUFreelance.com for free!

Joomla stuff

Newsletter

Subscribe to TeachMeJoomla's newsletter
Name:
Email:


Auto tags

pxe boot

trinity rescue disk

pxe boot disk

rescue disk

XP rescue disk

trinity rescue disk download

pxe boot windows

pxe server

windows xp rescue disk

windows pxe server

trinity rescue disc

pxe boot windows xp

PXE boot server windows

Trinity Rescue Kit PXE

windows xp pxe install