Commit d7898275 authored by Dario's avatar Dario
Browse files

Updated readme, improved 19 (compile a custom kernel)

parent 0d771eca
......@@ -51,4 +51,12 @@ Also you will need to change the main structure of the src folder, like the foll
└── SUMMARY.md
```
Everything is still to be tested properly.
\ No newline at end of file
Everything is still to be tested properly.
### Troubleshooting:
It's possible that the `./mdbook serve` command return this error:
**./mdbook: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./mdbook)**
Not all distros might have the latest glibc library, so update your system or update it through [https://www.gnu.org/software/libc/sources.html](https://www.gnu.org/software/libc/sources.html)
\ No newline at end of file
......@@ -36,11 +36,11 @@ enable = true
level = 0
[language.en]
name = "Test"
name = "Parrot OS Documentation"
title = "Parrot Documentation"
description = "New documentation for Parrot OS"
[language.es]
name = "MIGRACIÓN 3.0 - ParrotDoc"
name = "Parrot OS Spanish Documentation"
title = "Parrot Documentación"
description = "Documentación para ParrotOS"
\ No newline at end of file
......@@ -23,7 +23,7 @@ If the OS you are using is Windows or MacOS, here is the link to the [VirtualBox
On GNU/Linux it is the same, but you can install it via CLI:
sudo apt install -y virtualbox
sudo apt install virtualbox
and follow **EXACTLY** the same steps to install and run Parrot via VirtualBox in your machine.
......
......@@ -42,7 +42,7 @@ For more infomations, check the [VirtualBox manual](https://www.virtualbox.org/m
**2.** Install the Guest Additions from Parrot OS repository with
sudo apt install -y virtualbox-guest-utils
sudo apt install virtualbox-guest-utils
\
......
# Compile a custom kernel "the Debian way" #
# Compile a custom Parrot kernel #
## Install build dependencies ##
To work with the linux debianized kernel, you need to have some development packages, install them with the following command
`sudo apt build-dep linux`
To work with the linux debianized kernel, you need to have some development packages, install them with the following command:
sudo apt install build-essential libncurses5-dev fakeroot xz-utils
<img src="./images/custom_kernel/custom_kernel0.png"/>
## Download the kernel source code ##
You can get the source code of the parrot kernel from different places
You can get the source code of the parrot kernel from different places:
\
\
### apt install ###
run
`sudo apt update`
to refresh the sources list, then launch
sudo apt install linux-source
to download the kernel source code in `/usr/src`.
<img src="./images/custom_kernel/custom_kernel1.png" width="70%"/>
\
\
### apt source ###
## APT INSTALL ##
edit `/etc/apt/sources.list.d/parrot.list` and make sure that the **deb-src** directive is *not* commented (remove the ''#'' character if present).
run `sudo apt update` to refresh the sources list
<img src="./images/custom_kernel/custom_kernel2.png" width="70%"/>
launch `sudo apt install linux-source` to download the kernel source code in `/usr/src`
run `sudo apt update` to refresh the sources list and launch
## APT SOURCE ##
sudo apt source linux
edit `/etc/apt/sources.list.d/parrot.list` and make sure that the deb-src directive is not commented (remove the ''#'' character if present)
to download the source code of the linux kernel from our repository.
run `sudo apt update` to refresh the sources list
<img src="./images/custom_kernel/custom_kernel3.png"/>
launch `apt source linux` to download the source code of the linux kernel from our repository
\
\
## GIT ##
### git ###
make sure you have git installed with `sudo apt install git`
make sure you have git installed with
launch `git clone https://github.com/parrotsec/linux-parrot.git` to download the parrot kernel source in the current folder
sudo apt install git
then launch
git clone https://nest.parrotsec.org/packages/kernel/linux.git
to download the parrot kernel source in the current folder.
## Configure the source code ##
Open a terminal window and enter the kernel source, then run
Open a terminal window and `cd` into the folder where is stored the kernel source, then run
make menuconfig
`make menuconfig`
<img src="./images/custom_kernel/custom_kernel4.png" width="70%"/>
This command will open the kernel configuration editor where you can take a look at the modules available, select or deselect them, decide if to include them as hard-coded in the base image or as a dynamically loadable module, and you can change the settings of most of them.
## Install hardware-info ##
By running
<code>sudo apt install hwinfo</code>
<img src="./images/custom_kernel/custom_kernel5.png"/>
## Install some useful utilities ##
An utility that can help you to configure your kernel is hwinfo, install it by running:
sudo apt install hwinfo
so that you can safely remove support for hardware you're not going to use on your machine.
This will make your kernel lighter and faster.
Once it is done you can save the configuration and proceed with the next step.
## Compile the deb packages ##
(Another program that can help you is inxi, install it with `sudo apt install inxi` and use from terminal `inxi -F` to display a summary about your installed hardware and software)
## Compile the .deb package ##
Compile the kernel with the following commands:
Compile the kernel with the following commands
make clean && make deb-pkg
<code>
make clean && make deb-pkg
</code>
## Install the new kernel packages ##
Once it's done, install the resulting packages with the following command
Once it's done, install the resulting packages with the following command:
sudo dpkg -i ../linux-{image,headers}-*.deb
then reboot the system
sudo reboot
<code>
sudo dpkg -i ../linux-{image,headers}-*.deb
</code>
For more information, check [The Debian Administrator's Handbook](https://debian-handbook.info/browse/stable/sect.kernel-compilation.html)
......@@ -22,7 +22,9 @@
- [Nvidia driver install](<./16.- Nvidia driver install.md>)
- [Metasploit Framework](<./17.- Metasploit Framework.md>)
- [Anonsurf](<./18.- Anonsurf.md>)
-->
- [Compile a custom kernel](<./19.- Compile a custom kernel.md>)
<!--
- [Mirrors List](<./20.- Mirrors List.md>)
-->
- [General information about GNU/Linux]()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment