nuke outdated distro-specific FDE guides
i do not intend to re-add them. these guides should be on the wiki pages of each project website e.g. parabola wiki it's out of scope for libreboot. the debian guide will remain, for now, but as soon as it becomes broken or no longer fit for purpose, it will simply be deleted. ideally, the pages on docs/gnulinux/ should not be distro-specific
This commit is contained in:
parent
8844c201ef
commit
48b04d0993
|
@ -1,515 +0,0 @@
|
|||
---
|
||||
title: Configuring Parabola (Post-Install)
|
||||
x-toc-enable: true
|
||||
...
|
||||
|
||||
TODO: this guide is horribly outdated. Update it! This guide was last updated
|
||||
in 2017.
|
||||
|
||||
This is the guide for setting up Parabola GNU+Linux-Libre, after completing
|
||||
the installation steps outlined in [Installing Parabola or Arch GNU+Linux-Libre with Full-Disk Encryption (including /boot)](encrypted_parabola.md).
|
||||
It will cover installing and configuring a graphical desktop environment,
|
||||
as well as some applications that make the system more user friendly.
|
||||
|
||||
For this example, we chose the *MATE Desktop Environment* as our graphical interface.
|
||||
|
||||
*This guide was valid on 2017-06-02. If you see any changes that should
|
||||
to be made at the present date, please get in touch with the Libreboot
|
||||
project (or [make those changes yourself](https://libreboot.org/git.html#editing-the-website-and-documentation-wiki-style))!*
|
||||
|
||||
While Parabola can seem daunting at first glance (especially for new GNU+Linux users),
|
||||
with a simple guide, it can provide all the same usability
|
||||
as any Debian-based GNU+Linux distribution (e.g., Trisquel, Debian, and Devuan),
|
||||
without hiding any details from the user.
|
||||
|
||||
Paradoxically, as you get more advanced, Parabola can actually become
|
||||
*easier to use*, when you want to set up your system in a special way,
|
||||
compared to what most distributions provide. You will find over time
|
||||
that other distributions tend to *get in your way*.
|
||||
|
||||
A lot of the steps in this guide will refer to ArchWiki. Arch is
|
||||
the upstream distribution that Parabola uses. Most of this guide will
|
||||
also tell you to read wiki articles, other pages, manuals, and so on. In
|
||||
general, it tries to cherry-pick the most useful information, but
|
||||
nonetheless, you are encouraged to learn as much as possible.
|
||||
|
||||
**NOTE: It might take you a few days to fully install your system how you like,
|
||||
depending on how much you need to read. Patience is key, especially for new users.**
|
||||
|
||||
The ArchWiki will sometimes use bad language, such as calling the whole
|
||||
system Linux, using the term **open-source**/**closed-source**,
|
||||
and it will sometimes recommend the use of proprietary software.
|
||||
You need to be careful about this when reading anything on ArchWiki.
|
||||
|
||||
Some of these steps require internet access. To get initial access
|
||||
for setting up the system (I'll go into networking later),
|
||||
just connect your system to a router, via an ethernet cable,
|
||||
and run the following command:
|
||||
|
||||
systemctl start dhcpcd.service
|
||||
|
||||
You can stop it later (if needed), by using systemd's `stop` option:
|
||||
|
||||
systemctl stop dhcpcd.service
|
||||
|
||||
For most people, this should be enough, but if you don't have DHCP enabled
|
||||
on your network, then you should setup your network connection first:
|
||||
[Set Up Network Connection in Parabola](#network).
|
||||
|
||||
## Configure pacman
|
||||
`pacman` (*pac*kage *man*ager) is the name of the package management system
|
||||
in Arch, which Parabola (as a deblobbed, parallel effort) also uses.
|
||||
Like with `apt-get` on Trisquel, Debian, or Devuan, this can be used to
|
||||
add, remove, and update the software on your computer.
|
||||
|
||||
For more information related to `pacman`, review the following articles on the Arch Wiki:
|
||||
|
||||
* [Configuring pacman](https://wiki.parabolagnulinux.org/Installation_Guide#Configure_pacman)
|
||||
* [Using pacman](https://wiki.archlinux.org/index.php/Pacman)
|
||||
* [Additional Repositories](https://wiki.parabolagnulinux.org/Official_Repositories)
|
||||
|
||||
## Updating Parabola
|
||||
Parabola is kept up-to-date, using `pacman`. When you are updating Parabola,
|
||||
make sure to refresh the package list, *before* installing any new updates:
|
||||
|
||||
pacman -Syy
|
||||
|
||||
**NOTE: According to the Wiki,** `-Syy` **is better than** `-Sy` **, because it refreshes
|
||||
the package list (even if it appears to be up-to-date), which can be useful
|
||||
when switching to another mirror.**
|
||||
|
||||
Then, actually update the system:
|
||||
|
||||
pacman -Syu
|
||||
|
||||
**NOTE: Before installing packages with** `pacman -S`**, always update first,
|
||||
using the two commands above.**
|
||||
|
||||
Keep an eye out on the output, or read it in **/var/log/pacman.log**.
|
||||
Sometimes, `pacman` will show messages about maintenance steps that you
|
||||
will need to perform with certain files (typically configurations) after
|
||||
the update. Also, you should check both the [Parabola home page](https://www.parabola.nu/) and [Arch home page](https://www.archlinux.org/),
|
||||
to see if they mention any issues. If a new kernel is installed, you should also
|
||||
update to be able to use it (the currently running kernel will also be fine).
|
||||
|
||||
It's generally good enough to update Parabola once every week, or maybe twice.
|
||||
As a rolling release distribution, it's a never a good idea to leave your installation
|
||||
too outdated. This is simply because of the way the project works;
|
||||
old packages are deleted from the repositories quickly, once they are updated.
|
||||
A system that hasn't been updated for quite a while will mean potentially more
|
||||
reading of previous posts through the website, and more maintenance work.
|
||||
|
||||
Due to this, and the volatile nature of Parabola/Arch, you should only
|
||||
update when you have at least a couple hours of spare time, in case of
|
||||
issues that need to be resolved. You should never update, for example,
|
||||
if you need your system for an important event, like a presentation, or
|
||||
sending an email to an important person before an allocated deadline,
|
||||
and so on.
|
||||
|
||||
Relax! Packages are well-tested, when new updates are made to
|
||||
the repositories; separate 'testing' repositories exist for this exact
|
||||
reason. Despite what many people may tell you, Parabola is fairly
|
||||
stable and trouble-free, so long as you are aware of how to check for
|
||||
issues, and are willing to spend some time fixing issues, in the rare
|
||||
event that they do occur (this is why Arch/Parabola provide such extensive documenatation).
|
||||
|
||||
## Maintaining Parabola
|
||||
Parabola is a very simple distro, in the sense that you are in full
|
||||
control, and everything is made transparent to you. One consequence is
|
||||
that you also need to know what you are doing, and what you have done
|
||||
before. In general, keeping notes (such as what I have done with this
|
||||
page) can be very useful as a reference in the future (e.g, if you wanted to
|
||||
re-install it, or install the distro on another computer).
|
||||
|
||||
You should also read the ArchWiki article on [System Maintenance](https://wiki.archlinux.org/index.php/System_maintenance),
|
||||
before continuing. Also, read their article on [enhancing system stability](https://wiki.archlinux.org/index.php/Enhance_system_stability).
|
||||
This is important, so make sure to read them both!*
|
||||
|
||||
Install `smartmontools`; it can be used to check smart data. HDDs use
|
||||
non-free firmware inside; it's transparent to you, but the smart
|
||||
data comes from it. Therefore, don't rely on it too much), and then read
|
||||
the ArchWiki [article](https://wiki.archlinux.org/index.php/S.M.A.R.T.) on it, to learn how to use it:
|
||||
|
||||
pacman -S smartmontools
|
||||
|
||||
### Cleaning the Package Cache
|
||||
*This section provides a brief overview of how to manage the directory that stores
|
||||
a cache of all downloaded packages. For more information,
|
||||
check out the Arch Wiki guide for [Cleaning the Package Cache](https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache).*
|
||||
|
||||
Here's how to use `pacman`, to clean out all old packages that are cached:
|
||||
|
||||
pacman -Sc
|
||||
|
||||
The Wiki cautions that this should be used with care. For example, since
|
||||
older packages are deleted from the repository, if you encounter issues
|
||||
and want to revert back to an older package, then it's useful to have the
|
||||
caches available. Only do this ,if you are sure that you won't need it.
|
||||
|
||||
The Wiki also mentions this method for removing everything from the
|
||||
cache, including currently installed packages that are cached:
|
||||
|
||||
pacman -Scc
|
||||
|
||||
This is inadvisable, since it means re-downloading the package again, if
|
||||
you wanted to quickly re-install it. This should only be used when disk
|
||||
space is at a premium.
|
||||
|
||||
### pacman Command Equivalents
|
||||
If you are coming from another GNU+Linux distribution, you probably want to know
|
||||
the command equivalents for the various `apt-get`-related commands that you often use.
|
||||
For that information, refer to [Pacman/Rosetta](https://wiki.archlinux.org/index.php/Pacman/Rosetta),
|
||||
so named, because it serves as a Rosetta Stone to the esoteric pacman language.
|
||||
|
||||
## your-freedom
|
||||
`your-freedom` is a package specific to Parabola, and it is installed by
|
||||
default. What it does is conflict with packages from Arch that are known
|
||||
to be non-free (proprietary) software. When migrating from Arch (there
|
||||
is a guide on the Parabola wiki for migrating (i.e,. converting) an existing
|
||||
Arch system to a Parabola system), installing it will also
|
||||
fail, if these packages are installed, citing them as conflicts; the
|
||||
recommended solution is then to delete the offending packages, and
|
||||
continue installing `your-freedom`.
|
||||
|
||||
## Add a User
|
||||
This is based on the Arch Wiki guide to [Users and Groups](https://wiki.archlinux.org/index.php/Users_and_Groups).
|
||||
|
||||
It is important (for security reasons) to create and use a non-root
|
||||
(non-admin) user account for everyday use. The default **root** account
|
||||
is intended only for critical administrative work, since it has complete
|
||||
access to the entire operating system.
|
||||
|
||||
Read the entire document linked to above, and then continue.
|
||||
|
||||
Add your user with the `useradd` command (self explanatory):
|
||||
|
||||
useradd -m -G wheel -s /bin/bash *your_user_name*
|
||||
|
||||
Set a password, using `passwd`:
|
||||
|
||||
passwd *your_user_name*
|
||||
|
||||
Like with the installation of Parabola, use of the [*diceware method*](http://world.std.com/~reinhold/diceware.html) is recommended,
|
||||
for generating secure passphrases.
|
||||
|
||||
### Configure sudo
|
||||
Now that we have a normal user account, we'll want to configure `sudo`,
|
||||
so that user is able to run commands as **root** (e.g., installing software);
|
||||
this will be necessary to flash the ROM later on. Refer to ArchWiki's [sudo](https://wiki.archlinux.org/index.php/Sudo) documentation.
|
||||
|
||||
The first step is to install the `sudo` package:
|
||||
|
||||
pacman -S sudo
|
||||
|
||||
After installation, we must configure it. To do so, we must modify **/etc/sudoers**.
|
||||
This file must *always* be modified with the `visudo` command. `visudo` can be
|
||||
difficult for beginners to use, so we'll want to edit the file with `nano`,
|
||||
but the trick is that we just can't do this:
|
||||
|
||||
nano /etc/sudoers
|
||||
|
||||
Because, this will cause us to edit the file directly, which is not the way
|
||||
it was designed to be edited, and could lead to problems with the system.
|
||||
Instead, to temporarily allow us to use `nano` to edit the file,
|
||||
we need to type this into the terminal:
|
||||
|
||||
EDITOR=nano visudo
|
||||
|
||||
This will open the **/etc/sudoers** file in `nano`, and we can now safely make changes to it.
|
||||
|
||||
To give the user we created earlier to ability to use `sudo`, we need to navigate
|
||||
to the end of the file, and add this line on the end:
|
||||
|
||||
your_username ALL=(ALL) ALL
|
||||
|
||||
Obviously, type in the name of the user you created, instead of **your_username**.
|
||||
Save the file, and exit `nano`; your user now has the ability to use `sudo`.
|
||||
|
||||
## systemd
|
||||
`systemd` is the name of the program for managing services in Parabola;
|
||||
It is a good idea to become familiar with it. Read the Arch Wiki article on [systemd](https://wiki.archlinux.org/index.php/systemd),
|
||||
as well as their [Basic systemctl usage](https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage) article,
|
||||
to gain a full understanding. *This is very important! Make sure to read them.*
|
||||
|
||||
An example of a **service** could be a VPN (allowing you to connect to an outside network),
|
||||
an applet in the system tray that tells you the weather for your city,
|
||||
a sound manager (to make sure you can hear sound through speakers or headphones),
|
||||
or DHCP (which allows you to get an IP address, to connect to the internet).
|
||||
These are just a few examples; there are countless others.
|
||||
|
||||
`systemd` is a controversial init system; A [forum post](https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530)
|
||||
has an explanation behind the Arch development team's decision to use it.
|
||||
|
||||
The **manpage** should also help:
|
||||
|
||||
man systemd
|
||||
|
||||
The section on **unit types** is especially useful.
|
||||
|
||||
According to the wiki, `systemd's` journal keeps logs of a size up to 10% of the
|
||||
total size that your root partition takes up. On a 60GB root, this would mean 6GB.
|
||||
That's not exactly practical, and can have performance implications later,
|
||||
when the log gets too big. Based on instructions from the wiki,
|
||||
I will reduce the total size of the journal to 50MiB (that's what the wiki recommends).
|
||||
|
||||
Open **/etc/systemd/journald.conf**, and find this line:
|
||||
|
||||
#SystemMaxUse=
|
||||
|
||||
Change it to this:
|
||||
|
||||
SystemMaxUse=50M
|
||||
|
||||
Restart `journald`:
|
||||
|
||||
systemctl restart systemd-journald
|
||||
|
||||
The wiki recommends that if the journal gets too large, you can also
|
||||
simply delete (`rm -Rf`) everything inside **/var/log/journald**, but
|
||||
recommends backing it up. This shouldn't be necessary, since you
|
||||
already set the size limit above, and `systemd` will automatically start
|
||||
to delete older records, when the journal size reaches it's limit (according to systemd developers).
|
||||
|
||||
Finally, the wiki mentions **temporary files**, and the utility for
|
||||
managing them.
|
||||
|
||||
man systemd-tmpfiles
|
||||
|
||||
To delete the temporary files, you can use the `clean` option:
|
||||
|
||||
systemd-tmpfiles --clean
|
||||
|
||||
According to the **manpage**, this *"cleans all files and directories with
|
||||
an age parameter"*. According to ArchWiki, this reads information
|
||||
in **/etc/tmpfiles.d** and **/usr/lib/tmpfiles.d**, to know what actions to perform.
|
||||
Therefore, it is a good idea to read what's stored in these locations, to get a better understanding.
|
||||
|
||||
I looked in **/etc/tmpfiles.d/** and found that it was empty on my system.
|
||||
However, **/usr/lib/tmpfiles.d** contained some files. The first one was
|
||||
**etc.conf**, containing information and a reference to this **manpage**:
|
||||
|
||||
man tmpfiles.d
|
||||
|
||||
Read that **manpage**, and then continue studying all the files.
|
||||
|
||||
The `systemd` developers tell me that it isn't usually necessary
|
||||
to manually touch the `systemd-tmpfiles utility`, at all.
|
||||
|
||||
## Interesting Repositories
|
||||
In their [kernels](https://wiki.parabolagnulinux.org/Repositories#kernels) article,
|
||||
the Parabola wiki mentions a repository called `[kernels]`, for custom kernels
|
||||
that aren't in the default **base**. It might be worth looking into what is available there,
|
||||
depending on your use case.
|
||||
|
||||
I enabled it on my system, to see what was in it. Edit **/etc/pacman.conf**,
|
||||
and below the **extra** section add:
|
||||
|
||||
[kernels]
|
||||
Include = /etc/pacman.d/mirrorlist*
|
||||
|
||||
Now, sync with the newly-added repository:
|
||||
|
||||
pacman -Syy
|
||||
|
||||
Lastly, list all available packages in this repository:
|
||||
|
||||
pacman -Sl kernels
|
||||
|
||||
In the end, I decided not to install anything from it,
|
||||
but I kept the repository enabled regardless.
|
||||
|
||||
## Setup a Network Connection in Parabola
|
||||
Read the ArchWiki guide to [Configuring the Network](https://wiki.archlinux.org/index.php/Configuring_Network).
|
||||
|
||||
### Set the Hostname
|
||||
This should be the same as the hostname that you set in **/etc/hostname**,
|
||||
when installing Parabola. You should also do it with `systemd`.
|
||||
If you chose the hostname *parabola*, do it this way:
|
||||
|
||||
hostnamectl set-hostname parabola
|
||||
|
||||
This writes the specified hostname to **/etc/hostname**.
|
||||
More information can be found in these **manpages**:
|
||||
|
||||
man hostname
|
||||
info hostname
|
||||
man hostnamectl
|
||||
|
||||
Check **/etc/hosts**, to make sure that the hostname that you put in there
|
||||
during installation is still on each line:
|
||||
|
||||
127.0.0.1 localhost.localdomain localhost parabola
|
||||
::1 localhost.localdomain localhost parabola
|
||||
|
||||
You'll note that I set both lines; the second line is for IPv6. Since more and
|
||||
more ISPs are providing this now, it's good to be have it enabled, just in case.
|
||||
|
||||
The `hostname` utility is part of the `inetutils` package, and is in the **core** repository,
|
||||
installed by default (as part of the **base** package).
|
||||
|
||||
### Network Status
|
||||
According to ArchWiki, [udev](https://wiki.archlinux.org/index.php/Udev) should already detect
|
||||
the ethernet chipset, and automatically load the driver for it at boot time.
|
||||
You can check this in the **Ethernet controller** section, when running the `lspci` command:
|
||||
|
||||
lspci -v
|
||||
|
||||
Look at the remaining sections **Kernel driver in use** and **Kernel modules**.
|
||||
In my case, it was as follows:
|
||||
|
||||
Kernel driver in use: e1000e
|
||||
Kernel modules: e1000e
|
||||
|
||||
Check that the driver was loaded, by issuing `dmesg | grep module_name`.
|
||||
In my case, I did:
|
||||
|
||||
dmesg | grep e1000e
|
||||
|
||||
### Network Device Names
|
||||
According to the ArchWiki guide on [Configuring Network Device Names](https://wiki.archlinux.org/index.php/Configuring_Network#Device_names),
|
||||
it is important to note that the old interface names that you might be used to
|
||||
(e.g., `eth0`, `wlan0`, `wwan0`, etc.), if you come from a distribution like Debian or Trisquel,
|
||||
are no longer applicable. Instead, `systemd` creates device names
|
||||
starting with `en` (for ethernet), `wl` (for wi-fi), and `ww` (for wwan),
|
||||
with a fixed identifier that it automatically generates.
|
||||
An example device name for your ethernet chipset would be `enp0s25`,
|
||||
and is never supposed to change.
|
||||
|
||||
If you want to enable the old names, ArchWiki recommends adding `net.ifnames=0`
|
||||
to your kernel parameters (in Libreboot context, this would be accomplished by following
|
||||
the instructions in [How to replace the default GRUB configuration file](grub_cbfs.md)).
|
||||
|
||||
For background information, read [Predictable Network Interface Names](http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/).
|
||||
|
||||
To show what the device names are for your system, run the following command:
|
||||
|
||||
ls /sys/class/net
|
||||
|
||||
[Changing the device names](https://wiki.archlinux.org/index.php/Configuring_Network#Change_device_name) is possible,
|
||||
but for the purposes of this guide, there is no reason to do it.
|
||||
|
||||
### Network Setup
|
||||
Aside from the steps mentioned above, I choose to ignore most of Networking section on the wiki;
|
||||
this is because I will be installing the *MATE Desktop Environment*, and thus will
|
||||
be using the `NetworkManger` client (with its accompanying applet) to manage the network.
|
||||
|
||||
If you wish to choose a different program, here are some other
|
||||
[network manager options](https://wiki.archlinux.org/index.php/List_of_applications/Internet#Network_managers)
|
||||
that you could use.
|
||||
|
||||
## Configuring the Graphical Desktop Environment
|
||||
Since we are going with the *MATE Desktop Environment*, we will primarily be following
|
||||
the instructions on the [Arch Linux Package Repository](https://wiki.mate-desktop.org/archlinux_custom_repo) page,
|
||||
but will also refer to the [General Recommendations](https://wiki.archlinux.org/index.php/General_recommendations#Graphical_user_interface)
|
||||
on ArchWiki.
|
||||
|
||||
### Installing Xorg
|
||||
The first step is to install [**Xorg**](https://wiki.archlinux.org/index.php/Xorg);
|
||||
this provides an implementation of the `X Window System`, which is used to provide
|
||||
a graphical intefrace in GNU+Linux:
|
||||
|
||||
pacman -S xorg-server
|
||||
|
||||
We also need to install the driver for our hardware. Since I am using a Thinkpad X200,
|
||||
I will use `xf86-video-intel`; it should be the same on the other Thinkpads,
|
||||
as well as the Macbook 1,1 and 2,1.
|
||||
|
||||
pacman -S xf86-video-intel
|
||||
|
||||
For other systems, you can try:
|
||||
|
||||
pacman -Ss xf86-video- | less
|
||||
|
||||
When this is combined with looking at your `lspci` output, you can determine which
|
||||
driver is needed. By default, `Xorg` will revert to `xf86-video-vesa`,
|
||||
which is a generic driver, and doesn't provide true hardware acceleration.
|
||||
|
||||
Other drivers (not just video) can be found by looking at the `xorg-drivers` group:
|
||||
|
||||
pacman -Sg xorg-drivers
|
||||
|
||||
### Xorg Keyboard Layout
|
||||
`xorg` uses a different configuration method for keyboard layouts than Parabola,
|
||||
so you will notice that the layout you set in **/etc/vconsole.conf** earlier might
|
||||
not actually be the same in `xorg`.
|
||||
|
||||
Check ArchWiki's article on [Xorg's keyboard configuration](https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg), for more information.
|
||||
|
||||
To see what layout you currently use, try this on a terminal emulator in `xorg`:
|
||||
|
||||
setxkbmap -print -verbose 10
|
||||
|
||||
I'm simply using the default Qwerty (US) keyboard, so there isn't anything I need
|
||||
to change here; if you do need to make any changes, ArchWiki recommends two ways
|
||||
of doing it: manually updating [configuration files](https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_X_configuration_files) or using the [localectl](https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_localectl) command.
|
||||
|
||||
### Installing MATE
|
||||
Now we have to install the desktop environment itself. According to the Arch Linux Package Repository,
|
||||
if we want all of the MATE Desktop, we need to install two packages:
|
||||
|
||||
pacman -Syy mate mate-extra
|
||||
|
||||
The last step is to install a Display Manager; for MATE, we will be using `lightdm`
|
||||
(it's the recommended Display Manager for the MATE Desktop); for this, we'll folow the instructions [on the MATE wiki](https://wiki.mate-desktop.org/archlinux_custom_repo#display_manager_recommended),
|
||||
with one small change: the `lightdm-gtk3-greeter` package doesn't exist in Parabola's repositories.
|
||||
So, instead we will install the `lightdm-gtk-greeter` package; it performs the same function.
|
||||
|
||||
We'll also need the `accountsservice` package, which gives us the login window itself:
|
||||
|
||||
pacman -Syy lightdm-gtk3-greeter accountsservice
|
||||
|
||||
After installing all the required packages, we need to make it so that the MATE Desktop Environment
|
||||
will start automatically, whenever we boot our computer; to do this, we have to enable the display manager, `lightdm`,
|
||||
as well as the service that will prompt us with a login window, `accounts-daemon`:
|
||||
|
||||
systemctl enable lightdm
|
||||
systemctl enable accounts-daemon
|
||||
|
||||
Now you have installed the *MATE Desktop Environment*,If you wanted
|
||||
to install another desktop environment, check out some [other options](https://wiki.archlinux.org/index.php/Desktop_environment) on ArchWiki.
|
||||
|
||||
### Configuring Network Manager in MATE
|
||||
Now that we have installed the Mate Desktop environment, and booted into it,
|
||||
we need to set up the network configuration in our graphical environment.
|
||||
|
||||
The MATE Desktop wiki recommends that we use Network Manager; an
|
||||
article about Network Manager can be found
|
||||
[on ArchWiki](https://wiki.archlinux.org/index.php/NetworkManager).
|
||||
|
||||
We need to install the NetworkManager package:
|
||||
|
||||
pacman -S networkmanager
|
||||
|
||||
We will also need the Network Manager applet, which will allow us to manage our
|
||||
networks from the system tray:
|
||||
|
||||
pacman -S network-manager-applet
|
||||
|
||||
Finally, we need to start the service (if we want to use it now), or enable it,
|
||||
(so that it will activate automatically, at startup).
|
||||
|
||||
systemctl enable NetworkManager.service
|
||||
|
||||
If you need VPN support, you will also want to install the `networkmanager-openvpn` package.
|
||||
|
||||
**NOTE: You do not want multiple networking services running at the same time;
|
||||
they will conflict, so, if using Network Manager, you want to stop/disable any
|
||||
others from running. Examples of other services that will probably intefere
|
||||
with Network Manager are** `dhcpcd` **and** `wifi-menu`**.**
|
||||
|
||||
You can see all currently-running services with this command:
|
||||
|
||||
systemctl --type=service
|
||||
|
||||
And you can stop them using this command:
|
||||
|
||||
systemctl stop service_name.service
|
||||
|
||||
If you want to disable those services, meaning that you no longer want them to start
|
||||
when the computer boots up, you will need to use `systemctl's` `disable` option,
|
||||
instead of `stop`.
|
||||
|
||||
Now you have a fully-functional graphical environment for your Parabola installation,
|
||||
including networking. All you have to do is reboot, and you will be prompted to log in,
|
||||
with a familiar graphical login prompt. You can also now, more easily [modify the GRUB configuration](grub_cbfs.md),
|
||||
install new applications, and/or make whatever other changes you want to your system.
|
|
@ -1,498 +0,0 @@
|
|||
---
|
||||
title: Installing Parabola or Arch GNU+Linux-Libre, with Full-Disk Encryption (including /boot)
|
||||
x-toc-enable: true
|
||||
...
|
||||
|
||||
TODO: this guide is horribly outdated. Update it, based on the latest Parabola
|
||||
versions.
|
||||
|
||||
Also see:
|
||||
[Installing Hyperbola GNU+Linux, with Full-Disk Encryption (including /boot)](https://wiki.hyperbola.info/en:guide:encrypted_installation)
|
||||
|
||||
This guide covers how to install Parabola GNU+Linux-Libre, with full disk encryption,
|
||||
including **/boot** (the boot directory). On most systems, **/boot** has
|
||||
to be left unencrypted, while the other partition(s) are encrypted.
|
||||
This is so that GRUB (and therefore the kernel) can be loaded and executed,
|
||||
because most firmware can’t open a LUKS volume; however, with libreboot,
|
||||
GRUB is already included as a [payload](http://www.coreboot.org/Payloads#GRUB_2),
|
||||
so even **/boot** can be encrypted; this protects **/boot** from tampering
|
||||
by someone with physical access to the system.
|
||||
|
||||
**NOTE: This guide is *only* for the GRUB payload.
|
||||
If you use the depthcharge payload, ignore this section entirely.**
|
||||
|
||||
This guide borrows heavily from the Parabola wiki, and will constantly link to it.
|
||||
For those new to Parabola GNU+Linux-Libre, check their [Beginner section](https://wiki.parabola.nu/Beginners%27_guide#Beginners) for an overview.
|
||||
|
||||
## Minumum Requirements
|
||||
You can find the minimum requirements to run Parabola GNU+Linux
|
||||
[on the Parabola wiki](https://wiki.parabola.nu/Beginners%27_guide#Minimum_system_requirements).
|
||||
|
||||
## Preparation
|
||||
|
||||
### Download the latest ISO
|
||||
For this guide, I used the *2016.11.03* ISO; the most current image is
|
||||
available on Parabola's
|
||||
[downloads page](https://wiki.parabola.nu/Get_Parabola#Release_images_for_x86_64_and_i686_architectures).
|
||||
|
||||
If you are a complete beginner with GNU+Linux, choose the *Mate Desktop ISO*.
|
||||
it is easier to install Parabola with this version, because it allows you
|
||||
access to a web browser, so you can copy and paste commands right into the terminal,
|
||||
without worrying about typos.
|
||||
|
||||
**NOTE: You should never blindly copy-and-paste any commands. In this guide,
|
||||
copying and pasting is to ensure that no errors are made when entering the commands,
|
||||
so that you don't effectively "brick" your installation, and have to start over.
|
||||
It's important to understand what each command does before you use it,
|
||||
so be sure to read the Parabola/Archi Wiki documentation on the command,
|
||||
as well as its** `man` **page.**
|
||||
|
||||
If you are not a beginner, choose the *Main Live ISO*.
|
||||
|
||||
Only choose the *TalkingParabola ISO*, if you are blind or visually impaired.
|
||||
|
||||
### Choose the Installation Device
|
||||
Refer to the Parabola wiki, for finding and choosing the proper installation device,
|
||||
whether you are using an [Optical Disk](https://wiki.parabola.nu/Beginners%27_guide#Optical_Disks),
|
||||
or a [USB drive](https://wiki.parabola.nu/Beginners%27_guide#USB_flash_drive).
|
||||
|
||||
### Boot Parabola's Install Environment
|
||||
After downloading the ISO, and creating some kind of bootable media,
|
||||
you will need to boot into the Live image. If you are unsure of how to do so,
|
||||
see [How to boot a GNU+Linux installer](grub_boot_installer.md),
|
||||
and move on to the next step; otherwise, just go to the next step.
|
||||
|
||||
Once booted into the environment, either open the **`MATE Terminal`** application
|
||||
(if using the MATE Desktop ISO), or simply just enter the commands listed below
|
||||
(if using any of the other ISO's).
|
||||
|
||||
## Setting Up Keyboard Layout
|
||||
To begin the installation, you must first select the proper [keyboard layout](https://wiki.parabola.nu/Beginners%27_guide#Changing_Keyboard).
|
||||
|
||||
## Establish an Internet Connection
|
||||
You will also need to [set up a network connection](https://wiki.parabola.nu/Beginners%27_guide#Establish_an_internet_connection),
|
||||
to install packages.
|
||||
|
||||
## Preparing the Storage Device for Installation
|
||||
|
||||
You need to prepare the storage device that we will use to install the operating system.
|
||||
You can use same [device name](https://wiki.parabola.nu/Beginners%27_guide#USB_flash_drive)
|
||||
that you used earlier, to determine the installation device for the ISO.
|
||||
|
||||
### Wipe Storage Device
|
||||
You want to make sure that the device you're using doesn't contain any plaintext
|
||||
copies of your personal data. If the drive is new, then you can skip the rest of this section;
|
||||
if it's not new, then there are two ways to handle it:
|
||||
|
||||
1. If the drive were not previously encrypted, securely wipe it with the `dd` command;
|
||||
you can either choose to fill it with zeroes or random data; I chose random data (e.g., `urandom`),
|
||||
because it's more secure. Depending on the size of the drive, this could take a while to complete:
|
||||
|
||||
~~~
|
||||
dd if=/dev/urandom of=/dev/sdX; sync
|
||||
~~~
|
||||
|
||||
2. If the drive were previously encrypted, all you need to do is wipe the LUKS header.
|
||||
The size of the header depends upon the specific model of the hard drive;
|
||||
you can find this information by doing some research online.
|
||||
Refer to this [article](https://www.lisenet.com/2013/luks-add-keys-backup-and-restore-volume-header/), for more information about LUKS headers.
|
||||
You can either fill the header with zeroes, or with random data; again, I chose random data, using `urandom`:
|
||||
|
||||
~~~
|
||||
head -c 3145728 /dev/urandom > /dev/sdX; sync
|
||||
~~~
|
||||
|
||||
Also, if you're using an SSD, there are a two things you should keep in mind:
|
||||
|
||||
- There are issues with TRIM; it's not enabled by default through LUKS,
|
||||
and there are security issues, if you do enable it. See [this page](https://wiki.archlinux.org/index.php/Dm-crypt#Specialties) for more info.
|
||||
- Make sure to read [this article](https://wiki.archlinux.org/index.php/Solid_State_Drives),
|
||||
for information on managing SSD's in Arch Linux (the information applies to Parabola, as well).
|
||||
|
||||
### Formatting the Storage Device
|
||||
Now that all the personal data has been deleted from the disk, it's time to format it.
|
||||
We'll begin by creating a single, large partition on it, and then encrypting it using LUKS.
|
||||
|
||||
#### Create the LUKS partition
|
||||
You will need the `device-mapper` kernel module during the installation;
|
||||
this will enable us to set up our encrypted disk. To load it, use the following command:
|
||||
|
||||
modprobe dm_mod
|
||||
|
||||
We then need to select the **device name** of the drive we're installing the operating system on;
|
||||
see the above method, if needed, for figuring out device names.
|
||||
|
||||
Now that we have the name of the correct device, we need to create the partition on it.
|
||||
For this, we will use the `cfdisk` command:
|
||||
|
||||
cfdisk /dev/sdX
|
||||
|
||||
1. Use the arrow keys to select your partition, and if there is already a partition
|
||||
on the drive, select **Delete**, and then **New**.
|
||||
2. For the partition size, leave it as the default, which will be the entire drive.
|
||||
3. You will see an option for **Primary** or **Logical**; choose **Primary**,
|
||||
and make sure that the partition type is **Linux (83)**.
|
||||
4. Select **Write**; it will ask you if you are sure that you want to overwrite the drive.
|
||||
5. Type **yes**, and press enter. A message at the bottom will appear, telling you that
|
||||
the partition table has been altered.
|
||||
6. Select **Quit**, to return you to the main terminal.
|
||||
|
||||
Now that you have created the partition, it's time to create the encrypted volume on it,
|
||||
using the `cryptsetup` command, like this:
|
||||
|
||||
cryptsetup -v --cipher serpent-xts-plain64 --key-size 512 --hash whirlpool \
|
||||
--iter-time 500 --use-random --verify-passphrase --type luks1 luksFormat /dev/sdXY
|
||||
|
||||
These are just recommended defaults; if you want to use anything else,
|
||||
or to find out what options there are, run `man cryptsetup`.
|
||||
|
||||
>**NOTE: the default iteration time is 2000ms (2 seconds),
|
||||
>if not specified when running the cryptsetup command. You should set a lower time than this;
|
||||
>otherwise, there will be an approximately 20-second delay when booting your
|
||||
>system. We recommend 500ms (0.5 seconds), and this is included in the
|
||||
>prepared** `cryptsetup` **command above. Keep in mind that the iteration time
|
||||
>is for security purposes (it mitigates brute force attacks), so anything lower
|
||||
>than 0.5 seconds is probably not very secure.**
|
||||
|
||||
You will now be prompted to enter a passphrase; be sure to make it *secure*.
|
||||
For passphrase security, length is more important than complexity
|
||||
(e.g., **correct-horse-battery-staple** is more secure than **bf20$3Jhy3**),
|
||||
but it's helpful to include several different types of characters
|
||||
(e.g., uppercase/lowercase letters, numbers, special characters).
|
||||
The password length should be as long as you are able to remember,
|
||||
without having to write it down, or store it anywhere.
|
||||
|
||||
Use of the [**diceware**](http://world.std.com/~reinhold/diceware.html) method
|
||||
is recommended, for generating secure passphrases (rather than passwords).
|
||||
|
||||
#### Create the Volume Group and Logical Volumes
|
||||
The next step is to create two Logical Volumes within the LUKS-encrypted partition:
|
||||
one will contain your main installation, and the other will contain your swap space.
|
||||
|
||||
We will create this using, the [Logical Volume Manager (LVM)](https://wiki.archlinux.org/index.php/LVM).
|
||||
|
||||
First, we need to open the LUKS partition, at **/dev/mapper/lvm**:
|
||||
|
||||
cryptsetup luksOpen /dev/sdXY lvm
|
||||
|
||||
Then, we create LVM partition:
|
||||
|
||||
pvcreate /dev/mapper/lvm
|
||||
|
||||
Check to make sure tha the partition was created:
|
||||
|
||||
pvdisplay
|
||||
|
||||
Next, we create the volume group, inside of which the logical volumes will
|
||||
be created. In libreboot's case, we will call this group **matrix**.
|
||||
If you want to have it work via *Load Operating System (incl. fully
|
||||
encrypted disks) [o]* it needs to be called **matrix** (as it is harcoded
|
||||
in libreboot's grub.cfg on the flash)
|
||||
|
||||
vgcreate matrix /dev/mapper/lvm
|
||||
|
||||
Check to make sure that the group was created:
|
||||
|
||||
vgdisplay
|
||||
|
||||
Lastly, we need to create the logical volumes themselves, inside the volume group;
|
||||
one will be our swap, cleverly named **swapvol**, and the other will be our root partition,
|
||||
equally cleverly named as **rootvol**.
|
||||
|
||||
1. We will create the **swapvol** first (again, choose your own name, if you like).
|
||||
Also, make sure to [choose an appropriate swap size](http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space)
|
||||
(e.g., **2G** refers to two gigabytes; change this however you see fit):
|
||||
|
||||
~~~
|
||||
lvcreate -L 2G matrix -n swapvol
|
||||
~~~
|
||||
|
||||
2. Now, we will create a single, large partition in the rest of the space, for **rootvol**:
|
||||
|
||||
~~~
|
||||
# lvcreate -l +100%FREE matrix -n rootvol
|
||||
~~~
|
||||
|
||||
You can also be flexible here, for example you can specify a **/boot**, a **/**,
|
||||
a **/home**, a **/var**, or a **/usr** volume. For example, if you will be running a
|
||||
web/mail server then you want **/var** (where logs are stored) in its own partition,
|
||||
so that if it fills up with logs, it won't crash your system.
|
||||
For a home/laptop system (typical use case), just a root and a swap will do.
|
||||
|
||||
Verify that the logical volumes were created correctly:
|
||||
|
||||
lvdisplay
|
||||
|
||||
#### Make the rootvol and swapvol Partitions Ready for Installation
|
||||
The last steps of setting up the drive for installation are turning **swapvol**
|
||||
into an active swap partition, and formatting **rootvol**.
|
||||
|
||||
To make **swapvol** into a swap partition, we run the `mkswap` (i.e., make swap) command:
|
||||
|
||||
mkswap /dev/matrix/swapvol
|
||||
|
||||
Activate the **swapvol**, allowing it to now be used as swap,
|
||||
using `swapon` (i.e., turn swap on) command:
|
||||
|
||||
swapon /dev/matrix/swapvol
|
||||
|
||||
Now I have to format **rootvol**, to make it ready for installation;
|
||||
I do this with the `mkfs` (i.e., make file system) command.
|
||||
I choose the **ext4** filesystem, but you could use a different one,
|
||||
depending on your use case:
|
||||
|
||||
mkfs.ext4 /dev/matrix/rootvol
|
||||
|
||||
Lastly, I need to mount **rootvol**. Fortunately, GNU+Linux has a directory
|
||||
for this very purpose: **/mnt**:
|
||||
|
||||
mount /dev/matrix/rootvol /mnt
|
||||
|
||||
#### Separate boot and home logical volumes
|
||||
You could also create two separate logical volumes for **/boot** and **/home**,
|
||||
but such a setup would be for advanced users,
|
||||
and is thus not covered in this guide.
|
||||
If separate boot logical volume is used, it has to be named **boot**
|
||||
in order for libreboot to use it.
|
||||
|
||||
The setup of the drive and partitions is now complete; it's time to actually install Parabola.
|
||||
|
||||
## Select a Mirror
|
||||
The first step of the actual installation is to choose the server from where
|
||||
we will need to download the packages; for this, we will again refer to the [Parabola Wiki](https://wiki.parabola.nu/Beginners%27_guide#Select_a_mirror).
|
||||
For beginners, I recommend that the edit the file using `nano` (a command-line text editor);
|
||||
you can learn more about it on [their website](https://www.nano-editor.org/); for non-beginners,
|
||||
simply edit it with your favorite text editor.
|
||||
|
||||
## Install the Base System
|
||||
We need to install the essential applications needed for your Parabola installation to run;
|
||||
refer to [Install the Base System](https://wiki.parabola.nu/Beginners%27_guide#Install_the_base_system), on the Parabola wiki.
|
||||
|
||||
## Generate an fstab
|
||||
The next step in the process is to generate a file known as an **fstab**;
|
||||
the purpose of this file is for the operating system to identify the storage device
|
||||
used by your installation. [On the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Generate_an_fstab) are the instructions to generate that file.
|
||||
|
||||
## Chroot into and Configure the System
|
||||
Now, you need to `chroot` into your new installation, to complete the setup
|
||||
and installation process. **Chrooting** refers to changing the root directory
|
||||
of an operating system to a different one; in this instance, it means changing your root
|
||||
directory to the one you created in the previous steps, so that you can modify files
|
||||
and install software onto it, as if it were the host operating system.
|
||||
|
||||
To `chroot` into your installation, follow the instructions [on the
|
||||
Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Chroot_and_configure_the_base_system).
|
||||
|
||||
### Setting up the Locale
|
||||
Locale refers to the language that your operating system will use, as well as some
|
||||
other considerations related to the region in which you live. To set this up,
|
||||
follow the instructions [in the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Locale).
|
||||
|
||||
### Setting up the Consolefont and Keymap
|
||||
This will determine the keyboard layout of your new installation; follow the instructions [in the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Console_font_and_keymap).
|
||||
|
||||
### Setting up the Time Zone
|
||||
You'll need to set your current time zone in the operating system; this will enable applications
|
||||
that require accurate time to work properly (e.g., the web browser).
|
||||
To do this, follow the instructions [in the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Time_zone).
|
||||
|
||||
### Setting up the Hardware Clock
|
||||
To make sure that your computer has the right time, you'll have to set the time in your computer's internal clock.
|
||||
Follow the instructions [in the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Hardware_clock) to do that.
|
||||
|
||||
### Setting up the Kernel Modules
|
||||
Now we need to make sure that the kernel has all the modules that it needs
|
||||
to boot the operating system. To do this, we need to edit a file called **mkinitcpio.conf**.
|
||||
More information about this file can be found [in the Parabola beginner's guide](https://wiki.parabola.nu/Mkinitcpio),
|
||||
but for the sake of this guide, you simply need to run the following command.
|
||||
|
||||
nano /etc/mkinitcpio.conf
|
||||
|
||||
There are several modifications that we need to make to the file:
|
||||
|
||||
1. Change the value of the uncommented `MODULES` line to `i915`.
|
||||
|
||||
* This forces the driver to load earlier, so that the console font you selected earlier
|
||||
isn’t wiped out after getting to login.
|
||||
* If you are using a **Macbook 2,1** you will also need to add `hid-generic`,
|
||||
`hid`, and `hid-apple` inside the quotation marks, in order to have
|
||||
a working keyboard when asked to enter the LUKS password.
|
||||
Make sure to separate each module by one space.
|
||||
|
||||
2. Change the value of the uncommented `HOOKS` line to the following:
|
||||
|
||||
~~~
|
||||
base udev autodetect modconf block keyboard keymap consolefont encrypt lvm2 filesystems fsck shutdown
|
||||
~~~
|
||||
|
||||
here's what each module does:
|
||||
|
||||
* `keymap` adds to *initramfs* the keymap that you specified in **/etc/vconsole.conf**
|
||||
* `consolefont` adds to *initramfs* the font that you specified in **/etc/vconsole.conf**
|
||||
* `encrypt` adds LUKS support to the initramfs - needed to unlock your disks at boot time
|
||||
* `lvm2` adds LVM support to the initramfs - needed to mount the LVM partitions at boot time
|
||||
* `shutdown` is needed according to Parabola wiki, for unmounting devices (such as LUKS/LVM) during shutdown
|
||||
|
||||
After modifying the file and saving it, we need to update the kernel(s) with the new settings.
|
||||
Before doing this, we want to install a Long-Term Support (LTS) kernel as a backup, in the event
|
||||
that we encounter problems with the default Linux-Libre kernel (which is continually updated).
|
||||
|
||||
We will also install the `grub` package, which we will need later,
|
||||
to make our modifications to the GRUB configuration file:
|
||||
|
||||
pacman -S linux-libre-lts grub
|
||||
|
||||
Then, we update both kernels like this, using the `mkinitcpio` command:
|
||||
|
||||
mkinitcpio -p linux-libre
|
||||
mkinitcpio -p linux-libre-lts
|
||||
|
||||
### Setting up the Hostname
|
||||
Now we need to set up the hostname for the system; this is so that our device
|
||||
can be identified by the network. Refer to [the hostname section](https://wiki.parabola.nu/Beginners%27_guide#Hostname)
|
||||
of the Parabola wiki's Beginner's Guide. You can make the hostname anything you like;
|
||||
for example, if you wanted to choose the hostname **parabola**,
|
||||
you would run the `echo` command, like this:
|
||||
|
||||
echo parabola > /etc/hostname
|
||||
|
||||
And then you would modify **/etc/hosts** like this, adding the hostname to it:
|
||||
|
||||
nano /etc/hosts
|
||||
|
||||
#<ip-address> <hostname.domain.org> <hostname>
|
||||
127.0.0.1 localhost.localdomain localhost parabola
|
||||
::1 localhost.localdomain localhost parabola
|
||||
|
||||
### Configure the Network
|
||||
Now that we have a hostname, we need to configure the settings for the rest of the network.
|
||||
Instructions for setting up a wired connection are [in the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Wired),
|
||||
and instructions for setting up a wireless connection are [in the Parabola beginner's guide](https://wiki.parabola.nu/Beginners%27_guide#Wireless_2).
|
||||
|
||||
### Set the root Password
|
||||
The **root** account has control over all the files in the computer; for security,
|
||||
we want to protect it with a password. The password requirements given above,
|
||||
for the LUKS passphrase, apply here as well. You will set this password with the `passwd` command:
|
||||
|
||||
passwd
|
||||
|
||||
### Extra Security Tweaks
|
||||
There are some final changes that we can make to the installation, to make it
|
||||
significantly more secure; these are based on the [Security](https://wiki.archlinux.org/index.php/Security) section of the Arch wiki.
|
||||
|
||||
#### Key Strengthening
|
||||
We will want to open the configuration file for password settings, and increase
|
||||
the strength of our **root** password:
|
||||
|
||||
nano /etc/pam.d/passwd
|
||||
|
||||
Add `rounds=65536` at the end of the uncommented 'password' line; in simple terms,
|
||||
this will force an attacker to take more time with each password guess, mitigating
|
||||
the threat of brute force attacks.
|
||||
|
||||
#### Restrict Access to Important Directories
|
||||
You can prevent any user, other than the root user, from accessing the most important
|
||||
directories in the system, using the `chmod` command; to learn more about this command,
|
||||
run `man chmod`:
|
||||
|
||||
chmod 700 /boot /etc/{iptables,arptables}
|
||||
|
||||
#### Lockout User After Three Failed Login Attempts
|
||||
We can also setup the system to lock a user's account, after three failed login attempts.
|
||||
|
||||
To do this, we will need to edit the file **/etc/pam.d/system-login**,
|
||||
and comment out this line:
|
||||
|
||||
auth required pam\_tally.so onerr=succeed file=/var/log/faillog*\
|
||||
|
||||
You could also just delete it. Above it, put the following line:
|
||||
|
||||
auth required pam\_tally.so deny=2 unlock\_time=600 onerr=succeed file=/var/log/faillog
|
||||
|
||||
This configuration will lock the user out for ten minutes.
|
||||
You can unlock a user's account manually, using the **root** account, with this command:
|
||||
|
||||
pam_tally --user *theusername* --reset
|
||||
|
||||
#### Generate grub.cfg
|
||||
Edit configuration in `/etc/default/grub`, remembering to use UUID when poitning to mbr/gpt partition.
|
||||
Use `blkid` to get list of devices with their respective UUIDs.
|
||||
For details see [parabola wiki.](https://wiki.parabola.nu/Dm-crypt/Encrypting_an_entire_system#Configuring_the_boot_loader_5)
|
||||
|
||||
Next generate grub.cfg with:
|
||||
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
If you have separate `/boot` partition, don't forget to add `boot` symlink inside that points to current directory
|
||||
|
||||
cd /boot; ln -s . boot
|
||||
|
||||
## Unmount All Partitions and Reboot
|
||||
Congratulations! You have finished the installation of Parabola GNU+Linux-Libre.
|
||||
Now it is time to reboot the system, but first, there are several preliminary steps:
|
||||
|
||||
Exit from `chroot`, using the `exit` command:
|
||||
|
||||
exit
|
||||
|
||||
Unmount all of the partitions from **/mnt**, and "turn off" the swap volume:
|
||||
|
||||
umount -R /mnt
|
||||
swapoff -a
|
||||
|
||||
Deactivate the **rootvol** and **swapvol** logical volumes:
|
||||
|
||||
lvchange -an /dev/matrix/rootvol
|
||||
lvchange -an /dev/matrix/swapvol
|
||||
|
||||
Lock the encrypted partition (i.e., close it):
|
||||
|
||||
cryptsetup luksClose lvm
|
||||
|
||||
Shutdown the machine:
|
||||
|
||||
shutdown -h now
|
||||
|
||||
After the machine is off, remove the installation media, and turn it on.
|
||||
|
||||
## Booting the installation manually from GRUB
|
||||
When you forget to configure or misconfigure grub on your hdd, you have to manually boot
|
||||
the system by entering a series of commands into the GRUB command line.
|
||||
|
||||
|
||||
After the computer starts, Press `C` to bring up the GRUB command line.
|
||||
You can either boot the normal kernel, or the LTS kernel we installed;
|
||||
here are the commands for the normal kernel:
|
||||
|
||||
grub> cryptomount -a
|
||||
grub> set root='lvm/matrix-rootvol'
|
||||
grub> linux /boot/vmlinuz-linux-libre root=/dev/matrix/rootvol cryptdevice=/dev/sda1:root
|
||||
grub> initrd /boot/initramfs-linux-libre.img
|
||||
grub> boot
|
||||
|
||||
If you're trying to boot the LTS kernel, simply add **-lts** to the end
|
||||
of each command that contains the kernel (e.g., **/boot/vmlinuz-linux-libre**
|
||||
would be **/boot/vmlinuz/linux-libre-lts**).
|
||||
|
||||
**NOTE: on machines with native sata, during boot a (faulty) optical disc drive (like dvd) can cause
|
||||
the** `cryptomount -a` **command to fail/hang, as well as the error** `AHCI transfer timed out`
|
||||
**The workaround was to remove the DVD drive.**
|
||||
|
||||
## Follow-Up Tutorial: Configuring Parabola
|
||||
The next step of the setup process is to modify the configuration file that
|
||||
GRUB uses, so that we don't have to manually type in those commands above, each time we want
|
||||
to boot our system.
|
||||
|
||||
To make this process much easier, we need to install a graphical interface,
|
||||
as well as install some other packages that will make the system more user-friendly.
|
||||
These additions will also sharply reduce the probability of "bricking" our computer.
|
||||
|
||||
[Configuring Parabola (Post-Install)](configuring_parabola.md) provides an example setup, but don't feel
|
||||
as if you must follow it verbatim (of course, you can, if you want to);
|
||||
Parabola is user-centric and very customizable, which means that you have maximum control
|
||||
of the system, and a near-limitless number of options for setting it up. For more information,
|
||||
read [The Arch Way](https://wiki.archlinux.org/index.php/The_Arch_Way) (Parabola also follows it).
|
||||
|
||||
After setting up the graphical interface, refer to [How to Modify GRUB Configuration](grub_cbfs.md),
|
||||
for instructions on doing just that, as well as flashing the ROM (if necessary).
|
||||
|
|
@ -1,197 +0,0 @@
|
|||
---
|
||||
title: Installing Trisquel GNU+Linux with Full-Disk Encryption (including /boot)
|
||||
x-toc enable: true
|
||||
...
|
||||
|
||||
TODO: this guide needs to be updated based on the latest Trisquel 9.0 release.
|
||||
|
||||
This guide is written for the Trisquel 7.0 (Belenos) GNU+Linux distribution, but it should also work for Trisquel 6.0 (Toutatis).
|
||||
|
||||
Do not precisely follow this guide for Trisquel 9.0. There are a lot of steps
|
||||
needed after the installation, especially if you're using `btrfs` for your
|
||||
file system. If you're using the `ext4` file system, this guide will probably
|
||||
just work for Trisquel 9. TODO: update this guide!
|
||||
|
||||
## Gigabyte GA-G41M-ES2L
|
||||
|
||||
To boot the Trisquel net installer, make sure to specify fb=false on the linux
|
||||
kernel parameters in GRUB. This will boot the installer in text mode instead
|
||||
of using a framebuffer.
|
||||
|
||||
## Boot the Installation Media
|
||||
Boot your operating system, with the installation media. If you don't know how to do so, refer to [How to Prepare and Boot a USB Installer in Libreboot Systems](grub_boot_installer.md).
|
||||
|
||||
When the Trisquel GRUB screen appears, select the `Install Trisquel in Text Mode` option.
|
||||
|
||||
## Select a Language
|
||||
The first part of the installation is to select your system's language; I chose `English`.
|
||||
|
||||
## Select Your Location
|
||||
You will need to select your location; I choose `United States`.
|
||||
|
||||
## Configure the Keyboard
|
||||
You need to select the right layout for your keyboard; if you want to installer to do it automatically, choose `Yes`, and it will ask you whether or not a series of keys are present on your keyboard. Simply choose `Yes` or `No`, accordingly.
|
||||
|
||||
If you don't want the installer to automatically detect your keyboard layout, choose `No`, and simply select it from a list.
|
||||
|
||||
## Configure the Network
|
||||
|
||||
### Choose the Network Inteface
|
||||
You will need to select the network interface to be used for the installation. If you have an ethernet (i.e., wired) connection, choose `etho0`; otherwise, choose `wlan0` (for wireless).
|
||||
|
||||
If you choose `wlan0`, enter the passphrase that corresponds to your wireless network's WPA/WPA2 key (Your wireless network should have a password, and no modern router should be using the [WEP protocol](https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy)).
|
||||
|
||||
### Choose Your Hostname
|
||||
You will need to choose a hostname for the system, which identifies your computer to the network; it can be anything, but it must only consist of numbers, uppercase and lowercase letters, and dashes `-`.
|
||||
|
||||
### Choose a Mirror of the Trisquel Archive
|
||||
Choose the server from where you will download the Trisquel packages needed for the installation. The choices are separated by country; simply select the one that is closest to where you are.
|
||||
|
||||
After you select the country, you will be taken to a list of different individual servers. If there is more than one option, choose the one that is closest to you; otherwise, select whichever one is available.
|
||||
|
||||
The last step of setting up the network will be entering an HTTP proxy (if you need one to access the network). If you have one, type it here; otherwise, press `Tab`, and then choose `Continue` (using the arrow keys).
|
||||
|
||||
## Loading Additional Components
|
||||
Now the installer needs to download some more packages, to continue the installation. Depending on your network bandwidth, this could take up to a few minutes to complete.
|
||||
|
||||
## Set Up Users and Passwords
|
||||
Enter the full name of the user here. You can use your real name, or just a pseudonym; then, choose `Continue`.
|
||||
|
||||
Then it will ask you to enter a *username*. Pick whatever you like, and enter it here. Select `Continue`.
|
||||
|
||||
Choose a passphrase (better than a password). The [diceware](http://world.std.com/~reinhold/diceware.html) method is highly recommended for coming up with one.
|
||||
|
||||
I recommend combining the *diceware* method with something personal about yourself. An example of this would be to choose four words from the *diceware* list, and then come up with a fifth "word" (i.e., a combination of characters that is unique to you, like some name plus a number/special character); this combination dramatically increases the security of a *diceware* passphrase (i.e., even if someone had the entire *diceware* word list, they couldn't figure out your passphrase through brute force).
|
||||
|
||||
**NOTE: This would be difficult for a person to do, even if you *only* used words from the list**.
|
||||
|
||||
For example, say that your cat's name is **Max**, and he is three years old; you could do something like this:
|
||||
|
||||
diceware_word_1 diceware_word_2 diceware_word_3 diceware_word_4 Max=3old
|
||||
|
||||
This has a large degree of randomness (due to the usage of the *diceware* method), and also contains a unique piece of personal information that someone would need to know you, in order to guess; it's a very potent combination.
|
||||
|
||||
After entering this password twice, choose `Continue`.
|
||||
|
||||
It will now ask you if you want to encrypt your home directory. Remember, this is *NOT* to be confused with encrypting your entire disk (the purpose of this guide); it will just be the files that reside in `~`, and it uses a different encryption protocol (`ecryptfs`). If you want to encrypt your home directory here, choose `Yes`; however, since we are going to encrypt the entire installation, that would not only be redundant, but it would also add a noticeable performance penalty, for little security gain in most use cases. This is therefore optional, and *NOT* recommended. Choose `No`.
|
||||
|
||||
## Configure the Clock
|
||||
The installer will try to auto-detect your time zone; if it chooses correctly, select `Yes`; otherwise, choose `No`, and it will prompt you to select the correct one.
|
||||
|
||||
## Partition Disks
|
||||
Now it's time to partition the disk; you will be shown several options; choose `Manual` partitioning.
|
||||
|
||||
1. Use the arrow keys to select the drive (look for a matching size and manufacturer name in the description), and press `Enter`. It will ask you if you want to create a new, empty partition table on the device; choose `Yes`.
|
||||
|
||||
2. Your drive will now show as having a single partition, labeled `#1`; select it (it will say `FREE SPACE` beside it), and press `Enter`.
|
||||
|
||||
3. Choose `Create a new partition`. By default, the partition size will be the whole drive; leave it as-is, and select `Continue`.
|
||||
|
||||
4. When it asks for partition type, go with `Primary`; you'll be taken to a screen with a list of information about your new partition; make sure to fill out each field as follows (using the up and down arrows to navigate, and `Enter` to modify an option):
|
||||
|
||||
* Use as: `physical volume for encryption`
|
||||
* Encryption method: `Device-mapper (dm-crypt)`
|
||||
* Encryption: `aes`
|
||||
* key size: `256`
|
||||
* IV algorithm: `xts-plain64`
|
||||
* Encryption key: `passphrase`
|
||||
* Erase data: `Yes`
|
||||
|
||||
For the `Erase data` field, only choose `No`, if this is either a new drive that doesn't have any of your plaintext data, or else if it previously had full-disk encryption.
|
||||
|
||||
5. Choose `Done setting up the partition`. It will take you back to the main partitioning menu.
|
||||
|
||||
6. Choose `Configure encrypted volumes`; the installer will ask if you want to write the changes to disk, and configure the encrypted volumes; choose `Yes`.
|
||||
|
||||
7. Select `Create encrypted volumes`.
|
||||
|
||||
8. Select your partition with the arrow keys (pressing `Spacebar` will make an `*` appear between the brackets; that's how you know it's been selected). Press `Tab`, and choose `Continue`.
|
||||
|
||||
9. Select `Finish`. You will be asked if you really want to erase the drive; choose `Yes` (Erase will take a long time, so be patient. If your old system were encrypted, just let this run for about a minute, and then choose `Cancel`; this will make sure that the LUKS header is completely wiped out).
|
||||
|
||||
10. Now you need to enter a passphrase for encrypting the entire disk. Make sure that this is different from your user password that you created earlier, but still use the [diceware](http://world.std.com/~reinhold/diceware.html) method to create it. You will have to enter the password twice; afterwards, you will be returned to the main partitioning menu.
|
||||
|
||||
11. You will now see your encrypted device at the top of the device list. It will begin with something like this: `Encrypted volume (sdXY_crypt)`. Choose the partition labeled `#1`.
|
||||
|
||||
12. Change the value of `Use as` to `physical volume for LVM`. Then choose `Done setting up the partition`; you will be taken back to the main partitioning menu.
|
||||
|
||||
13. Choose `Configure the Logical Volume Manager`. You will be asked if you want to `Keep current partition layout and configure LVM`; choose `Yes`.
|
||||
|
||||
14. Choose `Create volume group`. You will have to enter a name for the group; use **matrix**. Select the encrypted partition as the device (by pressing `Spacebar`, which will make an `*` appear between the brackets; that's how you know it's been selected). Press `Tab`, and choose `Continue`.
|
||||
|
||||
15. Choose `Create logical volume`. Select the volume group you created in the previous step (i.e., **matrix**), and name it **rootvol**; make the size the entire drive minus 2048 MB (for the swap space). Press `Enter`.
|
||||
|
||||
16. Choose `Create logical volume` again, and select **matrix**. Name this one **swap**, and make the size the default value (it should be about 2048MB). Press `Enter`, and then choose `Finish`.
|
||||
|
||||
17. Now you are back at the main partitioning screen. You will simply set the mount points and filesystems to use for each partition you just created. Under `LVM VG matrix, LV rootvol`, select the first partition: `#1`. Change the values in this section to reflect the following; then choose `Done setting up partition`:
|
||||
|
||||
* use as: `ext4`
|
||||
* mount point: `/`
|
||||
|
||||
18. Under `LVM VG matrix, LV swap`, select the first partition: `#1`. Change the value of `use as` to `swap area`. Choose `Done setting up partition`.
|
||||
|
||||
19. Finally, when back at the main partitioning screen, choose `Finish partitioning and write changes to disk`. It will ask you to verify that you want to do this; choose `Yes`.
|
||||
|
||||
## Installing the Base System
|
||||
The hardest part of the installation is done; the installer will now download and install the packages necessary for your system to boot/run. The rest of the process will be mostly automated, but there will be a few things that you have to do yourself.
|
||||
|
||||
### Choose a Kernel
|
||||
It will ask you which kernel you want to use; choose `linux-generic`.
|
||||
|
||||
**NOTE: After installation, if you want the most up-to-date version of the Linux kernel (Trisquel's kernel is sometimes outdated, even in the testing distro), you might consider using [this repository](https://jxself.org/linux-libre/) instead. These kernels are also deblobbed, like Trisquel's (meaning there are no binary blobs present).**
|
||||
|
||||
### Update Policy
|
||||
You have to select a policy for installing security updates; I recommend that you choose `Install security updates automatically`, but you can choose not to, if you prefer.
|
||||
|
||||
### Choose a Desktop Environment
|
||||
When prompted to choose a desktop environment, use the arrow keys to navigate the choices, and press `Spacebar` to choose an option; here are some guidelines:
|
||||
|
||||
* If you want *GNOME*, choose **Trisquel Desktop Environment**
|
||||
* If you want *LDXE*, choose **Trisquel-mini Desktop Environment**
|
||||
* If you want *KDE*, choose **Triskel Desktop Environment**
|
||||
|
||||
You might also want to choose some of the other package groups (or none of them, if you want a basic shell); it's up to you. Once you've chosen the option you want, press `Tab`, and then choose `Continue`.
|
||||
|
||||
## Install the GRUB boot loader to the master boot record
|
||||
The installer will ask you if you want to install the GRUB bootloader to the master boot record; choose `Yes`. While you do not need to install GRUB bootloader, since in Libreboot, you are using the GRUB payload on the ROM to boot your syste, you still need to install grub package (preferably `grub-coreboot`) and generate distro's `grub.cfg` with `grub-mkconfig`.
|
||||
|
||||
The next window will prompt you to enter a `Device for boot loader installation`. Leave the line blank; press `Tab`, and choose `Continue`.
|
||||
|
||||
## System Clock
|
||||
The installer will ask if your system clock is set to UTC; choose `Yes`.
|
||||
|
||||
## Finishing the Installation
|
||||
The installer will now give you a message that the installation is complete. Choose `Continue`, remove the installation media, and the system will automatically reboot.
|
||||
|
||||
## Booting your system manually
|
||||
At this point, you will have finished the installation. To boot system manually, at your GRUB boot screen, press `C` to get to the command line, and enter the following commands at the `grub>` prompt:
|
||||
|
||||
grub> cryptomount -a
|
||||
grub> set root='lvm/matrix-rootvol'
|
||||
grub> linux /vmlinuz root=/dev/mapper/matrix-rootvol \
|
||||
>cryptdevice=/dev/mapper/matrix-rootvol:root
|
||||
grub> initrd /initrd.img
|
||||
grub> boot
|
||||
|
||||
Without specifying a device, **cryptomount's** `-a` parameter tries to unlock *all* detected LUKS volumes (i.e., any LUKS-encrypted device that is connected to the system). You can also specify `-u` (for a UUID). Once logged into the operating system, you can find the UUID by using the `blkid` command:
|
||||
|
||||
sudo blkid
|
||||
|
||||
## ecryptfs
|
||||
If you didn't encrypt your home directory, then you can safely ignore this section; if you did choose to encrypt it, then after you log in, you'll need to run this command:
|
||||
|
||||
sudo ecryptfs-unwrap-passphrase
|
||||
|
||||
This will be needed in the future, if you ever need to recover your home directory from another system. Write it down, or (preferably) store it using a password manager (I recommend `keepass`,`keepasX`, or `keepassXC`).
|
||||
|
||||
## Modify grub.cfg (CBFS)
|
||||
As the last step of the proccess you *can* modify your **grub.cfg** file (in the firmware), and flash the new configuration, [using this tutorial](grub_cbfs.md); this is so you can make your GRUB configuration much more secure, by following [this guide](grub_hardening.md). This step is entirely optional, libreboot supports FDE scheme without any changes to its grub.cfg.
|
||||
|
||||
## Troubleshooting
|
||||
During boot, some Thinkpads have a faulty DVD drive, which can cause the `cryptomount -a` command to fail, as well as the error `AHCI transfer timed out` (when the Thinkpad X200 is connected to an UltraBase). For both issues, the workaround was to remove the DVD drive (if using the UltraBase, then the whole device must be removed).
|
||||
|
||||
Copyright © 2014, 2015 Leah Rowe <info@minifree.org>
|
||||
|
||||
Copyright © 2017 Elijah Smith <esmith1412@posteo.net>
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License Version 1.3 or any later version published by the Free Software Foundation with no Invariant Sections, no Front Cover Texts, and no Back Cover Texts. A copy of this license is found in [../fdl-1.3.md](../fdl-1.3.md)
|
|
@ -1,370 +0,0 @@
|
|||
---
|
||||
title: Encrypted Guix GNU+Linux
|
||||
x-toc-enable: true
|
||||
...
|
||||
|
||||
Objective
|
||||
=========
|
||||
|
||||
To provide step-by-step guide for setting up guix system (stand-alone guix)
|
||||
with full disk encryption (including /boot) on devices powered by Libreboot.
|
||||
|
||||
Scope
|
||||
=====
|
||||
|
||||
Any users, for their generalised use cases, need not stumble away from this
|
||||
guide to accomplish the setup.
|
||||
|
||||
Advanced users, for deviant use cases, will have to explore outside this
|
||||
guide for customisation; although this guide provides information that is
|
||||
of paramount use.
|
||||
|
||||
Process
|
||||
=======
|
||||
|
||||
Preparation
|
||||
-----------
|
||||
|
||||
In your current GNU+Linux System, open terminal as root user.
|
||||
|
||||
Insert USB drive and get the USB device name /dev/sdX, where “X” is the
|
||||
variable to make a note of.
|
||||
|
||||
lsblk
|
||||
|
||||
Unmount the USB drive just in case if it’s auto-mounted.
|
||||
|
||||
umount /dev/sdX
|
||||
|
||||
Download the latest (a.b.c) Guix System ISO Installer Package (sss) and
|
||||
it’s GPG Signature; where “a.b.c” is the variable for version number and
|
||||
“sss” is the variable for system architecture.
|
||||
|
||||
wget https://ftp.gnu.org/gnu/guix/guix-system-install-a.b.c.sss-linux.iso.xz
|
||||
|
||||
wget https://ftp.gnu.org/gnu/guix/guix-system-install-a.b.c.sss-linux.iso.xz.sig
|
||||
|
||||
Import required public key.
|
||||
|
||||
gpg --keyserver pool.sks-keyservers.net --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5
|
||||
|
||||
Verify the GPG Signature of the downloaded package.
|
||||
|
||||
gpg --verify guix-system-install-a.b.c.sss-linux.iso.xz.sig
|
||||
|
||||
Extract the ISO Image from the downloaded package.
|
||||
|
||||
xz -d guix-system-install-a.b.c.sss-linux.iso.xz
|
||||
|
||||
Write the extracted ISO Image to the USB drive.
|
||||
|
||||
dd if=guix-system-install-a.b.c.sss-linux.iso of=/dev/sdX; sync
|
||||
|
||||
Reboot the device.
|
||||
|
||||
reboot
|
||||
|
||||
Pre-Installation
|
||||
----------------
|
||||
|
||||
On reboot, as soon as you see the Libreboot Graphic Art, press arrow keys
|
||||
to change the menu entry.
|
||||
|
||||
Choose “Search for GRUB2 configuration on external media [s]” and wait
|
||||
for the Guix System from USB drive to load.
|
||||
|
||||
Set your keyboard layout lo, where “lo” is the two-letter keyboard layout
|
||||
code (example: us or uk).
|
||||
|
||||
loadkeys lo
|
||||
|
||||
Unblock network interfaces (if any).
|
||||
|
||||
rfkill unblock all
|
||||
|
||||
Get the names of your network interfaces.
|
||||
|
||||
ifconfig -a
|
||||
|
||||
Bring your required network interface nwif (wired or wireless) up, where
|
||||
“nwif” is the variable for interface name. For wired connections,
|
||||
this should be enough.
|
||||
|
||||
ifconfig nwif up
|
||||
|
||||
For wireless connection, create a configuration file using text editor,
|
||||
where “fname” is the variable for any desired filename.
|
||||
|
||||
nano fname.conf
|
||||
|
||||
Choose, type and save ONE of the following snippets, where ‘nm’ is the
|
||||
name of the network you want to connect, ‘pw’ is the corresponding
|
||||
network’s password or passphrase and ‘un’ is user identity.
|
||||
|
||||
For most private networks:
|
||||
|
||||
network={
|
||||
ssid="nm"
|
||||
key_mgmt=WPA-PSK
|
||||
psk="pw"
|
||||
}
|
||||
|
||||
(or)
|
||||
|
||||
For most public networks:
|
||||
|
||||
network={
|
||||
ssid="nm"
|
||||
key_mgmt=NONE
|
||||
}
|
||||
|
||||
|
||||
(or)
|
||||
|
||||
For most organisational networks:
|
||||
|
||||
network={
|
||||
ssid="nm"
|
||||
scan_ssid=1
|
||||
key_mgmt=WPA-EAP
|
||||
identity="un"
|
||||
password="pw"
|
||||
eap=PEAP
|
||||
phase1="peaplabel=0"
|
||||
phase2="auth=MSCHAPV2"
|
||||
}
|
||||
|
||||
|
||||
Connect to the configured network, where “fname” is the filename and
|
||||
“nwif” is the network interface name.
|
||||
|
||||
wpa_supplicant -c fname.conf -i nwif -B
|
||||
|
||||
Assign an IP address to your network interface, where “nwif” is the
|
||||
network interface name.
|
||||
|
||||
dhclient -v nwif
|
||||
|
||||
Obtain the device name /dev/sdX in which you would like to deploy and
|
||||
install Guix System, where “X” is the variable to make a note of.
|
||||
|
||||
lsblk
|
||||
|
||||
Wipe the respective device. Wait for the command operation to finish.
|
||||
|
||||
dd if=/dev/urandom of=/dev/sdX; sync
|
||||
|
||||
Load device-mapper module in the current kernel.
|
||||
|
||||
modprobe dm_mod
|
||||
|
||||
Partition the respective device. Just do, GPT --> New --> Write --> Quit;
|
||||
defaults will be set.
|
||||
|
||||
cfdisk /dev/sdX
|
||||
|
||||
Encrypt the respective partition.
|
||||
|
||||
cryptsetup -v --cipher serpent-xts-plain64 --key-size 512 --hash whirlpool --iter-time 500 --use-random --verify-passphrase luksFormat /dev/sdX1
|
||||
|
||||
Obtain and note down the “LUKS UUID”.
|
||||
|
||||
cryptsetup luksUUID /dev/sdX1
|
||||
|
||||
Open the respective encrypted partition, where “partname” is any
|
||||
desired partition name.
|
||||
|
||||
cryptsetup luksOpen /dev/sdX1 partname
|
||||
|
||||
Make filesystem on the respective partition, where “fsname” is any
|
||||
desired filesystem name.
|
||||
|
||||
mkfs.btrfs -L fsname /dev/mapper/partname
|
||||
|
||||
Mount the respective filesystem under the current system.
|
||||
|
||||
mount LABEL=fsname /mnt
|
||||
|
||||
|
||||
Create a btrfs-supported NOCOW swap file with no compression and make it
|
||||
readable cum writable only by root.
|
||||
|
||||
touch /mnt/swapfile`
|
||||
|
||||
chattr +C /mnt/swapfile`
|
||||
|
||||
btrfs property set /mnt/swapfile compression none`
|
||||
|
||||
dd if=/dev/zero of=/mnt/swapfile bs=1MiB count=2048
|
||||
|
||||
chmod 600 /mnt/swapfile
|
||||
|
||||
mkswap /mnt/swapfile
|
||||
|
||||
swapon /mnt/swapfile
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Make the installation packages to be written on the respective
|
||||
mounted filesystem.
|
||||
|
||||
herd start cow-store /mnt
|
||||
|
||||
Create the required directory.
|
||||
|
||||
mkdir /mnt/etc
|
||||
|
||||
Create, edit and save the configuration file by typing the following
|
||||
code snippet. WATCH-OUT for variables in the code snippet and
|
||||
replace them with your relevant values.
|
||||
|
||||
nano /mnt/etc/config.scm
|
||||
|
||||
Snippet:
|
||||
|
||||
(use-modules
|
||||
(gnu)
|
||||
(gnu system nss))
|
||||
(use-service-modules
|
||||
xorg
|
||||
desktop)
|
||||
(use-package-modules
|
||||
certs
|
||||
gnome)
|
||||
(operating-system
|
||||
(host-name "hostname")
|
||||
(timezone "Zone/SubZone")
|
||||
(locale "ab_XY.1234")
|
||||
(keyboard-layout
|
||||
(keyboard-layout
|
||||
"xy"
|
||||
"altgr-intl"))
|
||||
(bootloader
|
||||
(bootloader-configuration
|
||||
(bootloader
|
||||
(bootloader
|
||||
(inherit grub-bootloader)
|
||||
(installer #~(const #t))))
|
||||
(keyboard-layout keyboard-layout)))
|
||||
(mapped-devices
|
||||
(list
|
||||
(mapped-device
|
||||
(source
|
||||
(uuid "luks-uuid"))
|
||||
(target "partname")
|
||||
(type luks-device-mapping))))
|
||||
(file-systems
|
||||
(append
|
||||
(list
|
||||
(file-system
|
||||
(device
|
||||
(file-system-label "fsname"))
|
||||
(mount-point "/")
|
||||
(type "btrfs")
|
||||
(dependencies mapped-devices)))
|
||||
%base-file-systems))
|
||||
(users
|
||||
(append
|
||||
(list
|
||||
(user-account
|
||||
(name "username")
|
||||
(comment "Full Name")
|
||||
(group "users")
|
||||
(supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "cdrom" "tape" "kvm"))))
|
||||
%base-user-accounts))
|
||||
(packages
|
||||
(append
|
||||
(list
|
||||
nss-certs)
|
||||
%base-packages))
|
||||
(services
|
||||
(append
|
||||
(list
|
||||
(extra-special-file "/usr/bin/env"
|
||||
(file-append coreutils "/bin/env"))
|
||||
(set-xorg-configuration
|
||||
(xorg-configuration
|
||||
(keyboard-layout keyboard-layout)))
|
||||
(service gnome-desktop-service-type))
|
||||
%desktop-services))
|
||||
(name-service-switch %mdns-host-lookup-nss))
|
||||
|
||||
Initialise new Guix System.
|
||||
|
||||
guix system init /mnt/etc/config.scm /mnt
|
||||
|
||||
Reboot the device.
|
||||
|
||||
reboot
|
||||
|
||||
Post-Installation
|
||||
------------
|
||||
|
||||
On reboot, as soon as you see the Libreboot Graphic Art, choose
|
||||
the option 'Load Operating System [o]'
|
||||
|
||||
Enter LUKS Key, for Libreboot's grub, as prompted.
|
||||
|
||||
You may have to go through warning prompts by repeatedly
|
||||
pressing the "enter/return" key.
|
||||
|
||||
You will now see guix's grub menu from which you can go with the
|
||||
default option.
|
||||
|
||||
Enter LUKS Key again, for kernel, as prompted.
|
||||
|
||||
Upon GNOME Login Screen, login as "root" with password field empty.
|
||||
|
||||
Open terminal from the GNOME Dash.
|
||||
|
||||
Set passkey for "root" user. Follow the prompts.
|
||||
|
||||
passwd root
|
||||
|
||||
Set passkey for "username" user. Follow the prompts.
|
||||
|
||||
passwd username
|
||||
|
||||
Update the guix distribution. Wait for the process to finish.
|
||||
|
||||
guix pull
|
||||
|
||||
Update the search paths.
|
||||
|
||||
export PATH="$HOME/.config/guix/current/bin:$PATH"
|
||||
|
||||
export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH"
|
||||
|
||||
Update the guix system. Wait for the process to finish.
|
||||
|
||||
guix system reconfigure /etc/config.scm
|
||||
|
||||
Reboot the device.
|
||||
|
||||
reboot
|
||||
|
||||
Conclusion
|
||||
==========
|
||||
|
||||
Everything should be stream-lined from now. You can follow your
|
||||
regular boot steps without requiring manual intervention. You can
|
||||
start logging in as regualar user with the respective "username".
|
||||
|
||||
You will have to periodically (at your convenient time) login as root
|
||||
and do the update/upgrade part of post-installation section, to keep your
|
||||
guix distribution and guix system updated.
|
||||
|
||||
That is it! You have now setup guix system with full-disk encryption
|
||||
on your device powered by Libreboot. Enjoy!
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
[1] Guix Manual (http://guix.gnu.org/manual/en/).
|
||||
|
||||
Acknowledgements
|
||||
================
|
||||
|
||||
[1] Thanks to Guix Developer, Clement Lassieur (clement@lassieur.org),
|
||||
for helping me with the Guile Scheme Code for the Bootloader Configuration.
|
|
@ -23,11 +23,7 @@ Refer to the following pages:
|
|||
|
||||
* [How to Prepare and Boot a USB Installer in Libreboot Systems](grub_boot_installer.md)
|
||||
* [Modifying the GRUB Configuration in Libreboot Systems](grub_cbfs.md)
|
||||
* [Guix System with Full-Disk Encryption on Libreboot](guix_system.md)
|
||||
* [Installing Parabola or Arch GNU+Linux-Libre, with Full-Disk Encryption (including /boot)](encrypted_parabola.md)
|
||||
* Follow-Up Tutorial: [Configuring Parabola (Post-Install)](configuring_parabola.md)
|
||||
* [Installing Hyperbola GNU+Linux, with Full-Disk Encryption (including /boot)](https://wiki.hyperbola.info/en:guide:encrypted_installation)
|
||||
* [Installing Trisquel GNU+Linux-Libre, with Full-Disk Encryption (including /boot)](encrypted_trisquel.md)
|
||||
* [Installing Debian or Devuan GNU+Linux-Libre, with Full-Disk Encryption (including /boot)](encrypted_debian.md)
|
||||
* [How to Harden Your GRUB Configuration, for Security](grub_hardening.md)
|
||||
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
---
|
||||
title: Libreboot releases
|
||||
x-toc-enable: true
|
||||
...
|
||||
|
||||
Information about each Libreboot release. This news section is specifically for
|
||||
Libreboot release announcements, but for more general news about Libreboot you
|
||||
can instead refer to the [main news section](/news/)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Subscribe to RSS: [/docs/release/feed.xml](/docs/release/feed.xml)
|
||||
|
||||
[Libreboot 20210522 released!](/docs/release/libreboot20210522.md){.title}
|
||||
[22 May 2021]{.date}
|
||||
|
||||
|
||||
[Libreboot 20160907 release](/docs/release/libreboot20160907.md){.title}
|
||||
[7 September 2016]{.date}
|
||||
|
||||
|
||||
[Libreboot 20160902 release](/docs/release/libreboot20160902.md){.title}
|
||||
[2 September 2016.]{.date}
|
||||
|
||||
|
||||
[Libreboot 20160818 release](/docs/release/libreboot20160818.md){.title}
|
||||
[18 August 2016]{.date}
|
||||
|
||||
|
||||
[Libreboot 20150518 release](/docs/release/libreboot20150518.md){.title}
|
||||
[18 May 2015]{.date}
|
||||
|
||||
|
||||
[Libreboot 20150208 release](/docs/release/libreboot20150208.md){.title}
|
||||
[8 February 2015]{.date}
|
||||
|
||||
|
||||
[Libreboot 20150126 release](/docs/release/libreboot20150126.md){.title}
|
||||
[26 January 2015]{.date}
|
||||
|
||||
|
||||
[Libreboot 20150124 release](/docs/release/libreboot20150124.md){.title}
|
||||
[24 January 2015]{.date}
|
||||
|
||||
|
||||
[Libreboot 20141015 release](/docs/release/libreboot20141015.md){.title}
|
||||
[15 October 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140911 release](/docs/release/libreboot20140911.md){.title}
|
||||
[11 September 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140903 release](/docs/release/libreboot20140903.md){.title}
|
||||
[3 September 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140811 release](/docs/release/libreboot20140811.md){.title}
|
||||
[11 August 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140729 release](/docs/release/libreboot20140729.md){.title}
|
||||
[29 July 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140720 release](/docs/release/libreboot20140720.md){.title}
|
||||
[20 July 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140716 release](/docs/release/libreboot20140716.md){.title}
|
||||
[16 July 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140711 release](/docs/release/libreboot20140711.md){.title}
|
||||
[11 July 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140622 release](/docs/release/libreboot20140622.md){.title}
|
||||
[22 June 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140611 release](/docs/release/libreboot20140611.md){.title}
|
||||
[11 June 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140605 release](/docs/release/libreboot20140605.md){.title}
|
||||
[5 June 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140309 release](/docs/release/libreboot20140309.md){.title}
|
||||
[9 March 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20140221 release](/docs/release/libreboot20140221.md){.title}
|
||||
[21 February 2014]{.date}
|
||||
|
||||
|
||||
[Libreboot 20131214 release](/docs/release/libreboot20131214.md){.title}
|
||||
[14 December 2013]{.date}
|
||||
|
||||
|
||||
[Libreboot 20131213](/docs/release/libreboot20131213.md){.title}
|
||||
[13 December 2013]{.date}
|
||||
|
||||
|
||||
[Libreboot 20131212](/docs/release/libreboot20131212.md){.title}
|
||||
[12 December 2013]{.date}
|
||||
|
||||
|
11
site/faq.md
11
site/faq.md
|
@ -700,17 +700,6 @@ Refer to:\
|
|||
It's possible to use a 16-pin SOIC test clip on an 8-pin SOIC chip, if you
|
||||
align the pins properly. The connection is generally more sturdy.
|
||||
|
||||
How do I set a boot password?
|
||||
-------------------------------------------------------------------
|
||||
|
||||
If you are using the GRUB payload, you can add a username and password
|
||||
(salted, hashed) to your GRUB configuration that resides inside the
|
||||
flash chip. The following guides (which also cover full disk encryption,
|
||||
including the /boot/ directory) show how to set a boot password in GRUB:
|
||||
[(Installing Debian or Devuan with FDE)](../docs/gnulinux/encrypted_debian.md)
|
||||
and
|
||||
[(Installing Parabola or Arch GNU+Linux-Libre, with FDE)](../docs/gnulinux/encrypted_parabola.md)
|
||||
|
||||
How do I write-protect the flash chip?
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue