= Linux Install !
Apostolos rootApostolos@swarmlab.io
// Metadata:
:description: Intro and Install
:keywords: ubuntu install dual
:data-uri:
:toc: right
:toc-title: Πίνακας περιεχομένων
:toclevels: 4
:source-highlighter: highlight
:icons: font
:sectnums: 



{empty} +



.The first thing you need to understand is that Linux is very different from Windows. 
****
- The filesystem is different
- installing software is different 
- security is different
- installion is different
- etc
****

== Intro

[NOTE]
====
You must be open to learning new techniques and habits.

Dual-boot requires good backups from the start. *You never know when a Windows update will wipe all your partitions :-)*

Reinstalling Ubuntu is very easy - About windows I wouldn't be that sure...   :-)
====




== Prepare installation


=== Download Ubuntu ISO image.

Download the Ubuntu https://ubuntu.com/download/desktop[ISO image^]


=== Make a bootable Ubuntu USB drive

Download  https://www.balena.io/etcher[etcher^] 1st

Once you have downloaded and launched Etcher, 

- click Select image, and point it to the Ubuntu ISO you downloaded 
- click Select drive to choose your flash drive, and click Flash! 
- start the process of turning a flash drive into an Ubuntu installer. 


=== Backup Windows 10

https://support.microsoft.com/en-us/windows/backup-and-restore-in-windows-10-352091d2-bb9d-3ea3-ed18-52ef2b88cbef[Backup and Restore in Windows 10^]

[WARNING]
====
Backup Windows 10
====


== Install

=== Auto Install Ubuntu

This is the part that makes *installation alongside Windows 10* different from a normal installation. 

The Ubuntu installer automatically detects that we have a pre-existing Windows 10 installation on our system, 

TIP: Select "Install Ubuntu alongside Windows 10" option and click on continue.

Thats all!



 Is the "Install Ubuntu alongside Windows 10" option missing?


.Please note that in the following circumstances the Ubuntu 20.04 installation option "Install Ubuntu alongside Windows 10" may be missing, 
[NOTE]
====
- if your Windows 10 installation "is not correctly shutdown" 
- is hibernating, 
- your disk has corrupted partition which needs repair, 
- your disk has not enough free disk space left for creating/resizing partitions
- uses Dynamic Disk or the file system contains uncontrollable file fragmentation 
====


=== Manual Install Ubuntu

==== Prepare Windows Machine for Dual-Boot

* Log in to your Windows machine with an administrative account and right-click on the Start Menu -> Command Prompt (Admin)
*  in CLI, type diskmgmt.msc
** Right-click on partition and select Shrink Volume in order to resize the partition.
** On Shrink enter a value on space to shrink in MB (use at least *20000 MB*)

TIP: Once space has been resized you will see a new unallocated space on the hard drive. Leave it as default and *reboot the computer.*


==== Start Ubuntu installation 

.BIOS/UEFI
****
Place the USB stick in the drive, reboot the machine and instruct the BIOS/UEFI to boot-up from the DVD/USB by pressing a special function key (usually F12, F10 or F2 depending on the vendor specifications).
****


 After booting into the Ubuntu installation, you'll be presented with the prompts.

* select "Install Ubuntu." 
* Select your keyboard layout 
* The "Updates and other software" options are optional.
* Installation Type
** "Installation alongside Windows 10" See Above
** "Somethings else" Continue

.Somethings else
[NOTE]
====

Select the free space (the shrinking space from Windows created earlier) and hit on the + icon below. 

On partition settings use the following configurations:

[source,bash]
----
  Size: >= 20000 MB
  Type for the new partition : Primary
  Location for the new partition : Beginning
  Use as : EXT4 journaling file system
  Mount point : /
----
====


* When finished, hit the Install Now button and start the installation process.

TIP: On pop-up about swap space. Ignore the alert by pressing on the Continue button.

* On the next screen adjust your location by selecting a city from the map.

* After the installation process reaches its end: *Restart*


Ready!

image:./grub.png[alt="Boot Menou"] + 




