Troubleshooting With a Live Session

This book contains all documentation relevant to making and using Linux or Windows PE on a USB for recovering systems, files, or querying hardware issues.

Linux Live Environment

Linux Live Environment

Getting started and creating boot media

What is a Linux Live Session

Linux is a great OS that has a major advantage when it comes to troubleshooting, it can be run from a USB flashdrive in a 'live' state without installing to a hard disk. This allows you to use a wide range of tools to manipulate the disks, data, and hardware of your computer/OS without worrying about anything running on it.

The username and password for the media is user and live

Obtaining media

r/Techsupport Rescue Media

A Linux ISO has been made for r/Techsupport that has many of the proper tools pre-installed to make rescuing a system easier. If you are unfamiliar with Linux we recommend that you use this version.

Download

Source files for Debian live-build

Official Xubuntu Media

You may also use the official Xubuntu ISO and load your own tools as needed.

Download

Creating bootable media

This will require a USB that is at least the size of the ISO you downloaded.

All methods of creating boot media are destructive and will WIPE the USB flasdrive or external disk.

Windows

  1. Download and run Rufus
  2. Select “ISO Image” and then browse for the ISO image.
  3. Select which flash drive you want to put the installer on.
  4. Select the target system type, GPT/UEFI or MBR/BIOS
    • For modern systems GPT/UEFI is preferred. For legacy systems use MBR/BIOS
  5. Click “Start” and wait for it to finish.

MacOS

  1. Download and run Etcher
  2. Select your downloaded ISO
  3. Select your target drive
  4. Click "Flash" and wait for it to finish.

Linux

  1. Run lsblk to list all disks in your system, identify your flash drive by size. It will look something like /dev/sd[letter]

The following command is dangerous. Ensure it is run against the correct disk

  1. Use dd if=/path/to/image.iso of=/dev/sd[letter] to create a bootable drive from the ISO.
  2. Wait until dd finishes. dd does not display progress, but when it finishes, the terminal will display the next prompt.

Boot the live media

  1. Press your 'Boot menu' key when you power on the machine to access your boot options.
    • You may need to go through BIOS and change boot priority if you cannot find or hit the boot options key during boot.
  2. Choose your USB
  3. Once it boots select 'Try' or 'Live'

What is next

Continue onto the next page for things-to-do-in-a-live-session

Linux Live Environment

Data Recovery

This article relies on the live media created here

old wiki article

From a readable disk

Open the File Manager from the applications menu, you should see your disk in the pane on the left. In the below image, it is the "11GB Volume"

Double click the desired disk and it should open in the file manager.

Once opened, you can drag and drop files to another disk that you mount into the system just like in Windows.

Testdisk to recover partitions or a partition table

Using Testdisk to recover partition tables

Linux Live Environment

Checking the health of disks

This article relies on the live media created here

  1. Open gsmartcontrol from the application menu,
  2. Select your disk once the application is opened.

If your disk is anything but 'passed' then your disk is dying and needs to be replaced.

  1. To share your results choose 'View output' then 'Save as' and upload that file to a helper for review.
Linux Live Environment

Manipulating partitions and disks with Gparted

This article relies on the live media created here

Overview

Gparted is a Linux/gnu front-end to the parted tool. It is the recommended method for manipulating disks when using a Linux live session.

Working with a new disk

Create partition table

A disk needs a partition table made as the first step in formatting. This is generally an MBR/msdos or GPT table. GPT is preferred for all modern applications.

Select a disk in Gparted from the drop-down in the top right

Selectinga disk in gparted

To create your table, hover over 'device' with your disk selected.

creating a table in gparted

Create partition

To create a partition on a disk right click any unallocated space and choose 'New'.

Choose your size and location on the disk by dragging the sliders, the entire box or entering values manually. It is recommended to make partitions starting at the head (start) of the disk and work your way right.

Primary partitions are the typical user partition. Logical or extended are for more advanced setups.

Typical file system types and uses are:

Type OS Compatibility Use Limitations
NTFS Windows, with read natively on Linux/BSD or MacOS Windows OS and data partitions
ext2/3/4 Linux/BSD, with read on other OS via third party tools Linux/BSD OS and data partitions
Fat32 Read/Write natively on most OS Removable media Fat32 file systems cannot hold files larger than 4GB
exFat Read/Write natively on most OS Removable media
HFS/+ MacOS native with read on other OS via third party tools MacOS OS and data partitions

