Skip to content

Latest commit

 

History

History
151 lines (124 loc) · 4.23 KB

dualboot.asciidoc

File metadata and controls

151 lines (124 loc) · 4.23 KB

Thinkpad T480s Setup

1. Dualboot (Windows 10 + Arch) with disk encryption

1.1. Windows Installation

As it is usually recommended, we start with installing Windows. The Installation can be done as usual, however Windows will create an EFI partition of the size 99MB automatically.

To change that:

  • Proceed to the paritioning step

  • Create the Windows partition (new->set size->apply)

  • Press Shift+F10 to open a command prompt. If you loose the window, you can get it back with Shift+Tab.

  • Enter diskpart

  • Enter list disk. The output should look something like this:

      Disk ###  Status      Size    Free    Dyn   Gpt
      --------  ----------  ------  ------  ----  ---
    * Disk 0    Online      476 GB  476 GB         * (1)
      Disk 1    Online       14 GB   14 GB           (2)
      Disk 2    No Media      0  B    0  B           (3)
    1. My primary disk.

    2. The USB stick I use for installing Windows

    3. Something else

  • Now select your primary disk with select disk 0 (if 0 is your primary disk)

  • Enter list partition. The output should look like this:

      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    Recovery           499 MB  1024 KB
      Partition 2    System              99 MB   500 MB
      Partition 3    Reserved            16 MB   599 MB
      Partition 4    Primary            145 GB   615 MB
  • Now delete partition 4 by entering select partition 4 and then delete partition override

  • Repeat this step for partition 3 and 2

  • Create a bigger EFI-partition by entering create partition efi size=1024 (with the size 1024MB)

  • Re-Create the Reserved partition with create partition msr size=16

  • Re-Create your primary partition with create partition primary size=148480 (for 145GB)

  • Exit diskpart with exit

  • Close the command prompt and continue partitioning as usual

  • Finish the installation process

1.2. Enable Bitlocker

  • Go to Control Panel -> Bitlocker Drive Encryption -> Turn on BitLocker

1.3. Arch Installation

  • Boot from archiso CD/USB

  • Set the keyboard layout with loadkeys de-latin1 (for the german layout)

  • Check internet connection with ping archlinux.org

  • Verify EFI with ls /sys/firmware/efi/efivars

  • Set the time with timedatectl set-ntp true and timedatectl set-timezone Europe/Berlin

1.3.1. Partitioning

This is the most important step. I will be

Encryption
  • gdisk /dev/nvme0n1

  • n

  • Type 8309 for Linux LUKS

  • w

  • cryptsetup luksFormat --type luks2 /dev/nvme0n1p7

  • Enter passphrase

  • cryptsetup open /dev/nvme0n1p7 cryptroot

Volumes
  • pvcreate /dev/mapper/cryptroot

  • vgcreate cryptLVM /dev/mapper/cryptroot

  • lvcreate -L 16G cryptLVM -n swap

  • lvcreate -L 70G cryptLVM -n root

  • lvcreate -l 100%FREE cryptLVM -n home

Format Volumes
  • mkfs.ext4 /dev/cryptLVM/root

  • mkfs.ext4 /dev/cryptLVM/home

  • mkswap /dev/cryptLVM/swap

Mount Volumes
  • `mount /dev/cryptLVM/root /mnt

  • mkdir -p /mnt/home

  • mount /dev/cryptLVM/home /mnt/home

  • swapon /dev/cryptLVM/swap

ESP Partition
  • mkdir -p /mnt/boot

  • mount /dev/nvme0n1p2 /mnt/boot (windows efi partition)

Installation
  • pacstrap /mnt base base-devel grub intel-ucode neovim

  • genfstab -U /mnt >> /mnt/etc/fstab

  • arch-chroot /mnt

  • ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime

  • hwclock --systohc

  • uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen

  • locale-gen

  • echo "LANG=en_US.UTF-8" >> /etc/locale.conf

  • echo "KEYMAP=de-latin1" >> /etc/vconsole.conf

  • echo hostname >> /etc/hostname

  • set /etc/hosts:

    127.0.0.1	localhost
    ::1		localhost
    127.0.1.1	myhostname.localdomain	myhostname
  • pacman -Syu networkmanager