Successfully installed Ubuntu 20.04 LTS into C:\ (windows partition), but windows still boots but not Ubuntu. Please help

10,104

Solution 1

The mistake was selection of /dev/sda2 for "Device for boot loader installation". Ubuntu was unable to boot automatically.

I reinstalled by selecting "/dev/sda (harddisk name)", Ubuntu installation is successful and it boots upon start.

In short, my goal was to replace existing Win10 OS (present in Drive C:) with Ubuntu 20.04 while retaining all my data stored in other partitions of the disk (D and E).

Steps I followed for installation are:

1) Download Ubuntu20.04 iso and burn that into a USB using Rufus (Partition scheme - MBR; Target System - BIOS or UEFI; Filesystem - FAT32)

2) Connect USB to PC and reboot. Press key (ESC for Asus) to show boot options. Select USB stick to install in legacy mode(Not the one with UEFI before USB stick name, this will appear if UEFI boot mode is enabled).

3) Select "Install Ubuntu".

4) Proceed till "installation type" step. Select "something else".

5) Partition drive as follows: (This is same as suggested by @SasukeUchiha in his answer)

Find your C: partition. (If you drives created in windows are of different sizes, it will be easy to locate this)

Select it and press the "-" sign to delete it and create "free space".

Do the same for your partition with label System reserved if any(WinRE partition).

1st Partition / Root:

    Select "free space" that you created by deleting the C: drive.

    Select "+"

    Partition the target drive as follows:

        Size: min. 10 GB [recommended](https://help.ubuntu.com/community/Installation/SystemRequirements)

        Type for the new partition: Primary

        Location for the new partition: Beginning of this space

        Use as: ext4

        Mount point: Choose "/"

2nd Partition / Swap : (Only needed if you want to Hybernate)

    Select "free space"

    Select "+"

    Partition the target drive as follows:

        Size: Depends on your RAM.

        Type for the new partition: Primary

        Location for the new partition: Beginning of this space

        Use as: swap

3rd Partition / Home : (Only needed if you want to keep your personal files separate from / Root partition)

    Select "free space"

    Select "+"

    Partition the target drive as follows:

        Size: Remainder of "free space" or any size you want.

        Type for the new partition: Primary

        Location for the new partition: Beginning of this space

        Use as: ext4

        Mount point: Choose "/home"

For "Device for boot loader installation" select /dev/sda (harddisk name), this is the default choice. This step is very important. If you choose some other option here, Ubuntu may not be able to boot even though installation is successful. This is where I did mistake and hence suffered a lot trying to find why Ubuntu doesn't boot even after successful installation

6) Click on install now. A pop up appears showing you details of drives going to be formatted and asking your confirmation. Check and confirm.

7) Installation should be successful.

Note: I tried to install Ubuntu in UEFI mode. During the Installation type step Ubiquity installer throws an error "No EFI system Partition found...". I tried creating EFI partition and proceed with installation. But installation failed with a fatal error. I tried this multiple times, but the same result. My disk partition type was MBR and hence the issue. You might not face this if your disk partition type is GPT and use UEFI mode for installation.

I should thank @SasukeUchiha in helping me resolve the issue. Thank you.

Solution 2

A) UEFI/BIOS

  1. Set to "UEFI mode only" (no legacy/CSM).

  2. Disable "secure boot"

  3. Disable "Intel Rapid Start" (if equipped)

  4. Disable "fast boot" in UEFI (note this is different than the "fast startup" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Boot Menu

Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

Note:

Make sure it says UEFI in front of the USB stick in the boot menu.

If not, recreate your USB stick with ensuring you choose the UEFI/GPT (only) option.

C) Boot into USB Stick

Boot into Linux live environment and begin the install.

D) Installation type

When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.

E) Create partitions

Find your C: partition. It will be called /dev/sda2.

Select it and press the "-" sign to delete it and create "free space".

Do the same for your /dev/sda1 (WinRE partition).

  • 1st Partition / Root

    1. Select "free space" that you created by deleting the C: drive.

    2. Select "+"

    3. Partition the target drive as follows:

    • Size: min. 10 GB (25GB+ recommended. I have 40GB)

    • Type for the new partition: Primary

    • Location for the new partition: Beginning of this space

    • Use as: ext4

    • Mount point: Choose "/"

  • 2nd Partition / Swap (Only needed if you want to Hybernate. I don't have it!)

    1. Select "free space"

    2. Select "+"

    3. Partition the target drive as follows:

    • Size: Depends on your RAM. See Swap FAQ.

    • Type for the new partition: Primary

    • Location for the new partition: Beginning of this space

    • Use as: swap

  • 4th Partition / Home (Only needed if you want to keep your personal files separate from / Root partition. It seems you save your personal files in D: and E: so you may not need this.)

    1. Select "free space"

    2. Select "+"

    3. Partition the target drive as follows:

    • Size: Remainder of "free space" or any size you want. (You will need to leave some space if you want to make another partition. Of course, you can always shrink "/home" partition later)

    • Type for the new partition: Primary

    • Location for the new partition: Beginning of this space

    • Use as: ext4

    • Mount point: Choose "/home"

F) Installation & Reboot

  • Finish the installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

G) Upon reboot

  1. Boot into Linux

  2. Install any updates

H) Changing the extended partition to primary

Unfortunately, I don't think you can change the extended partition into a primary partition without formatting it again. You can back up all your data in that partition to some other external drive or whatever, and delete and create the partition again as a primary partition and copy everything back if you want.

**I) Setup Automout for D: and E:

  1. Open the "Disks" utility.

  2. Select the partition you want to automount. (D:)

  3. Click the icon with 2 cogwheels. (Additional partition options)

  4. Select "Edit Mount Options".

  5. Turn the "User Session Defaults" option to "Off".

  6. Check the box "Mount at system startup" Make sure "Show in the user interface" is also checked.

  7. Replace the line that says nosuid,nodev,nofail,x-gvfs-show to users,uid=1000,dmask=027,fmask=137,x-gvfs-show,utf8.

  8. Change the "Mount point" to something less complicated like /mnt/D.

  9. Change the "Filesystem Type" to ntfs-3g.

  10. Do the same for E:

  11. Click "OK" and you are all set!

Borrowed and edited from user613363's answer. (Dual Boot Windows 10 and Linux Ubuntu on Separate Hard Drives)

Share:
10,104
Sri Kanth
Author by

Sri Kanth

Updated on September 18, 2022

Comments

  • Sri Kanth
    Sri Kanth over 1 year

    I am a newbie for Ubuntu. Existing partitions in windows were - C,D and E. I choose "something else" option while installing Ubuntu from pendrive. In the "installation type" step, I have selected /dev/sda2 (C Drive) to format and use as ext4 type to install Ubuntu (mount to /). I have selected "Device for boot loader installation" (see image below) also as /dev/sda2. Created swap area of more than 4 GB. I did not touch other partitions (D and E). I didn't create any specific partitions to mount /home or /boot as I have no idea about them.

    Installation was successful and it asked me to restart. After restart, windows boots and says some error occurred with Windows. It there any way to boot Ubuntu? Did I mess up installation?

    This image is just for reference of the installation step, not the actual image captured during my installation

    Gparted view after ubuntu installation. (Obtained by booting from pendrive and selecting Try Ubuntu)

    • user68186
      user68186 almost 4 years
      Welcome to Ask Ubuntu. The image you posted does not match the description. Use the Ubuntu installation USB to boot and select the Try Ubuntu... option. When Ubuntu boots, open the app "Gparted". Take a screenshot of Gparted showing the internal drive. Upload the screenshot at imgur.com. edit your question and put the link to the image there.
    • VidathD
      VidathD almost 4 years
      Wait you formatted the C: drive? Then how can you boot into windows?
    • Sri Kanth
      Sri Kanth almost 4 years
      I don't know about that, Windows boots and says there is a problem. Gives options like reinstall windows, try trouble shooting etc.
    • VidathD
      VidathD almost 4 years
      You really should upload that Gparted view. Does grub appear? Can't you select Ubuntu from there? Try accessing boot options ad booting from there. Usually f12 during boot
    • Sri Kanth
      Sri Kanth almost 4 years
      I added GParted view. Please let me know, if I need to provide any other details. I have my data in drives D and E (/dev/sda5 and /dev/sda4 respectively). Hence I tried to install Ubuntu in drive C (/dev/sda2).
    • Sri Kanth
      Sri Kanth almost 4 years
      @SasukeUchiha Grub doesn't appear. I have tried to start my lapi multiple times, it doesn't appear, direcly windows tries to load and says there is an error.
    • VidathD
      VidathD almost 4 years
      Before windows load press f12. keep pressing it after you pressed the power button actually. This should get you to boot menu. You can safely remove the sda1. It's windows recovery. That's what's probably giving trouble. Why did you install as Legacy BIOS? Does your PC not support UEFI?
    • Sri Kanth
      Sri Kanth almost 4 years
      I deleted sda1 shown in the above Gparted image. Now, nothing boots, including windows. Boot menu has only two options harddisk and dvd. These were the only two options earlier as well. Harddisk doesn't boot anything now, so the system asks to "Reboot and select proper boot device". Should I set up any boot configuration from "try ubuntu"? I didn't choose anything specific to BIOS/UEFI during installation. My PC supports UEFI as well.
    • VidathD
      VidathD almost 4 years
      Then install Ubuntu as UEFI again. This should solve this easily. Read this guide made by me: askubuntu.com/a/1247118/1073514. You can skip B, C and D. Also make sure that you don't touch your D: and E: partitions. When you have installed as UEFI there is no partition number limit so you have no need to have extended partitions. Also why do you need a swap of 4GB? That's basically useless! Which version of Ubuntu are you using? 20.04?
    • VidathD
      VidathD almost 4 years
      I will change it to suit you and post it as an answer.
  • Sri Kanth
    Sri Kanth almost 4 years
    I have selected (default selection) /dev/sda for "Device for boot loader installation", is it correct? When I press Install now option, it gives a warning "No EFI system Partition found. This system will likely not be able to boot successfully, and the installation process may fail. Please go back and add an EFI System Partition, or continue at your own risk", Can I ignore it?
  • VidathD
    VidathD almost 4 years
    @SriKanth In your answer you say selecting /dev/sda worked. So yes. Also as you said it is the default choice