mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 15:05:42 -05:00
vault backup: 2023-03-20 10:09:54
This commit is contained in:
parent
20115128ca
commit
7e593ac7b1
@ -15,6 +15,11 @@ Installation of linux
|
||||
- CD-ROM
|
||||
- NFS
|
||||
|
||||
> [!INFO] to boot up you need operating system
|
||||
> operating systems have different package managers
|
||||
> to install linux, you need to use linux - from bootable disk, has a small linux system which installs linux
|
||||
> these days pretty much everything is just downloaded from internet repo
|
||||
|
||||
Disk layout after installation
|
||||

|
||||
|
||||
@ -25,10 +30,16 @@ BIOS or EFI
|
||||
- BIOS tests the system, looks for and checks peripherals and then looks for a device (floppy, hard disk, or CDROM) to use to boot the system
|
||||
- Master Boot Record (MBR) is the sector that the BIOS reads in and starts when a hard disk is used to boot.
|
||||
|
||||
> [!INFO] if the hardware is base, the operating system does more work
|
||||
> hardware have their own little "OSs" which reduce load on the main OS. these are handles of the BIOS
|
||||
> [!INFO]
|
||||
|
||||
Disk Partitioning
|
||||
- A hard disk can be divided into several partitions. Each partition functions as if it were a separate hard disk.
|
||||
- If you have one hard disk, and want to have, say, two operating systems on it, you can divide the disk into two partitions. Each operating system uses its partition as it wishes and doesn't touch the other one. This way the two operating systems can co-exist peacefully on the same hard disk. Without partitions one would have to buy a hard disk for each operating system.
|
||||
|
||||
> [!INFO]
|
||||
|
||||
- Why partition a disk?
|
||||
- Easy maintenance of file systems
|
||||
- If a partition is broken, just mount the backup partition.
|
||||
@ -38,6 +49,8 @@ Disk Partitioning
|
||||
- Depends on the ultimate purpose for the system
|
||||
- Some investigation on space requirements for each filesystem is strongly recommended
|
||||
|
||||
> [!INFO]
|
||||
|
||||
- The partitioning scheme or table
|
||||
- is not built into the hardware, or even into the BIOS. It is only a convention that many operating systems follow.
|
||||
- As a safety precaution, it is a good idea to write down the partition table on a piece of paper, so that if it ever corrupts you don't have to lose all your files.
|
||||
@ -49,6 +62,7 @@ Disk Partitioning
|
||||
- 0xAA55
|
||||
- Used by BIOS to distinguish a bootable disk and a non-bootable disk
|
||||
|
||||
> [!INFO]
|
||||
|
||||
- Simple scheme
|
||||
- one linux partition, one swap partition
|
||||
@ -62,6 +76,8 @@ Disk Partitioning
|
||||
- Logical Volume Management (LVM)
|
||||
- For multiple hard drives with flexible FS space management.
|
||||
|
||||
> [!INFO]
|
||||
|
||||
Boot procedure (hard disk)
|
||||
- Boot from hard disk
|
||||
- OS dependent load program is installed on MBR
|
||||
@ -70,6 +86,8 @@ Boot procedure (hard disk)
|
||||
- OS dependent load program is installed on the boot sector of the partition of the OS
|
||||
- MAC bootloader is at /System/Library/CoreServices/boot.efi and loaded directly by EFI
|
||||
|
||||
> [!INFO]
|
||||
|
||||
Boot procedure (floppy or CD)
|
||||
- Floppy organization
|
||||
- Consists of boot sector and data area
|
||||
@ -80,6 +98,8 @@ Boot procedure (floppy or CD)
|
||||
|
||||

|
||||
|
||||
> [!INFO]
|
||||
|
||||
Boot up phases
|
||||
- BIOS
|
||||
- Boot sequence
|
||||
@ -93,12 +113,16 @@ Boot up phases
|
||||
- https://wiki.ubuntu.com/Booting
|
||||
- http://manpages.ubuntu.com/manpages/bionic/man7/boot.7.html
|
||||
|
||||
> [!INFO]
|
||||
|
||||
How Linux started?
|
||||
- When Linux kernel is loaded into memory and initialised, the init program is executed
|
||||
- init is the first process in Linux
|
||||
- Runs some start-up scripts to start up services according to the run-level
|
||||
- Runs getty program that prompts login waiting for users to login
|
||||
|
||||
> [!INFO]
|
||||
|
||||
Run levels for boot or shutdown
|
||||
- Linux run levels
|
||||
- 0 - halt
|
||||
@ -110,9 +134,13 @@ Run levels for boot or shutdown
|
||||
- 6 - reboot
|
||||
- Each level has a set of scripts for configuration
|
||||
|
||||
> [!INFO]
|
||||
|
||||
Processes for non-GUI boot-up
|
||||

|
||||
|
||||
> [!INFO]
|
||||
|
||||
More details for boot-up
|
||||
- When Linux boots,
|
||||
- The kernel mounts the root file system
|
||||
@ -124,6 +152,8 @@ More details for boot-up
|
||||
- File systems listed in /etc/fstab are mounted by command mount -a at boot
|
||||
- To mount more file systems, you should either modify /etc/fstab, or manually mount them.
|
||||
|
||||
> [!INFO]
|
||||
|
||||
What if the system can’t boot?
|
||||
- If you made a mistake, e.g. the kernel image is corrupted
|
||||
- If you accidentally removed the /etc/passwd but rebooted, what will happen? How to fix?
|
||||
@ -132,12 +162,16 @@ What if the system can’t boot?
|
||||
- Recover the file
|
||||
- Reboot without the live CD.
|
||||
|
||||
> [!INFO]
|
||||
|
||||
How to secure your machine?
|
||||
- BIOS/EFI password
|
||||
- Boot sequence
|
||||
- Protect the single user mode with a root password
|
||||
- Protect the machine in a secure room!
|
||||
|
||||
> [!INFO]
|
||||
|
||||
Post installation
|
||||
- Start a logbook
|
||||
- Backup your system: a boot and rescue CD
|
||||
@ -146,6 +180,8 @@ Post installation
|
||||
- Software installation
|
||||
- Harden security
|
||||
|
||||
> [!INFO]
|
||||
|
||||
Summary
|
||||
- Linux boot process
|
||||
- BIOS/EFI starts first after power on
|
||||
@ -154,4 +190,6 @@ Summary
|
||||
- After kernel initialization, the first process init is created (It is systemd in Ubuntu).
|
||||
- Init process read startup scripts via command shell like bash
|
||||
- Filesystems are mounted, software servers/daemons starts, and network interfaces are brought up.
|
||||
- Finally GUI (e.g. startx) is started or login shell (e.g. getty) is prompted for users to login
|
||||
- Finally GUI (e.g. startx) is started or login shell (e.g. getty) is prompted for users to login
|
||||
|
||||
> [!INFO]
|
||||
Loading…
Reference in New Issue
Block a user