Linux debian установка windows

Linux debian установка windows

Windows 10 was installed first on a non-formated disk using a non-UEFI BIOS.

A partition table (type msdos) and a partition for Windows were created manually during the installation of Windows. Windows automatically created a «System Reserved» partition (/dev/sda1) used for booting. Windows was installed into the second partition (/dev/sda2). Debian was installed into the third partition (/dev/sda3).

Problem: After running package upgrades, a GRUB entry for Windows was not added by the os-prober.
Solution: Re-enable os-prober to create a custom GRUB menu entry for Windows.

To re-enable os-prober uncomment the following line in /etc/default/grub:

#GRUB_DISABLE_OS_PROBER=false

NOTE: You will likely have to retrieve and enter your Windows volume Bitlocker key to get Win10 to continue booting after each time GRUB updates take place.

Problem: The GRUB entry created for Windows by the os-prober is wrong (e.g., has the wrong name).
Solution: Disable os-prober create a custom GRUB menu entry for Windows.

To disable os-prober add the following line to /etc/default/grub:

GRUB_DISABLE_OS_PROBER=true

Discover the UUID of the partition containing the Windows boot loader by executing the following command in terminal as root:

The output will be something like this:

/dev/sda1: LABEL="System Reserved" UUID="1D584C40586B2873" TYPE="ntfs" PARTUUID="adc19fb9-33"

Use the UUID value to create a custom menu entry at the end of the /etc/grub.d/40_custom file:

menuentry "Windows 10" --class windows --class os insmod ntfs search --no-floppy --set=root --fs-uuid 1D584C40586B2873 ntldr /bootmgr >

Update grub by executing the following command in terminal as root:

  • --class is used to group menu entries into classes. Menu themes may display different classes using different styles.
  • --no-floppy option prevents searching floppy devices, which can be slow.
  • ntldr is a new method to chainload Windows boot loader (the old one is chainload +1).
  • --hint. You may have seen other menu entries using --hint* options with the search command. In case when two or more partitions have identical IDs, this hints help to find the right one. In our case, we use UUID and it is very unlikely that several partitions on one system get identical UUIDs.
  • drivemap and parttool commands. You may have seen other menu entries using these commands. They are needed if you have more than one Windows/DOS installation on one disk.

Источник

Dual Boot Debian and Windows

This article is useful for Windows users or a clean disk to install both systems.

The tutorial gives optional instructions to prepare a Windows disk space to add Debian Linux and covers the Linux posterior installation to support dual boot. It does not cover the Windows installation process but instructions to make your Windows support adding Debian if you do not have an additional free disk for Linux.

Читайте также:  Linux приложение для rdp

All steps described in this tutorial include real scenario screenshots, making it easy for any user to follow them.

Important Note: If you have an additional empty hard disk you want to dedicate to Linux, you can skip the first section of this tutorial and go straight to Linux instructions.

Part 1: Preparing Windows to add Debian Linux installation with dual boot

As said in the introduction of this article, I assume you already have Windows installed; if you don’t, install it first and follow the instructions below.

Important Note: If you use a dedicated hard drive for Linux, you can skip the following Windows instructions (Part 1 of this tutorial) and go straight to Linux instructions. Otherwise, keep reading below.

From Windows, find This PC icon, right-click it and press the Manage option as shown in the screenshot below.

In the Computer Management window, double click Storage as shown below.

Double click Disk Management.

There you will see your Windows partitions; in my case, my disk already has enough free disk space without partitions, so I can reboot the computer and start installing Linux. If your disk has no free space without partitioning, keep reading the next steps described below.

If your disk has no space without a partition, let’s free space from an existing partition. Right-click your C: unit and press the Shrink Volume option.

In the “Enter the amount of space shrink in MB”, define the space you want to take from Windows and use for Linux, then press the Shrink button. When asked for confirmation, confirm the operation.

After confirming and shrinking your disk, freeing space without partitions, reboot your computer and put the Debian DVD/CD/USB booteable device.

Step 2: Installing Debian for dual boot with Windows:

When booting the Debian Linux installer, select Graphical Install and press ENTER on the first screen.

In the second step of Debian installation, choose your language and press the Continue button located at the right bottom of the screen.

In the third step of Debian installation, select your country and press Continue.

Select your keyboard according to your language dialect in the fourth step, then press Continue.

