Installing lunix from under windows. Installing Linux from under Windows: step by step instructions, characteristics. Partitioning a disk in Windows

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

  • If you are partial to the Linux operating system and want to get started with it, but you might not want to miss out on Windows already installed.
  • If you are afraid of any all kinds of crashes and have a fallback on hand.
  • Or you just don't want to lose your favorite photos, games and programs.

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

This article will focus on 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 as well.

General view of the article object

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

The first way is faster, but the second is much more efficient, because while you install one partition, the others will not be involved.

First, we will briefly describe the installation of the entire operating system.

Option number 1. Installing Linux on Windows 10

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

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

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

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

2. After installing and rebooting the device, download one of the applications.

3. Run 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. Run OS Settings - Update & Security - For Developers. Turn on developer mode.

2. Open Control Panel - Programs and Features - Turn Windows features on or off, and click the Windows Subsystem for Linux box.

3. After the installation is complete, in the OS search, write "bash", run this version and install.

4. After installation, start 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 does not differ from Ubuntu.

Bash scripts

You can create and run bash scripts in Windows 10 with the Nano Store Editor.

Attention!

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

Option number 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.

If Windows can be installed in one partition, then 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 reinstallation, this will play into your hands, because while you install the system partition, the two remaining ones will be intact.

These partitions can be conventionally referred to as the system home and swap partitions. Let's take a closer look at each of them:

  • The smallest requests for free space to install the system size range between 7 and 20 Gigabytes. But this is the very minimum that is required only for the installation itself and some auxiliary applications. It will be more thoughtful if you free up another 15-20 Gigabytes to install the programs and applications you need. Usually 35-45 GB is allocated for such a partition.
  • The swap point is used when the system needs additional RAM.

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

  • The home section contains only files and programs for your personal use: these are all the same images, documents, games, music, programs, etc. The volume of this disc is set individually by everyone, based on personal preferences.

Preparing the Windows disk

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

No, nothing will be erased, these are just precautions in case of any 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 disc, D, E, etc., it will be enough to create a copy of only the necessary files.

After the end of the backup process, we can proceed, in fact, to the very process of installing Linux.

For 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 an item.

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

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

First, by right-clicking on the selected disk, click the "Shrink Volume" .

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

Advice:

before doing this, look at how much real free space you have on your disk and whether you are investing with your calculations. After all, you cannot tear a non-existent piece from the pie. If there is not enough space, you need to free it, and only then start compressing.

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

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

The stage of preparation for installation is completed 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 tell you 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 a reason, or you simply do not want to do it in a standard way, then you have the opportunity to do this action using any Linux program with the previously installed Gparted utility for managing disks.

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

Start the work from the Ubuntu media and type in the search for Dash "Gparted" (fig. 19).

Go into it and you will see a special window for the process of controlling 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 just ways to find documents in the virtual file system dev.

You will soon get used to it and figure it out. And at this moment 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 that means the partition number (for example, sda1, sdb2, etc.) ...

In addition to the name of the media section, 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 dev / sdb1 path is a kind of similarity to the C drive in Windows, and dev / sdb2, respectively, is the D drive.

So, we reduce the size of the dev / sdb2 partition to 10 Gigabytes, in order to perform a Linux installation 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 need, 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 specific modifications are visible yet, but the free space, as we wanted, has formed.

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

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

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

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

In view of this kind of action, you can damage the Windows bootloader, and although its recovery will not be difficult, it will take you a lot of time, which, we are sure, is useless for you.

Partitions in Linux are best created using a special application at the time of the installation process.

Installing Linux with Windows 10

Here we will discuss some facets of disk partitioning using the example of Ubuntu software, but on others the situation will be similar.

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

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

To install Linux from Windows successfully, carefully follow the instructions of the software you are using.

Installing Linux with Windows 10 UEFI

UEFI- This is a modern technique that has come to replace the old and outdated BIOS, which is used on all current laptops.

Initially, you can see that this is the use of the new GPT partition table, which came to replace the old MBR and create a separate partition for the boot loaders.

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

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

When installing Linux with Windows 10, we address this partition and the mount point for it: / boot / EFI. All software that works with the Grub2 bootloader support installation to UEFI.

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

Completing the installation

Perhaps you still have one more question, go Windows?

Do not worry about this, because on the eve of every computer boot, the Grub bootloader will automatically find the Windows bootloader and ask you which operating system you would like to do the work on.

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

But! If there were any malfunctions in the operation of the computer and the bootloader could not determine itself, then you can configure everything yourself and if everything is done correctly, then you will certainly get access to Windows after installing Linux.

Possible problems after installing Ubuntu

In this section, we will consider non-variants of problems that are likely and not excluded after installing Ubuntu.

If Ubuntu boots immediately when it is turned on or after restarting and does not give the right to choose an operating system, then the Windows boot was not detected.

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

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

After starting, 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 such 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, for the sake of making it possible to start 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 yet, when reinstalling the operating system, remember that one of the disks needs to be disconnected.

