Computer lessons

Program for installing Linux from Windows. How to install Linux on Windows? Two ways to share

Linux and Windows are operating systems that are radically different from each other. But the process of installing them together is not that complicated.

  • If you're partial to the Linux operating system and want to get started with it, but perhaps don't want to miss out on the Windows you already have installed.
  • If you are afraid of any kind of failures and have a backup option on hand.
  • Or you just don’t want to lose your favorite photos, games and programs.

Then we will tell you about such a great option as installing Linux and Windows on one computer!

This article will discuss installing Linux on Windows 10.

Why in the tenth version? It's simple, because this is the newest version of this operating system. But don't worry, this guide will work for Windows 7, Windows 8 and Windows 8.1 versions too.

General view of the object of the article

You can install it in two ways: without partitioning the disk and by dividing categories into parts.

The first way to do this is faster, but the second is much more efficient, because while you are installing one partition, the others will not be used.

First, we will briefly talk about installing the entire operating system.

Option No. 1. Installing Linux on Windows 10

Windows 10 version 1607 introduced a new shell, Ubuntu Bash. It allows you to use bash scripts in the OS, run and install Linux programs. And in version 1709, three installation software are already available.

With the release of version 1709, the Linux installation for Windows was greatly modified.

Instructions for step-by-step installation in new versions:

1. Go to Control Panel - Programs and Features - Turn Windows components on or off, turn on Windows Subsystem for Linux

2. After installation and restarting the device, download one of the applications.

3. Launch the downloaded software and set a username and password.

4. To enable the Windows Subsystem for Linux component, use the command:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Installation instructions:

1. Launch OS settings - Update and security - For developers. Enable developer mode.

2. Open Control Panel - Programs and Features - Turn Windows features on or off and select Windows Subsystem for Linux.

3. After installation, write “bash” in the OS search, run this version and install.

4. After installation, launch the shell.

Examples of using Ubuntu Shell on Windows

Bash Linux programs on Windows 10 can be installed, destroyed and modified via apt-get from the Ubuntu repository.

Also, you can install Git in Bash and use it as usual, because its interface is no different from Ubuntu.

bash scripts

You can create and run bash scripts on Windows 10 using the Nano Storage Editor.

Attention!

This instruction will only be relevant for versions of Windows 10 1607 and 1709. If you have a different version, proceed to the second installation method.

Option No. 2

To install the two operating systems described above together, you will need to create additional disk partitions, the minimum number of which should be three.

While Windows can be installed on one partition, it is not customary to do this with Linux, but this option is not excluded.

It’s just that this system is very flexible and therefore its installation is allowed in several places where the system itself, its settings and parameters, and the user files themselves will be located.

During the reinstallation, this will work to your advantage, because while you are installing the system partition, the remaining two will be untouched.

These partitions can be roughly called the system home partition and the swap partition. Let's take a closer look at each of them:

  • The most minimal free space requests for a system size installation range between 7 and 20 Gigabytes. But this is the bare minimum, which is only necessary for the installation itself and some supporting applications. It will be more thoughtful if you free up another 15-20 Gigabytes for installing the programs and applications you need. Typically, 35-45 GB are allocated for such a partition.
  • The swap point comes into play when the system needs additional RAM.

Data that is not used or is rarely used is sent to this section. In terms of capacity, it should occupy exactly half of the volume of the operating device. But when using sleep or power saving mode, this partition must be the same as the system one.

  • The home partition contains only files and programs for your personal purpose: these are still the same images, documents, games, music, programs, etc. Everyone sets the volume of this disk individually, based on personal preferences.

Preparing a Windows Disk

Before installing these two operating systems together, be sure to create a backup copy of the entire existing structure or selectively, only the necessary documents, in the event that part of the space will be separated from the media.

No, nothing will be erased, these are just precautionary measures in case of some error, system problems, inattention and a number of other factors.

But it will be best if you still create a copy of not only your necessary files, but the entire operating system if you want to interact with the system media.

To do this, open the item in the control panel that corresponds to the procedure.

If you copy another drive, D, E, etc., then it will be enough to create a copy of only the necessary files.

After the backup process is completed, we can move on to the actual Linux installation process.

To do this, we will use the Windows add-on – Disk Management. Click on the shortcut "My computer" and select the column "Control" .

After opening this menu, we search for and select the item.

We will be shown those disk volumes that are available on the computer: system and regular (in this case there is only one).

For example, we will take drive D, but for the system drive all actions are similar. So how do you manage disk size?

To begin, by right-clicking on the selected drive, click "Shrink Volume" .

After opening a small additional window, in the column "Size of compressible space" specify the size of the volume you will create.

Advice:

Before you do this, look at how much real free space you have on your disk and whether you are investing in your calculations. After all, you will not be able to tear off a non-existent piece of the pie. If there is not enough space, it needs to be freed, and only then begin compression.

So, after applying the size of the compressed space, we confirm our choice and click "Compress" .

Then the unallocated space will be displayed on the screen, with which we will work further and create the necessary partitions.

The pre-installation stage is complete and now you have free space to install Linux with Windows 10.

We will not perform disk partitioning on this system, but will do it using Linux tools.

Preparing a Disk in Linux

Here we will talk about the second alternative way to segment a disk without using Windows. This is not a complete guide to installing Linux on Windows 10.

If you have reasons or you simply do not want to do this using the standard method, then you have the opportunity to do this using any Linux program with the Gparted disk management utility previously installed.

Let's take the well-known Ubuntu as an example.

Launch the work from the Ubuntu media and in the Dash search type "Gparted"(Fig. 19).

Go into it and you will see a special window for the process of monitoring and coordinating media in Linux.

It is very important to note that everything works differently in Linux than in Windows.

Here, the partitions on the media and the media themselves are called differently; more precisely, these are simply the paths for finding documents in the dev virtual file system.

Soon you will get used to it and figure it out. And at this point in time we will only say that the name of a separate partition will begin with “/dev/sd”, and then there will be a letter that characterizes the name of the media, and a number indicating the partition number (for example, sda1, sdb2, etc.) .

In addition to the name of the media partition, in the application we will see the dimensions, the file complex and the amount of free space on the media, with the help of which we will understand where the system is located.

In this model, the path dev/sdb1 is a kind of similarity to the C drive in Windows, and dev/sdb2, accordingly, is the D drive.

So, we reduce the size of the dev/sdb2 partition to 10 Gigabytes in order to install Linux on Windows 10 in the space that was freed up. To do this, select a section, right-click on it and go to Resize/Move.

In the window that pops up after this operation, in the New size column we enter the size we require, and this is also done using the slider.

After fulfilling the previous condition for executing the instruction, we click on Resize/Move. Figure 23 shows that no special modifications are visible yet, but free space has appeared, as we wanted.

The procedure for modifying the volume of the file complex takes the designated time.

When the operation is completed, you can look and make sure that there are noticeable decreases in the dev/sdb2 category and free space has appeared.

To do the same with the system area, make similar settings.

You can reduce the size of the area and subsequently add free zones, but do not do it as shown in Fig. 27:

In view of this kind of action, you can damage the Windows bootloader and although restoring it will not be difficult, it will take you a lot of time, which, we are sure, is of no use to you.

It is best to create partitions in Linux using a special application during the installation process.

Installing Linux with Windows 10

Here we will discuss some facets of disk layout using Ubuntu software as an example, but for others the situation will be similar.

In order to better understand and understand how to install the system, we will consider the manual installation option.

At this stage, we create the previously agreed upon partitions from the space that we have freed up. With the intention of selecting a mount point for the system partition, we address the path /, for the swap area we do not set the mount path, and for the home partition we designate it as /home.

To ensure a successful installation of Linux with Windows, carefully follow the instructions of the software you are using.

Installing Linux with Windows 10 UEFI

UEFI- this is a modern technique that has replaced the old and outdated BIOS, which is used on all current laptops.

Initially, you can notice the use of a new GPT partition table, which has come to replace the old MBR and create a separate partition for operating system bootloaders.

If you have any doubts that UEFI will make installing Linux with Windows 10 on a laptop more problematic, then cast these doubts aside, because there is nothing tricky about it.

