Installing Ubuntu on Windows

Time:2021-10-26

sketch

In developing with Ubuntu, I encountered all kinds of messy problems. Maybe it has little to do with the technology we developed, but it really meets
I felt very painful when I was young. I'd like to share it with you here. This article may be different from the situation you encounter. It's good to be able to help you.

Failed to install grub

Installing grub may fail when installing Ubuntu. Grub cannot install the following installation files, so it will not continue, resulting in the installation failure of the whole system. At this time, use the U disk you installed to start "trial use without installation" (possibly in English). In this trial use system, open the terminal for manual installation grub. Then install grub and update it.
$Ctrl + Alt + T // open the terminal
$sudo apt get install grub // install grub
$sudo apt get update grub // update grub
$sudo apt get upgrade grub // update the installed package (use this after installation)

The grub > command line appears at startup

grub>root

Generally, / dev / sda1 is returned, and sda1 is assumed here
Grub > grub > linux / boot / vmlinuz (auto complete by pressing tab) / dev / sda1
Grub > initrd / boot / initrd (TAB key automatically completes)
Grub > boot

After these steps are completed, you need to update your grub before entering Ubuntu, otherwise this problem will occur every time you start up.

The grub rescue > command line appears after startup

In the case of dual systems, if you boot windows with Ubuntu, this situation is quite bad. You won't be able to use any system. Manual partitioning is performed at this time.
$ ls

List partitions first

Installing Ubuntu on Windows

Then look for it one by one, such as:
ls (hd0,msdos14)
Until there is no unkown filesystem. Then select the correct partition for operation. For example, the correct partition is (HD0, msdos14)

set root=(hd0,msdos14)/boot/grub
set prefix=(hd0,msdos14)/boot/grub
insmod normal
normal

If an error occurs in insmod normal, it may be caused by the above grub installation failure. After these steps are completed, you need to update your grub before entering Ubuntu, otherwise this problem will occur every time you start up.

There is no windows boot entry

Ubuntu to boot windows. It is likely that the boot item does not have windows. You just need to enter it in your Ubuntu.
$ sudo update-grub

Recommended Today

Problems encountered using angularjs

Problem description Error: [$injector:modulerr] Failed to instantiate module ngMock due to: Error: [$injector:unpr] Unknown provider: $$rAFProvider The error is shown in the figure Error reason ngmockVersion andangularjsVersion is inconsistent.useyeomanWhen building tools, the latest is used by defaultangularjs。 However, the project requires compatibility to IE8, andangularjs 1.3.*And above versions have abandoned the support for IE8, so […]