How to switch boot partitions?

14,275

In addition to Perumal93's advice, also make sure you run sudo grub-install /dev/sda after you delete Windows in gparted and before you reboot.

Replace "sda" with another name if you need to. fdisk -l will show you which hard drive is 'dev/sda' and which one is 'dev/sdb'. You should choose the one that has your Linux partition.

Also, make sure you do not add a number after dev/sda. (Adding a number would choose the partition, but GRUB wants you to give it the whole hard disk that the partition is stored on, so dev/sda, not dev/sda2.)

If something doesn't go right and you can't start up Ubuntu, you can still fix it with a Live USB. I made a little guide a few years ago for this that's saved my...'sanity' a few times.
http://ubuntuforums.org/showthread.php?t=1873849

Share:
14,275

Related videos on Youtube

cmacia06
Author by

cmacia06

Updated on September 18, 2022

Comments

  • cmacia06
    cmacia06 over 1 year

    I have had terrible experiences with with doing this even though I have googled, so i'm just trying to make sure that I won't have a problem to deal with after restarting my computer. Most of the articles I find are outdated.

    I have 2 HDDs, the larger 500GB has 3 partitions. Windows, Linux, Swap. The boot flag is set on the partition with windows on it and i'm going to erase that partition. What steps should I take to make sure that I don't have a boot problem? Also, I am using gparted to erase the partition. I cant access windows because it doesn't show up on the boot list.

    • Wolverine
      Wolverine over 9 years
      If you are going to delete the Windows partition and if the boot loader is configured by Windows, delete the Windows partition using gparted application and update the grub from the terminal. If the boot loader is configured by Ubuntu, just delete the Windows partition alone and no need to update the grub but updating the grub is anyhow good practice in case of failing to boot later.
    • cmacia06
      cmacia06 over 9 years
      Let me give it a shot then.
    • Wolverine
      Wolverine over 9 years
      I hope it will work.
  • cmacia06
    cmacia06 over 9 years
    Perfect! Very detailed and worked perfect.