Installing Kali Linux on a flash drive or external drive as a full-fledged OS. Installing Ubuntu Linux on a blank hard drive How to run ubuntu from an external hard drive

Firewire and eSATA hard drives, as well as other external media, have important common feature: they connect to the computer on the go, and disconnect on the go. The system works with almost all such media as SCSI.

How to connect external drives in Linux?

Local systems (KDE, Gnome) of almost all distributions react to connecting external media like this: a new window opens file manager(sometimes with a confirmation request), providing convenient access to files on a connected external storage device.

Often an icon appears on the desktop indicating the media and allowing you to open context menu, through which file system can be specifically disconnected from the directory tree.

It is necessary to specifically disconnect all sections of the external media from the directory tree, and only then remove the cable! On most distributions, this requires clicking on the media icon and selecting Eject, Safely Remove ( Safe removal) or a similar entry in the menu.

This ensures that all write operations are completed before actually shutting down the device. If you neglect this step, you risk damaging the file system and losing data!


In general, it’s strange, since the procedure is simple. Maybe there was simply no section created for the store?

Maybe there was simply no section created for the store?
This is probably what happened. The hard drive contained programs for Windows. I didn’t want to run them under Wine. I don't use a virtual machine. That's how things are.

Although if there were already programs on it, then there was a section. But perhaps these programs encrypted everything to protect the disk, so it was not possible to format it so easily.

trying to connect external drive This is what it gives me: Error mounting /dev/sdb1 at /media/vadim/3Q HDD External: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000, dmask=0077,fmask=0177" "/dev/sdb1" "/media/vadim/3Q HDD External"" exited with non-zero exit status 13: $MFTMirr does not match $MFT (record 0).
Failed to mount "/dev/sdb1": Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it"s a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the "dmraid" documentation
for more details.

Try installing the mountmanager program, it helped me a lot in a similar situation:

sudo apt-get install mountmanager

If you want to have a portable flash drive or external hard drive with , then there are at least two options:

  • install the system on a flash drive
  • (permanent storage)

The first option is similar to a normal installation operating system. But since we will install on a flash drive, we get portability - the ability to boot on any computer with USB input. All changes made to the system are saved after reboot. In general, the work is not much different from working with a regular computer.

The second option is to create Live systems on a USB drive (the same flash drive). But since the Live system is not able to save changes ( user files, system settings), another partition is additionally created for it, on which files and settings made are saved. That is, it would seem that it turns out something like the first option - there is a system that “remembers” the changes made after a restart. In fact, there are some nuances.

Live system with persistent itself takes up less space - the same as downloaded ISO image- i.e. usually up to four gigabytes. The operating system installed in the usual way takes about 13-15 gigabytes. But a normally installed system will boot faster because Live uses compression. A live system with persistent may encounter a problem where the new kernel (which can be updated) is incompatible with the old bootloader (which is part of the Live image and is not updated).

In general, both methods deserve the right to exist, and both of them will be discussed on the pages of the site. This tutorial will show you how to how to create a flash drive with Kali Linu installed x. A detailed procedure will be described to avoid some problems that may arise when installing the system on a USB drive or when booting from a USB flash drive or external drive.

Features of installing Kali Linux on a memory card

Installing on a USB flash drive is similar to installing on an internal drive. But in order not to accidentally damage the main computer system, computer hard drives or the main system boot loader, I suggest installing Kali Linux to a USB flash drive in virtual computer. After this installation is complete, you will be able to real computer boot from this flash drive. I use .

I assume that you already have VirtualBox installed, or you know how to install it yourself.

In VirtualBox, create a new virtual computer. The most common virtual computer for Linux. The only difference is that it does not have to have a (virtual) hard disk. If you have difficulty creating a virtual machine in VirtualBox, or have difficulties with other issues related to VirtualBox, then refer to the instructions “”, where this is described in detail and illustrated with screenshots.

When, in the process of creating a new virtual computer, you reach the window Hard drive, then select " Do not mount the virtual hard disk»:

Once the virtual machine is created, launch it. Official releases (not weekly automated builds) are recommended as ISOs. When trying to use the weekly builds I was getting errors that the kernel modules couldn't be loaded and the installation was failing.

USB flash drive for Kali Linux

For Kali Linux, as well as for any modern Linux distribution, I recommend memory cards larger than 16 gigabytes. Those. that's 32 gigabytes or more. The higher the speed, the better. Flash drives are not well suited for multiple simultaneous read/write operations, and operating systems operate in this mode. Even with a good memory card, your system will work noticeably slower than a desktop one; it may lag and slow down. With a bad (slow) memory card, work can become difficult and uncomfortable.

How long do USB flash drives with an installed operating system last?

I am one of those who do not spare my media. I download torrents on my memory cards in my phone, I install operating systems on my USB flash drives, use them intensively, and often make and restore full backups. I haven't had a single memory/USB card break due to heavy use. Honestly, I think it's a myth that memory cards can deteriorate due to frequent use. Maybe I'm just lucky. I want to say that USB flash drives (at least some) can “live” for years and be used with operating systems installed on them.

Cleaning a USB memory stick to install an operating system

Before starting the installation, I recommend completely erasing the data from the flash drive (remove GPT), because otherwise I sometimes had errors with a problem writing to the disk. We will do this using the Live system itself, booting from the downloaded ISO.

When this menu appears, instead of selecting “Graphical installation”, boot into the system.

When you boot into the bottom bar of the virtual machine, connect your USB flash drive to the system:

You can look at the list of disks, but since there are no other media ( hard drives), is not there, then you will only see the flash drive under the name /dev/sda:

Fdisk -l

To remove GPT from the disk, if it is there, run:

Gdisk /dev/sda

To switch to expert mode, enter

Then to remove GPT enter

Agree twice to completely clear the drive.

Now our flash drive is cleaned, without removing it, reboot the virtual system. Now from the menu select " Graphical install»:

Instructions for installing Kali Linux on a USB memory stick

There are no differences from installing the operating system - everything is quite standard, the choice of language, username, etc. If you have problems with this, then, again, refer to the “” note.

Perhaps there is only a small nuance with the swap partition. We do not need a swap partition on the flash drive at all - we will use the computer resources directly, i.e. all RAM - this should be enough. But even if this is not the case, the swap partition on a flash drive will only be harmful, since it will be very slow. To prevent the creation of a swap partition, when you go to " Disk partitioning» select the item « Manually»:

Select a section:

Select “Yes”:

Select “FREE SEAT”:

In the next window, most likely, you won’t have to change anything:

Select “Primary”:

Select “Partition setup complete”:

Select “Finish partitioning and write changes to disk”:

The system complains that no partition for swap space is specified and praises it in every possible way. In our case (installing the OS on a flash drive), it is really not needed. Select “No”:

Now select “Yes”:

After this, the normal installation of Kali Linux OS will begin.

Leave it unchanged here:

Select your flash drive:

When the installation is finished (and this may take longer than you expected, since flash drives are not as fast as even regular hard drives, not to mention SSDs), then turn off the virtual computer. You can reboot your real computer to boot from the system freshly installed on the USB flash drive.

Booting Kali Linux from a flash drive

If you do not have UEFI, then when the computer starts to boot, press the Delete or Esc button many times (sometimes another one, depending on the model motherboard- you can find this out on Google). In the BIOS, where “Boot Order” is selected, select your flash drive. The flash drive must be inserted into the computer at this moment, otherwise the BIOS will not see it. If the flash drive is inserted, but the computer does not see it, try inserting it into different slots and reboot each time and go to the BIOS.

If you have UEFI, then you can’t just get into the BIOS. The easiest way to get into the BIOS is to enter command line(on behalf of administrator):

Shutdown.exe /r /o

After this, a message will appear that the computer will restart in less than one minute. After the reboot, we get here and select “Diagnostics”:

Now select “Advanced options”:

Now "UEFI Firmware Settings":

Well, “Reboot”:

U different manufacturers Different BIOSes, so yours may be different. But I’ll show you an example of my laptop so that the essence is clear. Go to the Boot tab, select Boot Option Priorities, see what options there are:

There is only one option and I definitely don’t have my flash drive.

We look for Secure Boot and disable it (Disable):

A new menu item OS Mode Selection appears. In it we select CMS and UEFI OS. If you select only CMS OS, then installed Windows will not load.

Now we look for an item such as Fast BIOS Mode and disable it (Disable). This is necessary so that when loading the BIOS it starts checking for the presence of USB devices:

But we need to go to BIOS again! Therefore, when loading, press the appropriate key. My key is F2. On the old computer, this key was Delete. The BIOS writes this key itself when the computer boots. If you don’t have time to look or don’t understand English, then look for your model on Google. Or try the brute force method. In addition to those mentioned, this key can also be Esc or some F*.

Go to the Boot Option Priorities tab again. Now there is a flash drive there. If you do as I did - put the flash drive in first place, and Windows Boot Manager in second place, you will achieve the following effect: if the flash drive is inserted into the computer, then Linux will boot from this flash drive. If there is no flash drive, then Windows will boot - and there is no need to go into the BIOS again!

Don't forget to save and reboot.

Solving the problem “the disc contains an unclean file system”

When booting Linux you may encounter an error:

The disc contains an unclean file system (0, 0)

This error appears especially often when trying to boot from a USB flash drive or external drive. The reason for this is that the GRUB settings point to the wrong drive, for example the Windows drive. The system does not understand the disk file system and cannot continue booting. This problem can be solved quite simply.

Restart your computer and when the menu appears GRUB bootloader press the key e. You will see something like this:

Notice the line starting with linux. In my case there is an entry

Root=/dev/sda1

Since during installation in the virtual computer there were no other storage media besides the flash drive, it was given the name /dev/sda1. A real computer has at least one other hard drive, and the name /dev/sda1 could be assigned to it. And the flash drive I'm trying to boot from now has a different name. This name could be /dev/sdb1, or /dev/sdc1, or something else (depending on the number of disks in the system).

If you don't know the new name, just try different options. Move the cursor to the disk name and change it to /dev/sd b 1. After that, press the key F10 and wait for it to load. If the download is unsuccessful, then restart the computer and change the entry to /dev/sd With 1 (and so on alphabetically), press F10 and check whether the download was successful.

After successfully loading into the system, change the name of the boot disk. For example, in my case the disk name turned out to be /dev/sdс1(with letter c). Then the command to change is boot disk will look like this:

Sudo grub-install --recheck /dev/sdc sudo grub-mkconfig -o /boot/grub/grub.cfg

Instead of /dev/sdc Substitute the name of your disk or flash drive.

Now, when rebooting, an error will not occur, and I will immediately get into Kali Linux installed on the flash drive.

Backing up a flash drive with Kali Linux

Installing an operating system on a flash drive, and especially its subsequent configuration and installation of programs, is a lengthy process. In case the flash drive does break or you need it to record course work, you can make a backup copy of it. It is also recommended to make backup copies before installing video drivers or other similar experiments that are dangerous for the OS.

If we are talking about creating a backup copy of the OS, and not individual files, then the best option is to clone an image of the entire disk. If necessary, this will allow you to very quickly return the entire operating system with all settings. The disadvantage of this method is that the backup image will take up exactly as much space as the capacity of the flash drive. Even if, for example, the operating system with all the files takes up only half the volume USB media, then the image will still be the size of a flash drive. As already mentioned, the advantage is that you do not need to select files for synchronization, all backup stored as a single file, restoration guarantees a complete return to its original state.

IN Linux systems a similar image can be made using the program dd, and for Windows there is a wonderful free, open source source code utility

Launch Win32 Disk Imager as Device select your flash drive, and in the field Image File write down the path where you want to save the image:

When ready, click Read.

If you need to restore the operating system to a flash card, then similarly select the image that you want to write to the flash drive and click Write.

Conclusion

This instruction showed in detail how to install Kali Linux on a flash drive, described possible problems and ways to solve them. In fact, you can install it this way any Linux on USB card memory. This will show you how to create a Kali Linux USB memory stick with persistent(permanent storage).

If you need to view files located on a flash drive from the main Windows systems, then refer to the instructions "".

Original: "Ubuntu Hacks: Chapter 1 - Getting Started"
Authors: Kyle Rankin, Jonathan Oxer, Bill Childers
Publication date: June 2006
Translation: N. Romodanov
Translation date: July 2010

You can install Ubuntu system, load it and fully operate it from a FireWire, USB, or other external drive, but this requires some special setting. Below we will describe the process of such setup from beginning to end.

In the process of writing this book, we realized that the main disadvantage of using a laptop as a main computer: it is much more difficult to replace hard drives when testing systems. We needed to configure the Ubuntu system so that we could test various tricks and specific system settings, but if possible, we would not want to reallocate the main partitions hard drive laptop and reinstall the system. We decided to install the Ubuntu system on external media and run it from there; this way, the regular system remains untouched, but we can start the Ubuntu system whenever we need it.

Unfortunately, this installation option will not automatically work without some configuration due to several reasons:

  • By default, the initrd (initial ram disk) file used by Ubuntu does not contain the drivers required to boot from an external device. Your BIOS will detect your device without issue (provided it supports booting from removable drives), but once the kernel is loaded, Linux will not be able to detect and mount the drive to continue the boot process.
  • Even if there are appropriate drivers in the initrd, the kernel will take a few seconds to load those modules and detect the removable disk before it tries to use them. During this time, the system will most likely try to boot and will not be able to find the removable disk, since its configuration will not be completed by this time.
  • The Ubuntu installer is very useful in that it tries to detect other operating systems that you may have installed on the system, and for each OS it adds an entry to the GRUB bootloader. Unfortunately, this means that each OS must reside on the internal hard drive, which is the first drive listed in the BIOS, while the removable drive will be the second (or third or fourth if you have other drives in the system). When the BIOS boots from a removable drive, it will be configured as the first drive in the system, which will cause problems in GRUB.

In this section, we'll look at how to solve each of these problems so that you can install Ubuntu on a removable drive and boot from it.

Setting up disk partitions