If you already have Windows, then it is more likely that this technology is already present and it is recommended that you just select it to install the bootloader during media partitioning. It is small in size (about 30 Megabytes) and is designated by the fat32 file system.

During the installation of Linux with Windows 10, we address this partition and the mount point for it: /boot/EFI. All software that works with the Grub2 boot loader supports installation in UEFI.

That's all the secrets of installing in UEFI, now you have the right to install this operating system not only on your computer, but also on your laptop, the main thing is to follow the installation instructions.

Completing the installation

Perhaps you have one more question left, should you switch to Windows?

There is no need to worry about this, because on the eve of each computer boot, the Grub boot loader will automatically find the Windows boot loader and ask you which operating system you would like to work on.

That is, it turns out that dual booting Windows 10 and Linux will be done automatically.

But! If some malfunctions occurred in the computer and the bootloader could not determine it itself, then you can configure everything yourself and if everything is done correctly, then you will certainly have access to Windows after installing Linux.

Possible problems after installing Ubuntu

In this section, we will look at problems that are likely and not excluded after installing Ubuntu.

If Ubuntu boots immediately when turned on or after a restart and does not allow you to select the operating system, then Windows loading was not detected.

Then, in a special terminal for scanning partitions (in Windows boot record search engines), we enter the command “sudo update-grub”, after which everything will boot.

If the situation is the opposite and Windows boots without the ability to select Ubuntu, then log in and launch the Ubuntu LiveCD terminal to download the Boot Repair utility, after which we enter the commands from Fig. 33 there:

After launch, select the first item “Recommended repair”.

And the application will ask you to enter 4 commands in the command window to fix errors and complete the process of installing new settings.

conclusions

In this article we discussed the issue of installing Linux on Windows 10 , through which you received answers to a number of questions:

How to make a breakdown, choose the right areas and brought up the issue of installation on a laptop with UEFI.

Finally, we emphasize: in order to conveniently and successfully work with Windows 10 and Linux together, you will need to stop Windows FastBoot in order to be able to launch the Windows system partition in Linux.

As a result of the installation, you have two independent operating systems and any changes in any of them will not affect the second.

And also, when reinstalling the operating system, remember that one of the disks needs to be disconnected.

LINUXSOID August 3, 2014

Ubuntu

On the Internet you see a lot of instructions on how to install Ubuntu, many suggest going straight to the actual installation on a disk together with Windows, but many beginners are often afraid, due to their inexperience, to do something wrong so as not to accidentally format the disk or even destroy all their data on another drive.

I have seen many legends and fairy tales, do not install the Ubuntu operating system from Windows using Wubi, maybe there are some disadvantages that you will not fully experience if you install the system using this method, but this is not a significant part that you can ignore at all .

How did I start using Linux? At first, when I was still studying, we took a course on Linux and it was necessary to install one of the systems. The first thing I did was install Mandriva and I don’t remember which version of the distribution, but I didn’t really like it. During the next class, the teacher explained that it would be better for us to install Ubuntu since this distribution is widely popular among both beginners and experienced users. This is where I started my journey into the Linux World.

How did I install Ubuntu? Having looked at a lot of instructions on how to install the system, I was afraid to do something, let alone harm the Windows that was installed as the primary system. I chose the installation type from under Windows - Wubi, for beginners this is an excellent solution since the installation takes place in several steps that anyone, even an inexperienced user, can handle.

What do we need to install Ubuntu using Wubi? It is advisable to cut with Acronis disk director a separate disc of about 20 GB, this disk space will be enough for you to start mastering Linux.

Next, download the image of the Ubuntu operating system - ubuntu.com, have you downloaded it? burn the image to disk or extract the contents of the image using the utility Power ISO to the folder on drive D. Once you have extracted all the contents of the image inside you will see the file Wubi.exe, run the file which will begin the procedure for starting the installation of the Ubuntu system from under Windows. I hope you completed the previous step of cutting a 15-20 GB blank for installing the system, if so, continue.