If you still have never seen or tasted the Linux world, without fear and risk of losing data: I present to you wubiubuntu installer from Windows (w indows Ub untu i nstaller). Supports the latest Ubuntu from 12.04 to 14.04, you can freely download it on this page in the folder with the release you are interested in.

Download and run wubi.exe, here are some simple settings:

  • Installation disk - you can choose the system or any other disk or partition, the installation feature is the placement of the ubuntu operating system in a file root.disk stored in<диск к папкой установки>: \\ ubuntu \\ disks \\
  • The size available for OS from 5 to 30 GB. It will immediately take up disk space, then the size of the home partition / home can be increased.
  • Graphical desktop environment Ubuntu variant using Unity, Kubuntu with KDE, Mythbuntu is intended for installation on MythTV, Edubuntu is aimed at educational institutions, Lubuntu is a variant of minimal computer resource consumption with LXDE environment, Ubuntu Studio deploys ready-made photo, audio and video studios with XFCE graphical environment ...
  • The language of the future system
  • Username
  • Password will prompt at login and for system operations.

We decided on the initial settings, click Install and Allow access to boot the operating system installation disc. It remains to wait a bit and reboot.

By the way, if you want to install the 32 bit version, create a shortcut with the full path to wubi.exe, for example C: \\ Users \\ Intencio \\ Downloads \\ wubi_13-04.exe and finally finish off —32 ... The program will start, the settings will remain the same, only it will already load ubuntu-13.04-desktop-i386 .iso

After rebooting, the computer will continue to install Ubuntu, the choice of systems to boot will appear the next time.

Let's wait a little while the partitions are mounted and the installer copies the necessary files

The computer will automatically restart and we can already choose where to boot!

After selecting the second item, we will be taken to the Grub bootloader menu - it will help us finally immerse ourselves in the Linux environment)

We will enter the password, we set it at the very first stage of the installation, and we will get into our new Ubuntu!

This is where our journey begins on the development of virgin lands - the world of operating systems of the nyx family)

This article will help you install any Linux distribution from a Windows machine directly from the iso image on your hard drive. The article can help owners of netbooks, as well as those who, for whatever reason, cannot use a regular installation disc.

Installing Grub4Dos

First, Grub4Dos. At the time of this writing, the latest stable version is Grub4Dos 0.4.4

Win XP / 2000

  • Unpack grldr and menu.lst
  • Editing boot.ini... You may need to remove the "read only" attribute to be able to save the file
    attrib -r boot.ini
  • Add to the end of the file
    C: \\ grldr \u003d "Grub4Dos"

Win Vista / 7

  • Unpack grldr, grldr.mbr and menu.lst from the archive to the root of the disk with Windows installed.
  • We launch the console as administrator and execute
    bcdedit / create / d "Grub4Dos" / application bootsector
  • In response to the previous command, we get the id of the created record, which we will substitute in the next three
    bcdedit / set (id) device partition \u003d C: bcdedit / set (id) path \\ grldr.mbr bcdedit / displayorder (id) / addlast
More detailed instructions for installing Grub4Dos can be found.

Edit menu.lst

Add a new item to the bootloader menu

Title Boot Installer fallback 1 root (hd0,1) kernel / vmlinuz vga \u003d normal ramdisk_size \u003d 14972 root \u003d / dev / rd / 0 rw - initrd /initrd.gz
Here we substitute the disk number and the partition number for yours. If Ubuntu is installed, then you can download (amd64) the necessary images vmlinuz and initrd.gz... In other cases, they can be found in the iso image of the distribution itself. For reference, here is a small table of names in different distributions

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

Now copy the iso image of the distribution into the resulting heap and reboot.

Installation

Perhaps the installation is slightly different in different distributions. I'll walk through the installation using Ubuntu as an example.

After the restart, a new item will appear in the Download Manager. We choose

The Grub4Dos bootloader will appear. Choose "Boot Installer"

The installer will prompt you to select a language. We choose our great and mighty

The installer may not be able to find the image on its own

In this case, you need to re-run the search from the main menu and specify the location manually

After selecting the image, several more familiar windows will appear and the installation will begin.

Edit menu.lst. Option # 2

Alternative menu.lst is also possible

Title Boot Installer fallback 1 find --set-root /image_name.iso map /image_name.iso (0xff) || map --mem / image_name.iso (0xff) map --hook chainloader (0xff) savedefault --wait \u003d 2
No additional gestures are required here - the usual Ubuntu installer will load.

Since the image is loaded from the hard disk, I advise you to pre-allocate a partition for the OS and swap before starting the installation.

There are many ways to try Ubuntu. Someone likes to install themselves next to Windows more, someone changes hard drives, someone rapes a virtual machine. For me, the easiest way is Wubi. Windows-based Ubuntu Installer. An application that allows you to install Ubuntu as a regular Windows program.

The essence of Wubi is very simple - we launch the program, it creates a folder on the hard disk where the necessary files are uploaded, the original Ubuntu image is downloaded, minor settings, reboot ... And your Ubuntu is ready to use!

