APCO 2P11 Lab 8




Objective

This lab is a continuation of Lab 7 on Hard Disks and disk maintenance. This lab will focus on partitioning and booting to multiple OSs. This lab will also take a look at a typical FAT, and cloning.
Warning Warning Warning, Things that you do in this lab has the potential of wiping out your operating system. Read everything twice, and be sure you understand what your are about to do. If in doubt ask.

Introduction & Startup (5 min)

Set up your Dell machines and boot into windows. Enter the BIOS, locate the setting for USB emulation and turn it on.This setting my already be on, or a default configuration, worth checking. This will allow a USB mouse to be recognized outside of windows. This may already be done from an earlier lab.


Exercise 1 (50 Min)

A windows operating system can be a fragile thing. Suppose your OS went bits up and you require a means to boot your machine, or you would like to make a complete copy of the system disk for installation into a 2nd machine. Lets create a complete clone of your OS disk. There are 2 ways to do this, 1) Create an image which is a file which represents the image of the disk, 2) A direct copy from a source disk to a target disk. We will use the 2nd method, although the 1st is the most commonly used.

Boot into windows and enter disk manager. Your system disk (disk 0) will likely be altered from a previous lab. Lets strip this back to 2 partitions, the 100MB at the front of the drive and the system. Delete any other partitions after the system so it appears as empty space. The drive should look as follows {(100 Mb), (approx a 34Gb system disk), (unallocated space)}. Exit out of Windows and shut down.

You will be given a 2nd hard drive. Install this drive into your machine using the spare SATA port on the MB. As well you will be given a SATA power splitter (Y cable) to provide power to the drive, and a data cable.  The drive will be an 80G drive. Be sure to alter the BIOS so the 3rd SATA port (SATA 2) is recognized. Be warned, cloning windows partitions is a dicey prospect. Windows keeps a record of disk ID's (disk signatures) and partition ID's to verify the boot process. If you do everything as directed you will have a good chance of creating a bookable image. For this reason, you will do all cloning to the 2nd drive, leaving the first intact. Once the clone is completed you will disconnect the primary drive, so only the 2nd (target) drive is visible. As mentioned above, disk and partition ID's are unique to the partitions. Windows uses these to identify drives. After the cloning process, the 2nd drive will have the same ID's as the first and thus be in conflict, so we remove the first drive to make windows happy.

1) Boot the system using UBD 5.31. Enter Parted Magic. Identify the first HD, sda, and delete any partitions after the system partition, if there are any. Identify the 2nd HD and delete any and all partitions currently on the drive. Warning, be sure to get the right drive(s), it will be listed as sda & sdb (sata disk a & b).

2) Exit Parted Magic and enter Clonezilla.

3) We are going to copy sda (the original disk with its windows OS) to sdb. sdb is a smaller disk so we will need to make some adjustments as we go. Warning, read everything twice from now on.

Follow through the menus of Clonezilla as follows:

a) Work directly with disks & partitions.
b) Expert Mode (need to tell Clonezilla the 2nd drive is smaller and to adjust the new partition table accordingly)
c) Local Disk to Local Disk
d) Choose source disk as sda
e) Chose target disk as sdb
f) Check the option -icds   -- Skip checking dist disk size (see part b above as to why)
g) 1st option, skip checking/repairing source file.
h) Clonezilla will give you a bunch of warnings, and ask you if you want to use the partition table from the source, answer yes. Note the empty space at the end will just truncate within the copied partition table, thus giving us a smaller unallocated section of disk.
i) Yes, you want to clone the boot loader.

If you have done everything correctly (as in reading instructions above), the cloning should start. It will take 15 min. so enjoy some free time. Read a book, play solitaire, check your social life on your cell phone.

4) When the clone finishes you can exit Clonezilla and shut down the system.

5) Remove the SATA 0 data cable, your original system disk.

6) Start the machine, it will complain that SATA 0 is missing, ignore it. It should boot to your new clone. You may need to tell the BIOS that it should attempt to boot from SATA 2. Windows will do a disk check after it starts. The result should be a complete disk clone. Which should boot.

Can both drives be accessible at the same time under windows? No, not in there current form. Since we completed a disk clone, the copy contains the disk signatures of the original drive. Windows uses the disk signatures in the boot process. Windows will also detect that the second drive will have the same disk signature as the first and list the drive as offline. Putting the disk as online automatically changes the disk signature, however, the boot files will contain the old signature and thus result in a failed boot (Boot Manager not Found). To correct this problem a windows recovery disk must be used which rewrites the boot files with the proper signature.

7)  Shut down the system and remove the 2nd HD.

Exercise 2 (15 Min) (Boot Manager exercise) Skip this Exercise

A boot manager will overwrite the MBR and install its self in its place. The MBR info is still kept, but not accessible by the BIOS directly. OSL is a free boot manager. There are better ones but as a proof of concept this will do.

In the 2p01 resource directory in your machine, install OLS. You will need to reboot your machine twice for it to be active.

Exercise 3 (30 Min) (File Recovery)

Create a small partition on your hard disk after the OS partition. Keep it around 5 gig is size, call it Recovery. We want this to be small so the recovery utilities will complete in a timely fashion.

When a file is deleted it is moved to the recycle bin, this allows for file to be recovered, moved back from the recycle bin. What happens when the recycle bin is emptied. The FAT (file allocation table) lists all files which are currently available to the OS. Each file consists of 1or more clusters which compose the file. When a file is deleted, the FAT file name entry is set to unused, thus all clusters associated with the file become available to the OS for use. New files are then free to use these clusters.

To undelete a file which is intact (not over written by the OS) one simply re-establishes the file name in the FAT, the associated clusters will then be marked as used. This is the simple case. Occasionally, a deleted file may be partially overwritten, thus only parts of a file can be recovered. This may mean stitching together clusters to recover the best version of the file possible.

What to do when you delete a file you want to recover.
Best is to stop using the machine and go directly to recovery software. The less OS file writes, the better the chances of recovering your files. Let try 2 programs.

From the 2p11 website, supplemental software, you will find a large tif picture, Vive Jumps. Download this picture to the new partition Recovery which you created above. Now delete the picture and empty the recycle bin.

Install Disk Digger. Run the Application and try to recover the file by doing a dig on the Recovery Partition. Show your lab instructor the recovered file.

Install Renee undeleter and repeat the exercise. You will need to download Vive Jumps and delete the file again.
Show your lab instructor the recovered file.


Exercise 4 (30 Min) (Backup and Imaging

In exercise 2 we used a linux imaging tool. Here we will use a windows imaging tool to clone a small disk partition.

Enter Disk Manager under windows. Create a small partition (5 G)  after the system partition, label it M, format NTFS. From C: drive, copy the user folder into this new partition.


Creating an image vs a backup. A backup is simply a copy of the file or file system to a "usually" compressed archive. An image or clone is a byte for byte copy from 1 partition to another. We can use linux (Clonezilla) to create a file image. Lets look at some Windows s/w to create a partition clone.  There are many different imaging applications. The one presented here is a freeware and is available on the course website in the supplementary directory.

From the course website, install partition wizard  (PW) (pwfree91.exe). This is a free partition management system for Windows. Your primary hard disk should have 3 partitions on it, the 100 Mb, main system partition, and the newly created 5G partition M:. The rest should be empty. PW will allow the direct copying of partitions. Lets make a copy of the M: partition onto the same HD. This can be done using copy and paste in the editor. Copy the M: into the unallocated space.

Info: If this was a system partition, windows would need to exit and perform the copy in safe mode the ensure no system files are open at the time of copy.

Once the copy is complete, use the tool to assign a drive letter to it, N:.

Exercise 5 (35 min) (Windows Backup)


Lets look at windows backup as an alternative. Under control panel click on Backup and Restore. On the far left you will see options to create a system image, this we already did using cloneZilla. The windows image works much the same way, writing the system to a file and then giving the option to restore the image when things go wrong.

Toward the right will be a link "Set up backup", click on this. Choose where you want to save the backup. For our purpose lets us use M.  On the following screen it will ask "What do you want to back up?" Select "Let me choose". The source directories include system files as well as user data file. To keep life simple, just select the user data folder, "Users". In practice you will likely want to backup the system start files as well as user data files and any other files you deem important. Try it.

Once, the backup is complete:  delete the contents of drive N:

From the Back up Restore window, see below, click Select another backup to restore files from. Here you will be giving the option to select which backup set, the files and the location you want to restore to. Restore the files from the backup to a partition N.