After running the file Wubi.exe, the following window will open, look below:

  • Installation disk - at this point we select the disk (the blank that we cut for this purpose is not disk C or D).
  • The installation size is the disk space that we will allocate for the system, choose approximately 15GB, which will be enough for you.
  • Desktop environment - Ubuntu.
  • Installation language - Russian, as you wish, you can choose English or any other.
  • Username - the user under which you will log in, in other words, the super user Root.
  • Set a password.
  • The last step is to click on the install button.

After completing the installation steps above, the system files will be extracted to the disk of your choice on which the Ubuntu Linux operating system will be installed. Upon completion of extracting the files, you will be asked to restart the computer, reboot, from this moment the immediate installation of the system will begin, everything will happen automatically; you will not even need to press anything or enter commands or anything else. The system will install for about 15-20 minutes, after which a reboot will also be required upon completion; after rebooting, you will have to log in under the user you created at the very beginning of our installation.

That's all, the system is installed and you can get used to it. You may also immediately have a question: how to set up the Internet?? if you have a cable provider, then the setup takes a couple of minutes, open a terminal and enter the command:

A window will open. Enter the password you created for the user when installing your system.

Afterwards, the Internet connection setup program will open. PPPoE, which will detect and display our network devices. In most cases, you just need to press Tab - “Yes” - Enter.

We will then be asked if we want to use the options:
noauth(do not require authentication from the PPPoE server)
defaultroute(automatically adds a default route) and remove the nodetach option. Click “Yes”.

After program pppoeconf will notify us when the configuration file changes dsl-provider.
We agree and click “Yes”.

We will be asked to enter our login from the contract and click “Ok”.

Enter the password from our agreement. Click “Ok”.
Be careful the password is case sensitive. If you entered it incorrectly, you can correct the password by repeating the procedure by starting the pppoeconf program again.

Establish a connection using the command - sudo pon dsl-provider
Disconnect connection using command - sudo poff dsl-provider

After you are fully familiar with the system and understand which command is responsible for what, where and how and what is corrected, and at least basicly master the terminal and some of the commands, you can easily remove the system installed under Wubi by going to the second Windows system - Control Panel - Programs and components - Installing and removing programs - and at the very bottom you will find our Ubuntu system, select it with a mouse click and click delete. I will tell you how to properly install Ubuntu with Windows in the next article.

That's probably all. I look forward to your comments.

Some of the images are taken from - home.eltel.net

I previously wrote an article about how to install Linux after Windows, which is a fairly simple task. But many users uninstall Windows, install Linux, and then realize that they need Windows again. It’s just a little more difficult to install Windows on a computer that already has Linux installed.

When installing Linux, boot loaders for other operating systems are automatically detected and added to the boot menu. Thus, you do not need to configure anything additional to start your Windows. But if you install Windows on top of Linux, the Windows boot loader will be used, and you will not be able to access Linux without additional settings. However, this problem is completely solvable, and in today’s article we will talk about how to properly install Windows after Linux.

1. Disk partitioning in Linux

To install Windows 10 after Linux, you need free disk space of at least 50 gigabytes, or even more if you want to install a lot of games and programs there. Modern versions of Windows want to create two partitions:

  • Systemic;
  • Partition with recovery data;

But here you need to take into account one point: if you use an MBR partition table, then there can only be four main partitions. And if you already have a root partition, home partition and swap for Linux, then the recovery partition turns out to be the fifth, and this is already a problem, so you need to create an extended partition and mark up the partitions for Windows there. If you install this OS on another hard drive, then there are no problems, but I assume that both systems are installed on the same drive.

First, we need to boot from the LiveCD, since we need to reduce the size of either the root partition or the home partition, and these disks are mounted. The easiest way to do this is to boot from the Live system.

We load our disk, for example Ubuntu, and launch Gparted:

Then you need to reduce the partition. To do this, select the one you need and click Change or move:

Then shrink the partition so that there are 40-50 gigabytes left after it:

Remember, I wrote above that with the MBR partition table you can only create four main partitions. Therefore, we create an extended partition from free space. Select in the field Create as ->Advanced section:

Select all available space, and then click OK:

2. Disk partitioning in Windows

Now we need to figure out how to install Windows after Linux. I won't go through all the Windows Installer steps. You already know them. At the step of selecting a partition for installation, click on the free space that you prepared earlier. The system will not show extended partitions and other additional disk parameters, only the size, this is normal for it.

Then click the button Create and select the partition size. You can agree with what the installer suggests:

Then agree to create additional partitions for system files:

3. Recovering the Linux bootloader

Once you are on the Windows desktop, Windows will be finished and you will need to boot again from the Ubuntu LiveCD or Linux distribution you have installed. Next, we will follow the steps described in the article on restoring the Grub bootloader.

First we need to mount the root partition with Linux, in my case it is /dev/sda1:

sudo mount /dev/sda1 /mnt

If your /boot partition also exists separately, it also needs to be primortized. Then we connect the subsystems for interaction with the kernel in the /mnt folder, where we previously mounted the root:

sudo mount --bind /dev/ /mnt/dev/
sudo mount --bind /proc/ /mnt/proc/
sudo mount --bind /sys/ /mnt/sys/

And we go into the environment of our previously installed Linux using the chroot command:

sudo chroot /mnt/

grub-install /dev/sda

Then we will create a new configuration file, which will already contain our newly installed Windows:

Now Grub2 will be used as the bootloader and Ubuntu and Windows will be displayed in the list of operating systems, which is what we wanted:

conclusions

In this article, we looked at how to install Windows after Linux. This is a rather unusual situation, but for many users the information may be useful. Do you use Windows next to Linux? Write in the comments!

This method requires the GRUB boot loader to be installed on your computer!

P.S I personally tried installing Linux Mint and Ubuntu using this method. I have not tested the installation of other distributions and cannot guarantee the functionality of this method, but theoretically there should be no problems.

First, download the Ubuntu image somewhere. I downloaded the Ubuntu 11.10 image, renamed it to ubuntu.iso and put it in the root of the hard drive. The main thing is to remember the full path to the image from the root of the partition and the number of this very partition. You can reboot.

If you want to install Ubuntu from an iso launched this way, then keep two things in mind:

    Your iso image should not be on the hard drive on which you will install Ubuntu and which is bootable. Otherwise nothing will work. And it doesn’t matter which section you put it on.

    After starting Ubuntu from iso, go to the terminal, type mount and make sure that the output really does not contain partitions that satisfy step 1.

In fact, the easiest way is to put the Ubuntu image on a flash drive, which is defined in GRUB as (fd0).

When the computer boots, when the GRUB menu appears, press the C key. You will be taken to the GRUB console. Dial

A list of all your partitions will appear. Find the one you need there, in my case it will be called (hd1.0 ) . hd is usually sda, hd1 is sdb, etc.

Now do

loopback loop (hd1,0)/ubuntu.iso

By installing the disk you need and the full path to the ubuntu iso image. If everything worked successfully, then we write

linux /casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso noprompt

Don't forget to change the path to the image! Then initrd:

That's it, you can boot. We give the command

and wait for Ubuntu to load.

If you need to install the system from the hard drive on which you are installing it, then you may need the following information useful:

I faced this problem

The Ubuntu installer flatly refused to continue the installation, arguing that I had a mounted partition. In order to create a loop device with our Ubuntu image, grub2 first mounted the partition on which this very image was located. And it doesn’t matter that this section did not appear in any way among those claiming to be any kind of modification during installation, the installer was adamant and refused to continue the installation.

After a short search on Google, it turned out that I was not the first person to encounter this. The problem was solved by removing the line with the mounted partition (in my case it was /dev/sda1) from /etc/mtab . This should have been done before installation began. After removing it, everything went like clockwork.

If you install from external media (usb-hdd, usb-flash), such problems should not arise.

At the moment, installation from an iso image is natively supported in Ubuntu and all distributions based on it (Kubuntu, Edibuntu, Hubuntu, Lubuntu, Mint and others *buntu), Gentoo also supports this type of installation.

But do not forget that in each distribution, the kernel and init image files may be named differently and located in different directories; to make it easier, I will present a small table of what these files are called in popular distros.

Ubuntu vmlinuz initrd.gz
Debian vmlinuz initrd.gz
Fedora vmlinuz initrd.img
Mandriva vmlinuz all.rdz
openSUSE linux initrd
Slackware bzImage initrd.img
Gentoo gentoo gentoo.igz