The first step is to start the Ubuntu installation process exactly the same as with any other installation option, so follow everything you read about in the "Installing Ubuntu" section [Tip #5] until you reach the stage of repartitioning the disk to sections. When Ubuntu goes to disk partitioning, note that the default will probably be one of the system's internal IDE or SCSI drives. If your system uses an IDE device, you can select an external drive by specifying a SCSI drive detected by the system. The drive specific string will probably be "SCSI (0,0,0) (sda)". If you already have a SCSI drive in your system, then finding the USB drive will be a little more difficult, but most likely it will be the last SCSI drive listed in the system.

Warning

You must be absolutely sure of what you have chosen at this stage. required disk, because Ubuntu will format and repartition the drive you select and delete any data that might be on it. If you don't know which drive to choose, boot from using Ubuntu Live CD and check the device names ( sda, sdb etc.) assigned to various drives on your system.

Installing GRUB

Once you select the appropriate device to format, continue with the Ubuntu installation process until you reach the stage of setting up the GRUB bootloader. Here you will be asked if you want to load GRUB onto your internal hard drive in the master boot MBR entry. You should not do this as it will overwrite the bootloader that is being used on the system. Instead, answer No and in the next window that appears, specify /dev/sda (or whatever Linux device name is assigned to the removable drive) so that you can install GRUB directly to the removable drive.

Using chroot

Then we continue the Ubuntu installation process until you are prompted to select Continue and reboot the system. Before you reboot, you will need to make a few settings on the system. The Ubuntu installer actually allows you to log into a main console, which you can use to run some limited commands on the system. Press Alt-F2 to navigate to that console and then press Enter to activate it.

Now you need to prepare the removable drive, so you can use the chroot command and change some files. In fact, the removable disk will be mounted in the /target directory, and the first step is to mount a special file system /proc on this device:

# mount -t proc /target/proc

You can now use the chroot command to turn the /target directory into a functioning system partition. This way you can run commands as if you had booted from this disk:

#chroot/target

Setting up initrd

Once the command is executed chroot, the first thing you need to do is add those Linux modules that will make your removable drive accessible to initrd. The /etc/mkinitramfs/modules file is where you specify additional modules to be added to the initrd, so use a console text editor of your choice and edit this file. If you don't have a favorite console text editor, just use the editor vim(if you are unfamiliar with vim, then look in the "Editing Configuration Files" section [Tip #74] for examples of use vim):

# vim /etc/mkinitramfs/modules

Once this file is open, go to the very end of the file, add the following few lines, then save your changes and close the file:

Ehci-hcd usb-storage scsi_mod sd_mod

Clue

If your removable device is connected via an IEEE1394 connector, then also add the following line:

Ieee1394ohci1394sbp2

and for other devices - just add to this file the modules that are needed for these devices.

Once the modules are configured correctly, the next step is to configure the initrd daemon to wait a few seconds before continuing to load. This gives Linux time to detect and configure the removable drive. Open in text editor file /etc/mkinitramfs/initramfs.conf:

# vim /etc/mkinitramfs/initramfs.conf

To force Linux to wait a few seconds before completing the boot process, now add a new parameter to the very beginning of the file

In our experience, ten seconds is enough to boot Linux from USB drive, but you can change this value to a larger or smaller value if necessary. Save your changes and close the file.

Now you can use a special tool mkinitramfs recreate the file again initrd, in which new settings will already be added:

# mkinitramfs -o /boot/initrd.img-2.6.15-16-386 /lib/modules/2.6.15-16-386

Change the initrd.img and /lib/modules paths to match the kernel version used on your installation CD.

Changing the GRUB setting

The last step is to change some settings in the GRUB configuration file. Ubuntu installer configures external device(or the second drive listed in the BIOS) as device hd1, but you need the external drive to be device hd0 since that will be the first device system device in the BIOS when booting from it. In a text editor, open the GRUB menu.lst file:

# vim /boot/grub/menu.lst

and find the lines that concern the GRUB root device. They will look something like this:

## default grub root device ## e.g. groot=(hd0,0) # groot=(hd1,0)

Change the last line to point to the hd0 device:

## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,0)

Title Ubuntu, kernel 2.6.15-16-386 root (hd1.0) kernel /boot/vmlinuz-2.6.15-16-386 root=/dev/sda1 ro quiet splash initrd /boot/initrd.img-2.6.15 -16-386 boot title Ubuntu, kernel 2.6.15-16-386 (recovery mode) root (hd1,0) kernel /boot/vmlinuz-2.6.15-16-386 root=/dev/sda1 ro single initrd /boot /initrd.img-2.6.15-16-386 boot title Ubuntu, memtest86+ root (hd1,0) kernel /boot/memtest86+.bin boot

Title Ubuntu, kernel 2.6.15-16-386 root (hd0,0) kernel /boot/vmlinuz-2.6.15-16-386 root=/dev/sda1 ro quiet splash initrd /boot/initrd.img-2.6.15 -16-386 boot title Ubuntu, kernel 2.6.15-16-386 (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.15-16-386 root=/dev/sda1 ro single initrd /boot /initrd.img-2.6.15-16-386 boot title Ubuntu, memtest86+ root (hd0,0) kernel /boot/memtest86+.bin boot

If Ubuntu has detected and created a configuration for other OSes and you want to take advantage of this as well, simply make the same changes to the configuration parameter for each OS root- just replace hd0 with hd1 . Then save your changes and close the file.

You can now exit the chroot command mode, so type exit at the console and then press Alt-F1 to return to the main Ubuntu installation console. You can now select the Continue option to reboot the machine and start the installed system.

Clue

Keep in mind that most computers cannot be set to boot from a removable drive by default if they have a CD-ROM or other hard drive. Some BIOSes have the ability to set a setting so that when you press a special key during boot (such as F12), you can choose which device to boot from. In other BIOSes, you may need to press one of the Esc, F2, or Del keys to enter the BIOS and configure the boot order of devices.

Initial data or what I had to start the installation:

  1. The actual Ubuntu distribution is ubuntu-11.04-dvd-i386.iso
  2. Netbook - Acer AO BGK-531h
  3. External HDD - Transcend Classic 320Gb

Actually what I wanted to do:

Install Ubuntu on external HDD, and when connecting the HDD to any computer and setting it to BIOS-e boot from this HDD, Ubuntu would boot. And if you boot the computer without connecting this HDD, the OS installed on this computer would load.

The problem that I encountered and essentially which I am circumventing in this article:

During a normal installation (you connect an external HDD to your computer, boot through the Ubuntu boot distribution and install), the MBR (main boot record) of the computer, Ubuntu installs its GRUB and then booting the computer without an inserted external HDD is not possible. I do not rule out that there are possibilities to circumvent this phenomenon, but at the moment I don’t know him, that’s why I was looking for other workarounds.

So let's get started:

After googling and reading numerous forums, I realized that to install without overwriting the MBR on a computer, you can a) disconnect the computer’s hard drives, or b) install through a virtual machine. I decided to make do with software methods, and I didn’t want to turn it off; during installation I worked quietly and surfed the Internet. Program to create virtual system I chose VirtualBox 4.1.0, although in principle this segment is not very saturated, not even saturated at all, and it didn’t take me long to choose.

1. Install this program and launch it.

2. Create a virtual machine, with the OS type and version, it’s probably better to choose Linux and Ubuntu, respectively. Why? As far as I understand, then the keyboard and mouse work better in the window of this VM. Although, I could be wrong:

3. Because I had a netbook and it doesn't have dvd drive, I have 8GB flash drives to create bootable flash drive I also didn’t have it at hand, I previously installed Alcohol 52% and created a virtual drive in it to load the Ubuntu installation image. Fortunately, the VM accepts it as a regular drive and easily launches the installation from it. Again, here we can say that I wanted to use completely software methods... Well, I didn’t want to look for a flash drive or an external drive + a DVD...

4. We start the virtual machine, at the first start it asks which host drive to use, select the drive that Alcohol 52% created and into which we have already mounted the ubuntu-11.04-dvd-i386.iso image. ii.. oops! The program installation window appears:

I won’t talk about the intricacies of installation, the only thing I’ll note are some points:

  • When I first started the installation, when I got to selecting the hard drive where Ubuntu would be installed, I only had 1 drive there, the one that the VM launched. That is, the VM did not see the connected USB HDD. After looking through the settings, I found in devices-devices USB connection external HDD and checked the box, only after that it became possible to select an external HDD when choosing the location where the system will be installed.

  • It is better to install Ubuntu in text mode. The usual installation, although in graphical mode, somehow I didn’t like it.
  • And yet, a netbook is very unsuitable for running a VM. Everything is done slowly and for a long time... there is not enough power, so I did not wait and repeated the entire procedure on a normal computer.

As a result, we have an external HDD with Ubuntu OS, which can be connected to any computer, boot and work, while all data will be saved.

Linux can be useful to you for many reasons. For example, your old computer can't update to new ones Windows versions or macOS, or you need Linux-specific applications, or you're just curious to try something new. Or maybe you just bought new computer without an operating system and want to save money by choosing free Linux.

Installing Linux is easy. Of course, there are distributions like Arch, which are quite difficult to install for a beginner. But most modern distributions are very easy to install. Perhaps even simpler and faster than Windows.

Before installing Linux on your main computer, make a copy of your important data. When working with partitions on your hard drive, you may accidentally erase something important. Of course, if you follow the instructions and carefully read what you are doing, then nothing unexpected will happen. But it’s a useful thing in any case.

You can install Linux on computers running Windows control and macOS or to an empty hard drive. You can choose Linux as your main system or use it in parallel with your old system.

1. Download Linux distribution

First of all, you need to choose a Linux distribution. The DistroWatch.com rating will help you decide.

Then you need to download the selected distribution. This is easy to do: open the website of the desired distribution, find the downloads section and select the one that suits the bit capacity of your processor.

As a rule, Linux distributions The official websites offer two ways to download. The first method is a normal download. The second is via P2P using a torrent client. The second method is naturally faster. So choose it if you want to save time.

When the distribution kit in ISO format is downloaded, you need to burn it to a CD or a regular USB flash drive.

You can burn to CD standard means system: "Burn Disk Image" Windows or "Disk Utility" macOS. Just click on the downloaded image right click mouse and select the appropriate item in the menu.

To burn ISO to a flash drive you will need special utilities. For Windows is better select Rufus, and for macOS - UNetbootin. These programs have a very simple interface, it is quite difficult to get confused in them.

3. Prepare the disk partition

This step should be followed if you want to keep the system installed on you and use Linux at the same time as it. If you decide to switch your computer completely to Linux or are installing the OS on an empty hard drive, skip this paragraph.

Windows

Open Windows Disk Management. Select the drive or partition from which you plan to trim some space for Linux installations. For most distributions, 10 GB is more than enough. But if you plan to install a lot of apps, get more. Right-click on the partition and select Shrink Volume. Enter the size and click OK.

The process can take quite a long time, so be patient.

When Disk Management finishes resizing your partitions, there will be empty unallocated space on the disk, marked in black. We will install Linux there.

Later, if you don’t need Linux, you can delete the partitions with it and give the free space back to Windows using the same “Disk Management Tools”.

macOS

You can allocate space for installing Linux using " Disk Utility» macOS. Select your drive and click on the “+” icon to create a partition for Linux. Creating a new partition may take some time.

4. Prepare the bootloader

Windows

This item applies only to new computers running pre-installed Windows 10, 8.1 or 8. On such computers, use UEFI bootloader, which will not allow you to boot into any system other than Windows.

To fix this, go to BIOS settings your computer and disable the Secure Boot option. Then reboot. Done, you can now download and install other systems next to your Windows.

macOS

Unlike most computers, a Mac requires a couple of additional steps to install Linux on dual boot with macOS.

First of all, disable SIP. Restart your Mac and press Cmd + R. The Recovery menu. Select “Terminal” in it and enter csrutil disable .

Reboot your Mac again. SIP is disabled.

Manual

Suitable if you want to set the sizes for your partitions yourself or, for example, create a separate partition for your files. To do this, select “Other option” and click “Continue”.

Linux will display what partitions you have on your computer. You can delete them, format them, or, conversely, leave the sections with the information you want to save intact.

To install Linux instead of your system, select a partition with installed system and delete it with the “–” button. Then create new partitions in the free space.

  • Root partition for system files Linux. Select Ext4 file system and mount point /.
  • A swap partition, or swap partition, is useful if you don't have enough RAM, but then fast SSD drive. In the list of file systems, select "Swap Partition".
  • Home partition where your files will be stored. Select the Ext4 file system and the /home mount point.

Click Continue and confirm the changes. The installer will erase the partitions you selected and create new ones in the free space.

How to install Linux next to your current system

Install Linux is nearby with your system there are two ways.

Auto

Most Linux installers will immediately detect the systems you have installed. If you haven't created a separate disk space for Linux, you can try selecting the "Install next to Windows" option. The installer will create the required sections, and you don't have to do anything manually.

Manual

If you want to determine for yourself how much space to allocate to the system, and followed the instructions in step 3, click “Other option” and click “Continue”. You will see your disk partitions and empty space that we have prepared for Linux. Create a root partition there (mount point /) as described above. A home partition is not necessary in this case: you will be able to copy and modify files on your main system.

Click Continue. The installer will leave your files in place. It will simply create new partitions on free space. You will be able to choose which system you want to boot at startup.

8. Complete the Linux installation

You will then be asked to introduce yourself. Enter your name and create a password. Don't forget your password, as you will constantly need it to perform tasks on behalf of everyone. If you wish, you can encrypt your home folder.

Then just wait. When the installation is complete, you will be prompted to pull out installation disk and reboot. Don't forget to disable booting from external drives in the BIOS if you enabled it.

What to do after installation

When you reboot and your Linux desktop appears in front of you, you can do everything you can do in Windows and macOS: surf the Internet, edit documents and listen to music. Don’t forget to update and look at the “App Store” (or its equivalent, depending on the distribution) to additionally install the applications you need.

Try Linux and you will see that in everyday life it is no more complicated than Windows or macOS.

Share