You will see the installer start loading components; wait for a few seconds or minutes for this process to end.

You will be asked to define a hostname for your Linux machine. If you are a Windows user, you can think about the hostname as the Computer name. This field is arbitrary; the hostname is your computer ID within a network. After typing the hostname, press Continue.

The next steps will ask you for a domain name, another arbitrary field that must be shared with other computers within your network. This is not mandatory. You can leave it empty, and press Continue.

Now you will be required to define a password for the user root. If you are a Windows user, you can consider the root user as the Administrator user. You must remember this password.

Читайте также:  Как заменить файл через командную строку linux

In the two steps below, you will be required to add a non-privileged user (A user without administrator permissions). But in this step, you are required to type the user’s real name (Or how you want him to be named). This is not the username!

After typing it, press Continue.

You will be required to add a non-privileged user (A user without administrator permissions). This is the name you want your user to be named. Another arbitrary field. After typing it press the Continue button.

Define a password for the non-privileged user you created in the previous step and press Continue.

Select your location for your system clock to work properly, and press Continue.

This tutorial assumes you are new to Linux. Therefore, in the following step, we will select the recommended option for new users: “Guided – use the largest continuous free space“. If you are an experienced Linux user, you can manually partition your disk.

After selecting your desired option, press Continue.

At this step, you need to select the hard drive where you want to install Linux, then press Continue.

In the following step, we will also choose the option “All files in one partition (recommended for new users)”. If you are an experienced Linux user, feel free to choose another option.

Select your preference and press Continue to go ahead.

You need to select the free space you previously created in Windows, as instructed in the first section of this tutorial.

Pay special attention NO TO SELECT NTFS PARTITIONS! Only select the FREE SPACE option and press Continue.

This tutorial assumes you are new to Linux; therefore, select the “Automatically partition the free space” and press Continue.

You will see two new partitions identified as “/” and as “swap” on the next screen. The partition identified with a slash will contain all your system files, while the swap partition is the virtual memory partition.

Select the “Finish partitioning and write changes to disk” option and press Continue.

Confirm the operation by ticking the “Yes” option and press Continue.

The installer will write changes to your disk and start installing the system base files. This process may last a few minutes.

During the packages installation process, you will be asked if you want to add another installation media. Normally “No” is the correct answer. Select “No”, and press Continue.

In the next step, you will be asked if you want to download up to date packages from a mirro instead of installing them from your CD/DVD/USB. I recommend you not to do it because upgrading your system packages once the system is installed is a simple task you can execute with just a command (sudo apt upgrade). If you want to install up to date packages from the installation, select the affirmative option and select a mirror.

Читайте также:  Linux how to know open ports

For this tutorial, I select “No”, choose your option, and press Continue.

As you can see, package installation will keep running. Wait until you are required to select the packages you want to install manually.

While installing system base files, you will be asked if you want to share information with the Debian developers community.

Choose the option you want, and press Continue.

Now you can select additional packages manually. If you don’t know what additional packages to install, don’t worry. Just press Continue; you will always be able to add these packages by executing a simple command.

The installation process will continue. Keep waiting until it ends.

After installing packages, you will be asked if you want to install the GRUB bootloader. This step is very important because GRUB makes the dual boot possible.

Tick the “Yes” option and press Continue.

You will be required to select the disk where you want to install GRUB; it is recommended to install it on the same disk you are installing Linux. Select the disk and press Continue.

GRUB will start being installed; it may last from a few seconds to a few minutes; just wait for it to end the process.

And the installation process ended. Press the Continue button to boot GRUB, where you can select to start Windows or Linux.

As you can see, when booting the system now, you can choose between both operating systems.

That’s all; now you have both systems installed.

Conclusion:

As you can see, installing Debian Linux and Windows with the dual boot is a long but easy process. Any user can achieve it by following the instructions explained above. Keeping both systems is a good option for users who want both a professional operating system (Linux) and a second system for gaming (Windows). It is also a great opportunity for Windows users to learn Linux without leaving Windows if they feel comfortable with it. I’m sure after trying both systems; the user will choose Linux, which is open source, free, stable and safe.

Thank you for reading this tutorial explaining how to install Debian and Windows with dual boot.

About the author

David Adams

David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.

Источник

Оцените статью
Adblock
detector