Installing

From noop linux
Jump to: navigation, search

Example 1 - MBR, simple partitions, grub boot manager

In the example, the main hard disk will be /dev/sda, and we're booting off noop-core live image.

1) Partitioning

   fdisk /dev/sda
   
   New Partition: n
   Partition number: <enter>
   First sector: <enter>
   Last sector: <enter>
   Hex code or GUID: <enter>
   Write changes & quit - w

2) Formatting

   mkfs.ext4 /dev/sda1

3) Mounting

   mkdir hdd
   mount /dev/sda1 hdd

4) Installing

   ./instlr /root/hdd

5) MBR Boot loader

   grub-install /dev/sda

6) Edit /boot/grub/grub.cfg

   Make sure both root variables are set correctly, the defaults use (hd0,1) and /dev/sda1.
   Remove initrd line, as we're not using one in this setup.

7) Edit /etc/fstab to contain only one line

  /dev/sda1 / ext4 defaults 1 1

8) Exit chroot, remove media & reboot.

   exit
   systemctl reboot

Example 2 - UEFI, encrypted (dm-crypt) root, systemd-boot (gummiboot) manager

In the example, the main hard disk will be /dev/sda, and we're booting off noop-core live image.

1) Partitioning

   gdisk /dev/sda
   New partition: n
   Partition number: <enter>
   First sector: <enter>
   Last sector: +50M
   Hex code or GUID: ef00
   New Partition: n
   Partition number: <enter>
   First sector: <enter>
   Last sector: <enter>
   Hex code or GUID: <enter>
   Write changes & quit - w

2) Format partitions.

   cryptsetup -y -v luksFormat /dev/sda2
   cryptsetup open /dev/sda2 cryptroot
   mkfs.ext4 /dev/mapper/cryptroot
   mkfs.vfat /dev/sda1


3) Mount drives

   mkdir -p /root/hdd
   mount /dev/mapper/cryptroot /root/hdd
   mkdir -p /root/hdd/boot
   mount /dev/sda1 /root/hdd/boot

4) Install

   ./instlr /root/hdd

!NOTE! Still inside choot

5) Set up boot loader (systemd-boot)

Note: If it complains about a boot variable entry, don't worry about it.

   bootctl install
   

6) Generate an initramfs

   pkgr --mkinitramfs

7) Edit the boot config file to use inird and set options for dm-crypt

   Edit /boot/loader/loader.conf:
   Change default line to:
   default noop*
   Create /boot/loader/entries/noop.conf:
   title noop Linux
   linux /vmlinuz
   initrd /noop-initramfs.img
   options cryptdevice=/dev/sda2:cryptroot root=/dev/mapper/cryptroot init=/usr/lib/systemd/systemd

8) Edit /etc/fstab to look like:

   /dev/mapper/cryptroot / ext4 defaults 1 1

9) Exit chroot, remove/unmount ISO & reboot

   exit
   systemctl reboot