huanix

chown -R huanix /

huanix header image 1

Creating a Dell partition with Ubuntu to reinstall Windows on a new or blank hard drive with the recovery disk

December 10th, 2009 · Dell rescue, Linux, geek, ubuntu

Here’s the scenario: You have a Dell and you have somehow lost and/or destroyed the hard drive with Windows on it and you need to reinstall Windows. I think there are various solutions that require downloading and or purchasing tools, but I’ve been able to use fdisk under Ubuntu linux to create this partition quickly and easily!

When you restore a Dell computer with a restore disk it may give the error:

Windows could not start becuase of a computer disk hardware configuration problem.
Could not read from the selected boot disk. Check boot path and disk hardware.
Please check the Windows documentation about hardware disk configuration and your hardware reference manuals for additional information.

The Dell expected to find a special Dell Partition at the beginning of the hard drive, and a newly formatted drive will not have this partition.

The process for creating this partition really is simple – I’m going to give a simple overview, and then more detailed instructions. The key here is not to overthink things. The GOOD news is, if you’re starting with a blank hard drive, you have nothing to lose!

Simple Overview

(If you are familiar with booting into a live linux environment and fdisk, this should be all you need!)

  1. delete the existing partition table
  2. create a new dell partiton spanning the first 7 cylinders. (1-7)
  3. create a second partition for windows spanning the rest of the drive. (8-default max)
  4. set the first partition to type “de” (dell partition)
  5. set the second partiton to type 7 (NTFS)
  6. write the changes
  7. exit, and install windows

Detailed process (all command line language is in italics)

  1. Download an Ubuntu Desktop CD
  2. Boot with the CD
  3. F12 is the “one time boot menu on my computer; choose CD/DVD Drive – if this doesn’t work for you, enter BIOS and change the first boot device to the CD drive.
  4. When the CD menu opens choose your language
  5. Select “Try Ubuntu without any change to your computer”
  6. Wait a minute while the CD loads. When it is done, you will see an ubuntu desktop.
  7. Choose Applications > Accessories > Terminal
  8. At the command line type: sudo bash (any linux nerd will tell you this can lead to trouble – we need to become the root user so we can modify the partition table)
  9. fdisk -l (this tells fdisk to list your partitions. note the name under “Device” that you want to work with)
  10. The target device will look something like “/dev/sd?”, where “?” represents a letter of the alphabet)
  11. fdisk /dev/sda (instead of “/dev/sda”, use the correct name of the device listed in fdisk -l; do NOT add the number at the end of the device)
  12. You are now in the fdisk utility. My instructions cannot fit every case perfectly, so you may need to improvise, but it’s easy. Type m if you need some guidance in fdisk. Protip: None of the changes you make will be written until you choose to write them. If you quit without writing, no changes (damage) will be done!
  13. d (delete the existing partition table)
  14. If you have multiple partitions you will be asked which one to delete. Delete them all one at a time. IF you only have one, it will automatically select it. Continue when you can type  fdisk -l and see a blank partition table.
  15. Time to create the dell partition:
    Type n to create a new parition.
    Type p to make this a primary partition.
    Type 1 to make it the first partition.
    Type  1 to make the paritition start at the first cylinder.
    Type  7 to end the partition at cylinder 7.
  16. Now we label the partition as a Dell partition:
    Type t to change the type of the partition.
    Type de to change the partition to type Dell.
  17. Time to create the Windows partition:
    Type n to create a new parition.
    Type p to make this a primary partition.
    Type 2 to make it the second partition.
    Type  8 to make the paritition start at the first cylinder.
    Press Enter to end the partition at the last available cylinder of the hard drive.
  18. Now we label the partition as a NTFS partition:
    Type t to change the type of the partition.
    Type 2 to select the second partition.
    Type 7 to change the partition to type NTFS.
  19. Now all you have to do is press w to write your changes and exit. If you do not write your changes before you exit, you will probably spend a long time trying to figure out why things didn’t work.
  20. I always run fdisk -l one last time before I exit the command line to make sure I did everything right!
  21. Shut down the computer.
  22. Reboot the computer using the Dell Rescue CD and install windows.

If you try this and it doesn’t work the first time, I suggest retrying. One common mistake is to run fdisk on /dev/sda1 (wrong) rather than /dev/sda (right!). Be sure you’re fdisking the correct volume! I have also talked to people that exit fdisk without writing the changes. If you exit without writing, it was just a dry run – nothing happened!

I am attaching some sequential screenshots – they are not complete, but they may help you understand the process if you’re having difficulty!

fdiskcreate_new_fdiskwriting new partitions fdisk

→ 1 CommentTags: