The steps I took to dual boot Arch Linux alongside the preinstalled Windows 10 that came with my new Lenovo Ideapad. I used Ubuntu exclusively for the last 6 years so I'm Window's illiterate. I don't know a whole lot about the inner workings of Linux either.
Prepare the preinstalled Windows to share the system.
- Boot into Windows
- Press Win key and 'R' to start the Run dialog
- In the Run dialog type "msinfo32" and press Enter
- In the System Information windows, select System Summary on the left and check the value of BIOS mode item on the right.
- Make sure the value is UEFI, which means Windows boots in UEFI/GPT mode
- Open Settings (The gear icon in the start menu)
- Click "Updates & Security"
- In the "Recovery" menu, click "Restart now" under the "Advanced startup" header
- After restart, choose the "Troubleshoot" option.
- Choose "Advanced Options"
- Choose "UEFI Firmware Settings"
- Press the restart button to load the UEFI firmware
- In the Security settings find and disable Secure Boot
- In the Boot settings also find and disable Fast Boot
- Open Control Panel (Press Windows key, Type "Control Panel" and press enter)
- In the "View by" menu, choose "Small Icons" and click on "Power Options".
- Open "Choose what power buttons do" on the left side menu.
- Click "Change settings that are currently unavailable"
- Uncheck "Turn on Fast Startup" and save changes.
- Press Windows Key + R and type diskmgmt.msc - hit enter
- Right click the C drive and choose "Shrink Volume"
- Enter the amount of space to shrink the partition (I shrunk mine by 200000mb - 200 gigs)
- Click "Shrink"
- Choose a mirror from www.archlinux.org/download - I used the American pair.com mirror because it's the first reputable domain I recognised.
- Download the .iso file.
- Download Rufus from https://rufus.akeo.ie/
- Plug in a new USB stick and open Rufus
- Select the USB drive and the downloaded Linux iso.
- Choose the GPT partition scheme, FAT32 file system
- Press start
We're ready to boot and install Arch.
- Plug in the USB
- Hold down the shift key while clicking Restart
- Choose "Troubleshoot" then "Advanced Options" then "UEFI Firmware Settings" then restart.
- In the Boot menu, find your bootable USB and move it up above the Windows boot manager so it will boot the USB first.
- Save and exit
- Type
loadkeys us
at the command line and press enter - Type
locale-gen
at the command line and press enter
- At the command line type
rfkill unblock wifi
and press enter - Type
iw dev
and press enter. It will tell you the name of the Wifi interface. - Type
wifi-menu <wifi_interface_name>
(using your actual interface name) and press enter. - A UI will show allowing you to choose a network and log into it.
- After logging in,
ping google.com
to verify the internets work. After a few packets are sent, CTRL+C to stop pinging - if it says no packets were lost then we're good.
- First type
free -m
, hit enter. Take note of the amount of total memory available. - Type
gdisk /dev/sda
and hit enter to start the GPT partitioning program - Create SWAP partition
- At the prompt, type
n
, press enter to create a new partition - It will prompt for a partition number. Just hit enter to use the default.
- It asks where to start the first sector. Press enter to accept the default which is automatically the start of unallocated space.
- It asks for the last sector. Type
+12GB
(I have 12 gigs of memory - if you have more or less you should adjust accordingly) and press enter. - If it says anything other than "Linux Filesystem" type
8200
at the next prompt. Hit enter.
- At the prompt, type
- Create Root partition
- At the prompt, type
n
, press enter to create a new partition - It will prompt for a partition number. Just hit enter to use the default.
- It asks where to start the first sector. Press enter to accept the default which is automatically the start of unallocated space.
- It asks for the last sector. Press Enter to accept the default and use all of remaining unallocated space.
- If it says anything other than "Linux Filesystem" type
8300
at the next prompt. Hit enter.
- At the prompt, type
- At the prompt, type
W
, press enter to write changes to the drive. When prompted, typeY
and press enter to confirm.
- Type
gdisk -l /dev/sda
, press enter and take note of the partition number of the Swap part. - Type
mkswap -L "Linux Swap" /dev/sda7
(My swap partition was number 7 - if yours is 5 use /dev/sda5 instead). Hit enter. - Type
swapon /dev/sda7
(again, using the apprpriate swap partition number). Hit enter. - Verify status of swap space by typing
free -m
and press enter. If the last line starts with "Swap:" we're good.
- Type
gdisk -l /dev/sda
, press enter and take note of the partition number of the Root part. - Type
mkfs.ext4 -L /dev/sda8
(My root partition was number 7 - if yours is 6 use /dev/sda6 instead). Hit enter. - Type
mount /dev/sda8 /mnt
(again, using the apprpriate swap partition number). Hit enter.
- Type
pacstrap /mnt base
, hit enter.
- Type
gdisk -l /dev/sda
, press enter and take note of the partition number of the EFI part. - Type
mount /dev/sda1 /mnt/boot/efi
(My efi partition was number 1 - if yours is 2 use /dev/sda2 instead). Hit enter.
- Type
genfstab -U /mnt >> /mnt/etc/fstab
. Hit enter. - Type
cat /mnt/etc/fstab
, press enter, to verify the file was created correctly. - Change root into the new installation: type
arch-chroot /mnt
and press enter.
- Type
cd /usr/share/zoneinfo && ls
press enter. Take note of the appropriate region and use it as follows... - Type
cd <region> && ls
(replacing<region>
with the most appropriate region.) press enter. Take note of the most appropraite city. - Type
ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime
(replacing<region>
and<city>
with the most appropriate region and city.) - Type
hwclock --systohc
. Hit enter.
- Create the file
/etc/hostname
and write your hostnme in it with nano or vim - Create the file
etc/hosts
and populate it like this (replacingmyhostname
with whatever you put in your hostname file.)
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
- Type
passwd
and press enter - Enter a new root password and press enter. verify it and press enter.
- Type
mkinitcpio -p linux
. Hit enter.
- Type
pacman -Syu grub efibootmgr
and hit enter. - Type
pacman -Syu efibootmgr
and hit enter. - Type
grub-mkconfig -o /boot/grub/grub.cfg
. Hit enter. - Type
grub-install /dev/sda
. Hit enter. - Verify the install... Type
ls -l /boot/efi/EFI/arch/
. Hit Enter. If you see a file called grubx64.efi then all is well.
- Type
useradd -s /bin/bash -m username
(replace "username" with the new user's name). Hit enter. - Type
passwd username
(replace "username" with the new user's name). Hit enter. - Enter and verify the password.
- Type
pacman -Syu gnome-desktop
. Hit enter. - Type
pacman -Syu gdm
. Hit enter. - Type
systemctl enable gdm
. Hit enter. - Type
pacman -Syu xterm
. Hit enter. - Type
pacman -Syu iw
. Hit enter. - Type
pacman -Syu dialog
. Hit enter. - Type
pacman -Syu vim
. Hit enter. - Type
pacman -Syu wpa_supplicant
. Hit enter. - Type
pacman -Syu os-prober
. Hit enter. - Type
grub-mkconfig -o /boot/grub/grub.cfg
. Hit enter.
- Remove USB
- Type
exit
. Hit enter. - Type
umount -R /mnt
. Hit enter. - Type
reboot
. Hit enter. - After a moment it will load back into Arch, this time with a desktop GUI.
I never thought, this process could be simplified this much 😃 Good work man !!!