1

I understand the Linux boot process fairly well. But the first time installation is pretty vague to me.

How does the root file system (/etc, /bin, /sbin etc.) get created in the disk with the binaries that are required for the basic functioning of the system ?

is the following correct (on typical x86/linux machine) ?

BIOS would load the bootloader from the installation CD. And the boot loader would load the kernel image from the CD and also copies the initrd to a ramfs. This is nothing but the root file system but fully in the RAM. When the kernel take control it does the basic device initializations and if it sees the disks are unformatted it will prompt for file system type to be created, create the fs and then copy the initrd filesystem to the disk as part of the installation.

2

There's tools with each distribution (usually GParted or a variant) that the installer process uses to create the filesystem and mount the proper devices where they need to go. Then, a series of scripts does the rest.

Linux uses a "Live OS" method to install - it copies essentials to boot a stripped-down version of the OS to run the installer. This is why you can "try before you install" many popular distributions without affecting any existing operating systems.

So, think of the steps this way:

CD/USB boot -> GRUB (bootloader) -> Live OS -> Installer -> GParted/Install Steps

  • The tools you are referring to are they run before the OS gets the control from the boot loader ? Or is it the kernel itself that is creating the file system on the raw disk ? – Manohar May 7 '14 at 1:38
  • It's part of the live OS that is booted by the bootloader (grub). – Nathan C May 7 '14 at 1:48
  • Isn't the live OS a relatively new thing. Even today some OSs don't support that. How can the installer be part of the live OS ? – Manohar May 7 '14 at 1:52
  • Even if it doesn't seem that way, every "installer" is a bare-bones operating system under the hood. Windows uses WindowsPE to install itself, Linux uses a stripped version of whatever distro it happens to be. – Nathan C May 7 '14 at 1:54
  • I didn't quite get it still. Let me read up on what gparted does. Thanks. – Manohar May 7 '14 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.