Working with existing disks

Manipulating partitions is dangerous and can result in a loss of data. It is recommended you have your data/disks images backed up prior to executing the following procedures.

How partitions can move

When working with partitions it is important to understand how you can move them.

  1. You can only enlarge a partition to the right
  2. You can only shrink a partition to the left
  3. Partitions can move left or right
  4. Partitions cannot move around each other

Enlarge/Move/Shrink partitions

To change the size of a partition right click it and choose 'resize/move'. You can manipulate the size the same way as when making a new partition.

Enlarging

If enlarging a partiton ensure you have enough empty space to the immediate right of the partition. If you do not, move the neighbor partition far enough right that you have space for your enlargement operation.

Shrinking

Shrinking is not recommended, make a new partition and move your data.

You can only shrink a partition as far as data is dispersed through a partition. A partition may need to be defragmented before signigicant size changes are possible.

Moving

Moving partitions takes a very long time. It is recommended that you restore data to an desired disk layout rather than change an existing one.

Finalizing changes

When you are done making changes to disk choose the 'Check' at the top to save those changes, confirm and the changes will start processing. If you shrunk, or moved partitions this can take a very long time.

Linux Live Environment

Wiping disks

This article relies on the live media created here

HDD

nwipe is a fork of dwipe which is the utility used in the popular DBAN solution.

  1. Open "terminal emulator" from the application menu
  2. Run sudo nwipe in the terminal to launch our nwipe session
  3. Navigate up and down the list with the arrow keys, select disks by size with the space bar.
    • Removing extra disks from the machine may make this selection easier. Choosing the wrong disk will cause data loss
    • You can change the wipe method by pressing m. DoD short is the default and recomended method. It makes 3 passes over the disk.
    • You can change the number of rounds by pressing r. This multiplies the method. Leaving DoD short and setting 2 rounds would make 6 passes (1 is recommended).
  4. Press capital S to start the process

SSD

Secure erase article on kernel.org

NVMe SSD

This relies on the application nvme-cli. It might not be included on all Linux distros, you might have to install it. It is included in the r/Techsupport rescue media.

  1. Open "terminal emulator" from the application menu.
  2. Run sudo nvme list to see the list of valid nvme drives.
    • Some SSDs will not be listed here. If your drive isn't listed, put your computer to sleep and then wake it up. This is mainly an issue with Samsung drives.
  3. Run sudo nvme format -s2 /dev/nvmeX where X is the location of your drive.
    • Example: sudo nvme format -s2 /dev/nvme0n1 Choosing the wrong disk will cause data loss
    • Some manufacturers lock their drives. If you get an invalid field error, you will have to use a tool from your SSDs manufacturer. When doing this, make sure you do a secure erase.

Windows PE

Windows PE

Getting started and creating boot media

What is Windows PE

Windows PE is small bootable Windows environment made for r/Techsupport. This PE has a full GUI and select tools for basic troubleshooting or data recovery in a UI more familiar to users than Linux.

Obtaining media

r/Techsupport Windows PE

Download

Source files for rTS_PE

Creating bootable media

This will require a USB that is at least the size of the ISO you downloaded.

All methods of creating boot media are destructive and will WIPE the USB flasdrive or external disk.

Windows

  1. Download and run Rufus
  2. Select “ISO Image” and then browse for the ISO image.
  3. Select which flash drive you want to put the installer on.
  4. Select the target system type, GPT/UEFI or MBR/BIOS
    • For modern systems GPT/UEFI is preferred. For legacy systems use MBR/BIOS
  5. Click “Start” and wait for it to finish.

MacOS

  1. Download and run Etcher
  2. Select your downloaded ISO
  3. Select your target drive
  4. Click "Flash" and wait for it to finish.

Linux

  1. Run lsblk to list all disks in your system, identify your flash drive by size. It will look something like /dev/sd[letter]

The following command is dangerous. Ensure it is run against the correct disk

  1. Use dd if=/path/to/image.iso of=/dev/sd[letter] to create a bootable drive from the ISO.
  2. Wait until dd finishes. dd does not display progress, but when it finishes, the terminal will display the next prompt.

Boot the live media

  1. Press your 'Boot menu' key when you power on the machine to access your boot options.
    • You may need to go through BIOS and change boot priority if you cannot find or hit the boot options key during boot.
  2. Choose your USB