📜 ⬆️ ⬇️

Own distribution based on Debian Linux

It took some work to make a custom distribution. The distribution should fit on one disk and contain everything that is required for a simple desktop + some trivia.

So let's go.


First we need to establish a reference system. We take from the site debian.org distribution. For example NetInstall. Download and install on the machine (or on a virtual machine, to whom it is more convenient). For example, I put the base system, and then install everything by hand.
')
So. The system is installed. Install the required packages.

apt-get install gnome gdm openoffice.org xfonts-base xorg xserver-xorg

After install the package "apt-move"
open the settings /etc/apt-move.conf and specify in the LOCALDIR paragraph the path to the place where we will store the future distribution. My path was specified in / home / debian. Save the config and execute the apt-move update command

The path above (/ home / debian / distrib) has a pool directory. It will contain packages that end up on the disk.

Mount the CD (it still has the Debian NETINSTALL drive in it) and copy everything on it to the / home / debian / distrib directory.
Download override. <Distribution> files from debian.org servers. I for example took from ftp.fr.debian.org/debian/indices . Version of the current distribution of etch, and therefore download the files with the names override.etch. *
Unzip the gunzip and put for example in / home / debian / indices
In the / home / debian directory, create a file called apt.conf and fill it with text, like wiki.debian.org/DebianCustomCD/PoolAptConf . In the same directory, create a file with the name of the distribution (for example, mycd.conf) and fill it in with the example from wiki.debian.org/DebianCustomCD/PoolPackagesGzConf
Run apt-ftparchive -c apt.conf generate mycd.conf
And now the most important thing. in the /home/debian/distrib/install.i386 directory create the preseed.conf file
We include instructions for the Debian installer.

Example of filling in the preseed.conf file
#
di netcfg/choose_interface select auto

#
#di netcfg/choose_interface select eth1

# DHCP( , DHCP )
di netcfg/dhcp_timeout string 100

# DHCP ,
di netcfg/dhcp_failed note
di netcfg/dhcp_options select Configure network manually

#
di netcfg/get_hostname string office
di netcfg/get_domain string local

#
di clock-setup/utc boolean true
di time/zone string Europe/Moscow

#
tasksel tasksel/first multiselect standard

# :)
#tasksel tasksel/first multiselect standard, web-server
#tasksel tasksel/first multiselect standard, kde-desktop

#
di pkgsel/include string ssh xorg xserver-xorg gdm gnome openoffice.org xfonts-base xfonts-100dpi xfonts-75dpi xfonts-encodings xfonts-scalable xfonts-utils

#
di finish-install/reboot_in_progress note



Save this file and open it for editing isolinux / isolinux.cfg
in it we add
LABEL installseed
kernel /install.386/vmlinuz
append vga=normal file=/cdrom/install.386/preseed.cfg initrd=/install.386/initrd.gz --

go to the directory / home / debian / distrib
execute the command
find . -type f -print0 | xargs --null md5sum > md5sum.txt
and actually begin the process of creating an ISO image:
genisoimage -r -V "Debian 4.0 r4a i386 custom" -o /home/debian/debiancustom_40.iso -J -cache-inodes -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /home/debian/distrib

After the program is finished, you can find the .iso file with our custom distribution in / home / debian /. Now either write it to a blank or put it on a virtual machine.

ps hope I forgot nothing :)

Source: https://habr.com/ru/post/40619/


All Articles