Using an Ubuntu Live CD to Read/Copy Files
(from any OS drive)
Introduction and File Downloads
Note: We recommend using Ubuntu 10.04.4 LTS (about 700 MB), because it has many
useful features not found on simple rescue discs. And because later Ubuntu editions require a DVD (they're too large to fit on a CD). Note: Direct
links to the 10.04.4 LTS .ISO files (32-bit and 64-bit) are given in 'Step 1' below.
If you do not have time to download a 700 MB file, email us for other recommendations (maybe this Tahr Puppy Linux ISO; only 200 MB, MD5 = a66052ddc8c762ea6acd436ea96b73d1, will work for you).
If you have a new PC and can burn a DVD, you might want to get Ubuntu 14.04.2 LTS or later from: here (about 1,000 MB). (This DVD may have some drivers that are more compatible with newer displays and NICs; but it might not boot-up properly in some old PCs, it didn't help with our own BCom Wireless NIC; since it required a REBOOT to use the driver!) Always check the "Alternative Downloads" page for earlier versions, since the latest DVD may not boot-up in your PC.
Note: If you use Ubuntu 14, the Desktop will appear much different than below. At the left side of the Desktop, you'll see a group of many icons displayed horizontally. Clicking on the icon at the top will open what is called the Dash. Typing the word Terminal into the box will present you with a Terminal icon and clicking on it will open the command-line window. All other programs can also be accessed through the Dash.
One of the features of an Ubuntu Live CD is that it automatically connects to the Internet (if you have a wired / Ethernet / LAN connection from a router/hub/switch, since drivers for your Wireless NIC are likely to be missing), so you could continue reading these instructions on your PC after booting-up Linux, get other help or do online email using the Firefox Web Browser:
Another useful feature of an Ubuntu Live CD is the fact you can check a disk drive's S.M.A.R.T. data for any failing conditions (such as too many bad sectors) or other problems using its "Disk Utility" program:
For example, Disk Utility shows this drive has some Bad Sectors:
Detailed Steps for using an Ubuntu Live CD:
Download either the 32-bit or 64-bit ISO file (to use the 64-bit ISO, the target PC only
needs to have a 64-bit Intel/AMD CPU; the OS on the PC could be anything), then 'burn' the file to a CD. Note: This is very easy to do under
Windows 7 by simply clicking on the .ISO file (all such files will open with: Windows Disc Image Burner). Most Linux/Mac distros come with ISO
burning programs as well. Under Windows XP, you may need to install a program to do this.
When the CD first boots-up, it will briefly show what's in Fig. 1 (at the bottom of the display). It will soon change to Fig. 2 (in center of display); the white dots turn into red ones then cycle through again, 3 to 4 times.
Then this "Install" window will appear.
The PC will eventually (give it time) boot into the Ubuntu Desktop screen (Fig. 4). Use: "System" >
"Preferences" > "Monitors" to change screen resolution.
When the "Computer - File Browser" window appears (see Figure 6 above), you can select any storage media connected to the PC (hard
drives, SSDs or USB drives) and examine it in detail. Here's part of a Windows 7 drive, showing the contents of its "System Reserved"
partition under Ubuntu:
For readers of The Starman's Realm, one of its most important uses is to view and copy bytes of the first and following sectors of your boot
drive! To do that, open a "Terminal" window (using menus in Figure 8), which will appear as it does here in Figure 9:
Note: Under earlier versions (and some other current Linux distributions), hexdump will not provide you
with the formatted output showing ASCII characters to the right of the data bytes as shown below (see Figures 12 and following); they do not have a
"-C" switch which does this. The "v" must be added to show every byte rather than skip lines full
of the same byte (and drives always have many lines of nothing but 'zero bytes' in them). We pipe ( | ) the output of hexdump through the
less utility so we can see its contents one screen at a time; otherwise, it would continue spitting out the data all the way to the end of
the drive! Use the PageDown and PageUp keys or the Up and Down Arrow keys to move forwards and backwards through the contents of the drive. Trying to use
only these keys to get much further than a few hundred sectors into a drive would take too long a time; let alone viewing bytes all the way at the
end of a large drive! (Solutions for doing so are found further below.)
Another way to view the Volume Boot Record with the offsets counting from the beginning of the disk drive is to use the -s (skip) switch to jump directly to that sector. For most Windows 7 OS drives, we know the first Boot Record will begin at 2048 sectors (or exactly 2048 sectors times 512 bytes/sector = 1,048,576 bytes; 1 binary Mega Byte) into the disk drive, so we could use the command:
To learn more about the switches available when using hexdump and the options for entering a skip value, just enter:
which begins as follows:
An easy way to save a text copy of a drive's MBR or VBR sectors makes use of the BASH shell's redirection symbol: > (which was also ported into MS- and IBM-DOS long ago). This will redirect the output of hexdump from the display into a file; which could then be viewed later or emailed elsewhere. To save a text display of only the MBR sector's contents using hexdump, enter:
This command uses "-n" followed by 512 to save a display of only the first 512 bytes of /dev/sda to a text file. See
Figure 15 below for this and the other useful options/switches of hexdump. (Note for Windows users: Linux does not use extensions for file types!
We added '.txt' to the filename for those who will copy it to a Windows PC. We could just as easily use no extension at all, or even end this file with
'.exe' and Linux could care less! The following screenshot shows the Linux command file in use; enter man file for more information
on using it, which proves Linux knows this is an ASCII file; no matter what you name it:
Before continuing, we recommend you practice copying files from the ubuntu user's home directory (/home/ubuntu) to your USB drive, or emailing them to yourself.
Now that you've had some practice using hexdump in the Linux command line, it's time to save some actual bytes from a disk
drive to a file using the dd command. Enter "man dd" to see all its options. The most important part of the dd
commands shown below will be "of=". Always double-check this, since it shows where the data will be written to! Next, be
sure of how much data you intend to copy: Do not try copying Gigabytes of data without knowing you have the space avilable and the time it will take to
copy it. And, yes, you can also use dd to copy a whole drive's contents to another drive!
If you were directed to this page by TheStarman, he most likely asked for a copy of the first 100 sectors of your boot drive. Simply change the count from 1 to 100 and use a different file name:
As mentioned above, you can always use the command pwd to see which directory (folder) you are working in, and you can also use the
commands ls (names only) or ls -l to view user accessible folders and files within that directory; you will see some of the
saved files from steps above listed here:
We may add more example commands in the future !
To properly shut down the Linux Live CD, either press the CTRL + ALT + DEL keys at the same time or click the
mouse in the Upper-Right corner icon as shown here:
First Designed: May 18, 2015 (18.05.2015)
Updated: 5 May 2016 (05.05.2016); 15 May (15.05.2016); 16 May (16.05.2016); 17 May (17.05.2016).
Last Update: May 27, 2016 (27.05.2016).
You can write to us: here (opens in a new window.)
The Starman's Realm Index Page