1

If you look at a recent post I had some trouble with partitions. I messed up a couple of things and now I am extremely annoyed at my poor installation of Ubuntu. When I go to boot options I have two copies of Ubuntu which was part of my horrible installation procedure. One Ubuntu is on my SSD another on my HDD. However, selected either option seems to contain the same profile ( I have the same setup, data, and downloads).

I went to the BIOS and attempted to make Ubuntu the default booting option, but the only option I have is the Windows boot manager which automatically boots to windows anyways unless I access the boot menu. I miss the boot menu too many times and this has caused me to do too many restarts in a short period of time.

So my laptop is an MSI GE60 Apache Pro-867. I wonder how could I wipe out both discs (a 128GB SSD and 1TB HDD), but not mess up my BIOS. I want to install Ubuntu only as I'll be using this computer for software development and I don't see any advantages to being on Windows at the moment. But I still want to be have the ability to install windows in the future if needed. The catch is that I don't have a CD.

Thank You!

Vaironl
  • 13
  • 2

2 Answers2

1

First, you must determine your boot modes: BIOS or EFI. Note the plural modes; it's possible to install Windows in one mode and Ubuntu in the other. You can learn each OSes' boot mode from Ubuntu:

  • Check for a directory called /sys/firmware/efi. If it's present, Ubuntu is booted in EFI mode; if it's absent, Ubuntu is booted in BIOS mode.
  • Type sudo parted /dev/sda print | grep Table. (This assumes you've got one disk, /dev/sda.) If the result reads Partition Table: gpt, Windows boots in EFI mode; if it reads Partition Table: msdos, Windows boots in BIOS mode.

If you're booting Ubuntu in EFI mode, as I suspect, you can adjust your boot menu by using the efibootmgr utility. Type that command alone (with sudo) to see your boot entries. You can then change the order by using the -o option. Note, however, that some computers have buggy EFIs that ignore or reset these settings. With them, ugly workarounds are required, as noted on this page of mine.

If you're certain you want to wipe both Windows and Ubuntu from the disk and start fresh, you can completely destroy all your partition table data from Ubuntu:

sudo sgdisk -Z /dev/sda

This command will completely destroy your partition table data on /dev/sda. When you re-run your Ubuntu installation medium, you can set it up to take over the whole disk. That said, if you're using EFI, it's conceivable that the NVRAM entries that point to your old Ubuntu installation will survive. In this case, you may want to use efibootmgr to delete them, particularly if they cause you any trouble. I recommend you ignore this possibility for now and post a new question if you have problems, or check out this question and answer, which covers the most likely problem.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
0

If you are not planning on using windows for a long time, but still want to preserve your license, you could make an installation medium for it. This will automatically save your license in modern Windows OS (see this answer for details on how to).

Then, you can simply run your ubuntu usb live and install ubuntu from scratch by choosing the option "Erase the whole disk and install ubuntu".

  • Thanks for the suggestion. I used your advice to preserve my license in combination with the answer above to delete everything from my disks. Now to stay all night getting Ubuntu setup – Vaironl Jun 28 '15 at 21:17
  • I think with the erase install option from a ubuntu live usb you don't need anything else, as it removes everything, including other OS. With the gui installation it is very easy, and shouldn't take more than a couple of hours. – Three Diag Jun 28 '15 at 21:56