I also want to give a little hint for those who do not have the GRUB bootloader on their computer and have a Windows system installed (the version is not important).

For such people, there is a utility called grub4dos; I won’t describe the installation; there is a ton of documentation on the Internet, and there is absolutely nothing complicated there. In short, this utility installs the hornbeam bootloader into your system and registers it in the ntldr Windows bootloader. after restarting the computer, you can see 2 boot options - launch Windows or launch GRUB, by selecting GRUB you can return to the beginning of this post and follow all the steps described in it.

The name Wine stands for Wine Is Not an Emulator. This is a kind of layer between Windows applications and the Linux system. It allows you to install and run many popular Windows programs and work with them as if they were native Linux applications.

To install Wine, use the appropriate command.

1. Ubuntu, Debian, Mint:

sudo dpkg --add-architecture i386

wget -nc https://dl.winehq.org/wine-builds/Release.key

sudo apt-key add Release.key

sudo add-apt-repository "deb https://dl.winehq.org/wine-builds/ubuntu/artful main"

sudo apt-get update

sudo apt-get install --install-recommends winehq-stable

sudo dnf install winehq-stable

sudo zypper install wine

4. Arch, Manjaro:

sudo pacman -S wine

Once Wine is installed, open it through your applications menu or using the winecfg command. When you first start Wine, it may ask you to install some additional packages - let it do this. After this, all Windows EXE programs are associated with Wine on the system.

Now download the installer for the Windows application you need, find the folder with it in your file manager and open the file. Or enter the command wine_application_path.

Wine is a good tool, but its interface leaves much to be desired. If you've been struggling with this program but still haven't gotten results, try Winetricks. It has a nice graphical interface for installing and launching Windows applications, which is much easier for a beginner to understand.

You can install Winetricks like this:

1. Ubuntu, Debian, Mint:

sudo apt-get install winetricks

sudo dnf install winetricks

sudo zypper install winetricks

4. Arch, Manjaro:

sudo pacman -S winetricks

Winetricks allows you to install different versions of Microsoft Office and Photoshop, foobar2000 player and many other programs. Popular games such as Call of Duty 4, Call of Duty 5, Biohazard and Grand Theft Auto: Vice City are also supported. Some programs will download automatically, while others will prompt you to insert installation media. And, of course, you can open personally downloaded EXE files.

PlayOnLinux is another convenient tool for running Windows applications on Linux. Like Winetricks, it has a simple graphical interface. But, unlike it, PlayOnLinux allows you to select a specific version of Wine for a particular application. This is useful if some of the programs you need do not work correctly with new versions of Wine. Overall, PlayOnLinux looks much nicer and more practical than Winetricks.

To install PlayOnLinux, run one of the following commands in a terminal:

1. Ubuntu, Debian, Mint:

sudo apt-get install playonlinux

sudo dnf install playonlinux

sudo zypper install playonlinux

4. Arch, Manjaro:

sudo pacman -S playonlinux

The PlayOnLinux installation menu offers a variety of pre-configured applications and games that you can download and install with a couple of clicks. In addition, PlayOnLinux can be fed its own EXE installers. The application will carefully select the Wine version for you and create an icon for the installed program.

Occasionally, the free PlayOnLinux and Winetricks fail to install a particularly finicky application. In this case, Crossover can help you. This program is very easy to use. You just need to indicate which application you want to install and slip Crossover the installation file. Everything else will be done for you.

A one-year Crossover license costs $39.95, but the program also has a free trial. It is recommended that you install the application you need on it first to make sure it works correctly.

If your application stubbornly refuses to run in the programs listed above, you can take drastic measures and install it in a virtual machine. Please note that it takes up much more system resources, so it should be used in extreme cases.

To run the application in a virtual machine, you will need a Windows installation image in ISO format. Download and install VirtualBox, create a virtual machine in it, point it to the Windows ISO, and then simply install the system as usual.

An undeniable advantage of a virtual machine is that it runs full-fledged, which means that absolutely everything will run. The downside is that it is gluttonous in terms of system resources, and it’s expensive to spend money on a Windows license for a virtual machine.