Ubuntu installation wizard will automatically detect your Windows if you are installing in dual boot, but in some cases, if you encounter "This computer currently has no detected operating system" warning, then this guide will help you to resolve this issue.
Right-click on the C:\ volume, click Properties.
Click Tools then click the Check button to fix errors.
Close the Ubuntu installation wizard, reboot it into your Windows and follow the below step by step instructions to clean up your Windows 10 errors first.
From Windows 10, Right-click on Start > File Explorer and find the Windows partition usually “C:\” volume.
Right-click on the C:\ volume, click Properties.
Click Tools then click the Check button to fix errors.
This will scan the C:\ drive for errors, and fix them automatically.
If it detects and gives you the option to install Ubuntu alongside Windows 10 then you are good to go with the wizard following on-screen instructions to complete the rest of the Ubuntu installation.
Next, type the below command to manually update your bootloader:
This will automatically detect and add Windows 10 in the grub bootloader.
When the error checking process finished, open up the Windows PowerShell(Admin) from the start menu.
When the prompt opens up on the screen, saying, “Do you want to allow this app to make changes to your device, click Yes.
Type the chkdsk C: /F on the PowerShell to scan and fix the errors on the next reboot.
Press the Y key on the keyboard to say yes to check the next time the system restarts. Reboot your system manually and let the chkdsk command complete its process.
When the chkdsk process finished, boot into Windows 10 and then, Shutdown from the Start menu to turn it off safely.
Next, boot with Ubuntu installation media and see if the Ubuntu installation wizard detects Windows 10 as shown in the below screenshot.
If it detects and gives you the option to install Ubuntu alongside Windows 10 then you are good to go with the wizard following on-screen instructions to complete the rest of the Ubuntu installation.
For instance, if it doesn't detect your Windows 10 after completing the Ubuntu installation in the dual boot then boot with the Ubuntu installation media again. When you see the below screen click Try Ubuntu.
When your system reaches to Ubuntu graphical desktop, open a terminal session by pressing the key combination of Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.
Type the lsblk command to detect what your Windows PC’s drive label is, as well as the partition names. For example, it can be “/dev/sdb”, and the partitions you’ll work with are “/dev/sdb1”, “/dev/sdb2”, and “/dev/sdb3”.
Run the fsck tool on each of your Windows partitions to clean out the bad sectors/bits on the hard drive. Make sure you replace each instance of “/dev/sdb” with your actual Windows partition names.
Next, install the os-prober package on Ubuntu using the apt command:Next, type the below command to manually update your bootloader:
This will automatically detect and add Windows 10 in the grub bootloader.
Reboot your system and take a look at the Grub bootloader. If the above steps were successful, Ubuntu will show you Windows 10 as a boot option.
Wrapping up
I hope this guide was helpful to set up your Ubuntu alongside Windows in a dual boot environment.
swordz@swordz-Aspire-E5-411 ~ $ sudo update-grub
ReplyDeleteGenerating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-187-generic
Found initrd image: /boot/initrd.img-4.4.0-187-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
I get this error, please help me:
ReplyDeleteubuntu@ubuntu:~$ sudo update-grub
/usr/sbin/grub-probe: error: no se pudo obtener la ruta canónica de «/cow».
I don’t understand language other than english. If you need help, you have to post or translate your query in english please.
DeleteSorry, I just copied/pasted. This is the error:
Deleteubuntu@ubuntu:~$ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of «/cow».
Follow these steps:
DeleteBoot into a Live Ubuntu session.
Mount the / partition of your installed OS to /mnt
sudo mount /dev/sda6 /mnt
Set up a chroot environment:
sudo chroot /mnt
You are now in a "fake" Linux install that treats /mnt as /. This means that all the files necessary for GRUB are in /boot where the system expects them to be and you can install GRUB just as if you were actually running your installed system:
sudo update-grub
sudo grub-install /dev/sda
Now reboot and you should see the GRUB menu appear normally.
I could mount the / partition of my installed OS (Windows10) but it doesn't let me set up a chroor enviroment:
Deleteubuntu@ubuntu:~$ sudo chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directory
Find your drive that's supposed to boot with:
Deletemount
Or
parted -l
Or
fdisk /dev/sda
And type p to list the partitions, look for type 83.
then try mount it
mkdir /mnt
mount /dev/sda1 /mnt
cd /mnt
ls -l
Is this your drive? Cool!
grub-install --recheck --root-directory=/mnt /dev/sda
(Or whichever /dev drive your root is, with it's mounted path)
grub-install --recheck --root-directory=/mnt /dev/sda -f
grub-mkconfig -o /mnt/boot/grub/grub.cfg
Thanks for info Muhammad and Ali. But i had this error
ReplyDeletefdisk: cannot open /dev/sda1: Permission denied
Didn't work. Windows 11 and Ubuntu 22.04 LTS
ReplyDeleteThis guide is specifically written for Windows 10, and Ubuntu dual boot.
Delete