- linux booting, 6 steps, which include bios, mbr, grub, kernel, init, runlevel
- bios determines the OS to boot
- BIOS executes the MBR
- MBR - finds the bootable partition and allows the selection of kernel
- MBR is less than 512 bytes, and it stores every OS information.
- MBR is the first sector of the bootable device
- MBR executes the GRUB Boot loader
- init executes run level programs
- init and runlevel are performed by systemd in latest Linux operating system such as RockyLinux
- GRUB contains the kernel information
- /fstab - consists of the information which drive or device to be mounted
- fstab = file system tab
- GRUB boots from /boot
- the first partition, sda1
- The first thing it mounts is the / partition
- init is the first program which is executed by the kernel
- systemctl is used for starting, restarting the services
- service can also be used
- initrd or initramfs is a temporary file system for root until the kernel is booted. To mount the /
- Linux consists of the run levels
- 0. halt
- 1. single user mode
- 2. multi user without Network file share
- 3. full multiuser mode (normal mode)
- 4. unused
- 5. X11 (graphical user interface)
- 6. reboot
- systemctl enable and disable - means enabling and disabling it from boot
- systemctl list-units
- to see all the list of services
- file system of linux
- XFS - supports large amount of drives, but it is slow
- EXT2, EXT3, EXT4 - less capacity supported as compared to XFS but faster - widely used
- btrfs = butter fs, suse operating system
- tmpfs = temporary file system
- zfs = zeta file system, supports storage up to zeta bytes
- ext2 does not support journaling
- but ext3 supports journaling, prevents chances of corruption when system crashes
- journaling - stores the information of changes performed in the drive
- superblock - information of inodes is stored by the superblock
- when superblock is lost, it is almost impossible to recover it
- however when block is lost, it is possible to recover it through superblock and inodes.
- inode is an individual file or a folder, no meta info is stored in inode
- to create file system:
- mkfs and tab can be pressed for finding all the file system
- lsblk = to list all the storage drives
Recent Pastes