|
Kali Linux Revealed Pdf ko'rish
|
bet | 148/174 | Sana | 15.01.2024 | Hajmi | 11,68 Mb. | | #137314 |
Bog'liq Kali-Linux-Revealed-2021-editionversion-string
to
~/kernel/linux-source-
version-number
/.config
. Alterna-
tively, you can use
make architecture_defconfig
to get a reasonable configuration for
the given architecture.
• The text-based
make menuconfig
kernel configuration tool will read the
.config
file and
present you all the configuration items in a huge menu that you can navigate. Selecting an
item shows you its documentation, its possible values, and permits you to enter a new value.
When run from your kernel source directory,
make clean
will remove previously-compiled files
and
make deb-pkg
will generate up to five Debian packages. The linux-image-version
.deb
file
contains the kernel image and the associated modules.
To actually use the built kernel, install the required packages with
dpkg -i file.deb
. The “linux-
image” package is required; you only have to install the “linux-headers” package if you have some
external kernel modules to build, which is the case if you have some “*-dkms” packages installed
(check with
dpkg -l ”*-dkms” | grep ^ii
). The other packages are generally not needed (un-
less you know why you need them!).
9.5.3. Summary Tips for Building Custom Kali Live ISO Images
Official Kali ISO images are built with
live-build
10
, which is a set of scripts that allows for the
complete automation and customization of all facets of ISO image creation.
Your Kali system must be completely up-to-date before using live-build.
The Kali live-build configuration can be retrieved from Kali’s Git repositories
with two commands:
apt install curl git live-build
followed by
git clone
https://gitlab.com/kalilinux/build-scripts/live-build-config.git
To generate an updated but unmodified Kali live ISO image, simply run
./build.sh --verbose
.
The build will take a long time to complete as it will download all the packages to include. When
finished, you will find the new ISO image in the
images
directory. If you add
--variant variant
to the command line, it will build the given variant of the Kali ISO image. The various variants are
defined by their configuration directories
kali-config/variant-*
. The main image is the Xfce
variant.
There are several ways to customize your ISO by modifying live-build’s configuration directory:
• Packages can be added to (or removed from) a live ISO by modifying
package-lists/*.
list.chroot
files.
• Custom packages can be included in the live image by placing the
.deb
files in a
packages.
chroot
directory. Their installation can be preseeded with
preseed/*.cfg
files.
10
https://live-team.pages.debian.net/live-manual/html/live-manual/index.en.html
253
Chapter 9 — Advanced Usage
• You can add files to the live filesystem by putting them at their expected location below the
includes.chroot
config directory.
• You can execute scripts during the live system’s chroot setup process by installing them as
hooks/live/*.chroot
files. You can also execute scripts at boot time of the generated live
image: you must arrange for them to be installed in
/usr/lib/live/config/
XXXX
-
name
, for
example by relying on the
includes.chroot
config directory.
• The
Debian Live Systems Manual
11
is an excellent reference for live-build configuration and
testing.
Setting up encrypted and unencrypted persistence on a USB key: it’s fairly simple to create a
standard Kali Live USB installation. Although the process may seem syntactically complex, it is
relatively straight-forward to add both encrypted and unencrypted persistence to your portable
installation to significantly extend its functionality.
In the next chapter (chapter
10
, “
Kali Linux in the Enterprise
” [page 258]), we will discuss how Kali
scales to the enterprise. We will discuss configuration management and show you how to extend
and customize Kali Linux in a way that is easy to deploy whether you have a pair of machines, or
several thousand.
11
https://live-team.pages.debian.net/live-manual/html/live-manual/index.en.html
254
Kali Linux Revealed
|
| |