Almost all Ubuntu-based products can be installed with exactly the same images - Kubuntu, Xubuntu, Mythbuntu. Previously, there were also Netbook versions, but on 11.04 it remained only for Ubuntu. For version 11.10, Lubuntu is likely to appear.

Wubi is available on all Ubuntu discs. It is located in the root folder of the disk, the file wubi.exe. But this file can be downloaded separately. The Ubuntu website has a direct link to it.

This orange button with the words "Start download" - and the download will begin. The program weighs nothing at all, less than 1.5 megabytes. Still, it's better to download the original CD image anyway. Why, I'll tell you later.

After launch, we will see this:

Actually, the main window of the program. Everything is very simple, you must admit, there is even nowhere to get confused!

In the very first window, you select which hard drive you want to install Ubuntu on. I have one, so I will leave him.

Below is the location that is needed for the new Ubuntu. Possibly from 3 GB to 30 GB, with steps of 1 GB. Ubuntu itself is about 7GB, but I go for the maximum. You never know what you need ...

In the lower list, select which system you want to install. Let me remind you that on drives for 11.04, these can be Ubuntu, Ubuntu Netbook, Kubuntu, Xubuntu, and Mythbuntu. Who likes what more.

In the column on the right, the language of the future system is selected, the username (login) and password are entered with confirmation. It turns out that the password is the same for the entire system - both for the user login and for the administrator.

It is also possible to customize special tools for people with disabilities. To do this, click the "Accessibility" button.

Such a window will appear in front of us. I don't know what each of the points means, because I haven't tried it myself, there was no need. You can experiment if you want. By clicking the "Next" button, we will return to the previous program window.

There is nothing more to insist. If you still want to install Ubuntu - feel free to click "Install", if you don't want to ...

Install. The download of the files and image will begin. I said that downloading the original image is better, because you can do without downloading the image for Wubi, just skipping this moment. To do this, the installer and the image file must be in the same directory, no matter what.

The installer will check the image file and, if everything is in order, extract the necessary files from it. You do not need to download any additional files such as MD5.

This method is convenient for those who will download the x64 image by default. If you want to have an x86 system, it is enough that the Wubi image and installer are in one place, and then the x86 system will be installed.

Attention! The image file with this method must necessarily be a CD-ROM and not an alternative one. Unfortunately, Wubi is not on friendly terms with DVDs. Although the Wubi file itself is on the DVDs.

If everything went right, you will see a window like this:

I have captured just the moment of checking the disk image file.

At the end of the installation (1 minute for the existing image, 30 minutes for downloading), it will only be enough to reboot:

Rebooting ... Done!

If something went wrong, or you don't like your Ubuntu, you can easily uninstall it. Run the same installer again:

Press the "Delete" button and the system is completely erased from your computer. As if it never happened!

If you want, you can experiment as many times as you like.

Instead of an afterword.

    It happens that when launching the Wubi installer, an error pops up. It's okay, just press the "Cancel" button the required number of times. The system, both Windows and Ubuntu, is not affected.

    Each Ubuntu build has its own version of the Wubi installer. The example used is the Wubi 211 version - it corresponds to Ubuntu 11.04. If you want an earlier version, they are easy to find on the internet.

    Wubi works on all systems except Windows ME.

Earlier I wrote an article on how to install Linux after Windows, it's a pretty 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 where Linux is already located.

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 to start your Windows. But if you are installing Windows on top of Linux, then the Windows bootloader will be used, and you will not be able to access Linux without additional configuration. However, this problem is quite solvable, and in today's article we will talk about how to properly install Windows after Linux.

1. Partitioning a disk in Linux

To install Windows 10 after Linux, you need at least 50 gigabytes of free disk space, 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 data for recovery;

But here you need to take into account one point, if you use an MBR partition table, then there can be only four main partitions. And if you already have a root partition, home 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 partitions for Windows already there. If you install this OS on another hard drive, then there are no problems, but I assume that both systems are installed on exactly 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 shrink the partition. To do this, select the one you need and click Change or move:

Then shrink the partition so that it leaves 40-50 gigabytes after it:

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

Select all available space, and then click OK:

2. Partitioning a disk in Windows

Now we need to figure out how to put Windows after Linux. I won't go over all the steps in Windows Installer. You already know them. At the step of choosing 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 size, this is normal for it.

Then press the button Create a and select the size of the partition. We can agree with what the installer suggests:

Then agree to create additional partitions for the system files:

3. Linux boot loader recovery

Once you are on the Windows desktop, you are finished with Windows and you need to boot again from the Ubuntu LiveCD or the 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 Linux root partition, in my case / dev / sda1:

sudo mount / dev / sda1 / mnt

If the / boot partition also exists separately, it must also be primed. Then we connect the subsystems for interacting with the kernel into 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 to the environment of our previously installed Linux using the chroot command:

sudo chroot / mnt /

grub-install / dev / sda

Next, let's create a new config 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 atypical situation, but the information may be useful for many users. Do you run Windows alongside Linux? Write in the comments!