Answer the question
In order to leave comments, you need to log in
How is Linux installed?
Windows 2000 and Windows XP install in a special way and MUST require the native installer from the .iso image. All Windows since Vista are stored in the install.wim file and can be installed via DISM or its equivalents without using the windows installer.
How is Linux installed? When booting from bootable media, the LiveCD environment of the Linux distribution is launched and the OS installer is launched. What's next? Where does the installer get the files that then appear on the hard drive, and how does it copy them?
Answer the question
In order to leave comments, you need to log in
When booting from bootable media, the LiveCD environment of the Linux distribution is launched and the OS installer is launched. What's next? Where does the installer get the files that then appear on the hard drive, and how does it copy them?takes from him. There is also a netinstall option, when iso contains only a boot environment, a kernel and a minimal set of utilities, and packages are downloaded over the network during the installation process.
For debian-based systems (*.deb packages) there is a great tool called dabootstrap, this is a console utility that allows you to create a minimal working system of the selected distribution and architecture in the specified directory. Actually, it is used by graphical installers.
Those. to install the system you need to:
* prepare the place where the system will be installed (raid, encryption, partition the disk, select and format the file system, mount, maybe over a network or iscsi and 100500 more options)
* prepare a minimal system using debotstrap, dropping the necessary packages as desired, this can be done later
***** enter the installed system by making a chroot (before that, mount /dev /sys /proc there with bind type)
* add the kernel with the initramfs startup image to the installation (by installing, for example, the linux-image-generic package, but there are optimized options, for example, to run inside kvm or signed with a digital signature for locked bios, etc.)
* configure the bootloader (for example, grub or if over the network pxe or whatever you want)
* configure user, passwords, network, etc.
* reboot
ps A great way to understand what's going on is to try installing gentoo, there are very detailed instructions including setting up and building the linux kernel from source, ie. if you manage to complete this quest, understanding what is happening at every step, you will comprehend the zen of linkus (for example, you will realize the power of tuning a system for a task, when weak machines with a 10-15-year lifespan can shine in a new light with the latest versions of software, for example only with gentoo I was able to revive the eeepc900 with 1gb ram and a weak disk, even without kernel tuning, the graphics system required only 50mb of RAM, awesome de, the rest was enough for the browser and player, the latter was launched by the plugin when trying to watch YouTube)
In, well, finally Gleb woke up :)
And he takes it from the disk. Especially in case you don't have a tyrnet. Of course, there are perverted options when you have only a small installer, and all the packages reach from the network, but usually the packages are put right there on the disk with the distribution - you think why the distributions are so plump, 4 gigs or more?
It depends on the installer itself. For example, I am using Mageia Linux.
There, if you boot from a CD (or a bootable USB flash drive of the distribution), you can start the live system and then install it, or you can immediately start the installation, or select rescue (system restore).
However, this is not the only way. I keep a lot of OS on my flash drive for installation and a bunch of software, and the grub for dos bootloader is also there. And it is into it that I integrate all the other installers of all systems. For mageia linux 7, for example, this is not very difficult, you need to have the x86_64 folder in the root of the flash drive, and a couple more, in addition to the bootloader, and write a couple of lines in the bootloader. However, the installer is somewhat not designed for this, because when you start the installation of the system, it asks where are the files, in fact, or .iso? Well, I show him this folder, and everything is installed further without problems.
In other installers it may be completely different. But the essence is the same - the installer either takes the files from where the creators prescribed it in advance, or asks, or takes the path from the config. Further installation consists of setting some parameters, type, language, switching layout, etc., and copying files, taking into account the specified parameters, of course, before this there should usually be a tool for operations with partitions, so that you can create a partition (s ) and specify where to put it, and what exactly to put it (in Linux, you often need to set a partition under the root of the system, under /home, (boot, var... and anything else you can also scatter usually), or leave the choice automatically). At the end, the bootloader is written, or the existing one is modified (if it is compatible).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question