|Last modified: 16-06-2020|
System Rescue CD is one of the most well-know Linux distributions that aim at recovering a dead computer. This is a quick guide on how to use SRCD to boot from a USB keydrive, and launch an SSH server and Samba so as to copy files from the local hard disk to a remote commputer.
Important: "Never mount anything on /mnt ! It would freeze the system. Use mkdir /mnt/mydir and mount on /mnt/mydir instead."
Make sure the options are typed before the "--" part, which separates the main and alternative sections.
setkmap=fr for French keyboard
nonm to disable the Network-Manager service
dodhcp to have DHCP assign an IP address; One the system is up and running, use "ifconfig -a" to display the IP address which the DHCP server leased to the computer.
rootpass=test, to assign a root password and use SSH later
No easier way than buiding a custome ISO and burning a new USB keydrive?
The ssh server is automatically started but you can type the following command anyway: /etc/init.d/sshd restart. You can stop it with /etc/init.d/sshd stop.
Of course you can also use SystemRescueCd as an SSH client to connect to an SSH server: just use ssh email@example.com or scp source dest. Both source and dest may be local or remote. Use firstname.lastname@example.org:/path/filename for remote files.
SRCD has Samba preinstalled.
Here's how to configure Samba so you can read files from a remote Windows host:
Complete NETWORK CONFIGURATION AND PROGRAMS to explain how to configure Samba
to access the host from a remote Windows computer, as an easy way to extract
files from the SRCD host.
smbd: Unable to open printcap file /etc/printcap for read!
root@sysresccd /etc/samba % su nobody
root@sysresccd /etc/samba % whoami
Just to recover files, you can ignore this warning.
Scripts are located in /etc/init.d/
Not Debian-based, so apt-get install doesn't work
root@sysresccd /etc/samba % cat /etc/samba/smb.conf
comment = Old drive
path = /mnt/sda1
browsable = yes
guest ok = yes
read only = yes
root@sysresccd /etc/samba % /etc/init.d/samba start
* samba -> start: smbd ... [ ok ]
* samba -> start: nmbd ... [ ok ]
root@sysresccd /etc/samba % netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 3831/smbd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1936/sshd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 3831/smbd
tcp6 0 0 :::139 :::* LISTEN 3831/smbd
tcp6 0 0 :::22 :::* LISTEN 1936/sshd
tcp6 0 0 :::445 :::* LISTEN 3831/smbd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1860/dhclient
udp 0 0 192.168.0.255:137 0.0.0.0:* 3840/nmbd
udp 0 0 192.168.0.7:137 0.0.0.0:* 3840/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 3840/nmbd
udp 0 0 192.168.0.255:138 0.0.0.0:* 3840/nmbd
udp 0 0 192.168.0.7:138 0.0.0.0:* 3840/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 3840/nmbd
udp 0 0 0.0.0.0:7843 0.0.0.0:* 1860/dhclient
udp6 0 0 :::5085 :::* 1860/dhclient