0

I was testdriving a laptop with Ubuntu for a few days. Now I have to restore it's initial state. Essentially it had one partition for the UEFI and one that was running FreeDos. The UEFI is still there, but I deleted the FreeDos eventually and installed Ubuntu (+ swap partition and so on). What can I do to delete all traces of Ubuntu, it's partitions and have the computer back in it's initial state?

BTW: I enjoyed the Ubuntu experience, it's just that I have to give back the computer in it's initial state.

1
  • HP ProBook 440 G3
    – Ike
    Apr 14, 2016 at 7:25

1 Answer 1

1

First you will need to use a tool like gparted to delete all linux partitions and replace them with a FAT16 partition since the FreeDOS installer, unlike the ubuntu installer, does not give you the option to modify partitions.

From http://freedos.sourceforge.net/wiki/index.php/Install:

Installing on a physical PC

Boot from an existing DOS, from one of the cdroms, or from the special boot diskette. In the latter two cases, simply follow the menus to install DOS. In the former case, you will first have to make sure that the cdrom can be accessed. You can also use the ISO images directly instead of using a real cdrom. See above for details.

If your computer has no partitions with FAT filesystem yet, you will have to create one before you can install DOS. For example GPARTED which is included with many Linux distros and many Linux versions which can be run directly from CD or DVD (no installation of Linux on harddisk needed) can resize your existing NTFS Windows partitions to make space for DOS without having to reinstall Windows. FreeDOS will need one FAT type partition: This can be FAT12, FAT16 or FAT32, but FAT16 is clearly the recommended choice: FAT12 is too small and FAT32 is hard to boot from. You can use Windows or Linux to create and/or format the partition, if needed. Of course you can also use the FreeDOS install cdrom for that, but as this cdrom does not allow you to resize existing partitions, you should better use other tools. If you already do have a FAT partition, you can skip all the partition / format steps.

If you still have the usb drive or disc you used to install ubuntu just pop that in, start a live session from the install medium (select try ubuntu) and open gparted from there or you can create a stand-alone gparted boot medium following the instructions found here: http://gparted.org/liveusb.php#linux-setup.

The next step should be pretty self explanatory from within the program:

  1. Delete all unwanted partitions (in your case that would be all partitions of type ext4 and swap)
  2. You'll see a grayed out area of 'unallocated' space grow as you delete partitions
  3. Select the unallocated space and create a new FAT16 partition on it
  4. Apply the scheduled operations (green checkmark icon)

Now you should be all set up to reinstall FreeDOS from an install medium of your choice.

3
  • No problem! Glad if it helps
    – Daniel W.
    Apr 14, 2016 at 12:06
  • I now have a similar situation with another computer. It had Ubuntu installed previously and now I want to install Windows 7 from an ISO on an USB. When I select "boot from USB" in the BIOS / UEFI, it doesn't boot the ISO but instead goes into the GRUB. Must I also delete the remaining small partition marked as "boot"?
    – Ike
    Apr 16, 2016 at 14:09
  • If you're planning on running only windows and don't want to go back to anything else you had I would wipe the whole disk and make the resulting unallocated space a single FAT or NTFS partition. the windows installer will then detect the disk and will configure your setup automatically
    – Daniel W.
    Apr 18, 2016 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .