Linux system partition
Linux can be divided into 3 partitions by default, which are boot partition, swap partition and root partition.
In linux, boot is the partition that stores the kernel and the files used in the boot process, which are some of the core files used in booting linux; included in boot are the configuration files of the system Kernel, the directory of the boot manager GRUB, the main source of module supply at boot time the Initrd file and the vmlinuz files.
The /boot partition is the operating system’s kernel and the files used during the boot process. It is generally a zone required by versions a few years ago, and is about 100MB in size, but none of the newer versions now require a separate division of this partition, which means that you can leave /boot alone altogether.
There are only two basic partitions required to install Linux. The root partition and the swap partition. If your disk space is large enough, you can divide more space for the root partition, and you can also create new directories on your desktop for frequently used directories, such as downloaded software packages, which will not affect the speed of your entry into the Linux system, but of course, this requires you to have a large enough root partition.
SWAP is a virtual memory partition under LINUX, its function is to virtualize the disk space (which is also known as SWAP partition) into memory after the physical memory is used up
It is similar to the role of the swap file in Windows, but it is a section of contiguous disk space, and it is not visible to the user.
It’s important to note that although the SWAP partition can act as “virtual” memory, it is much slower than physical memory, so if you need more speed, you can’t rely on SWAP, and the best thing to do is to increase the amount of physical memory. the SWAP partition is only a temporary solution.
linux root partition is the meaning of the system partition, all the things in the system are stored in the root partition, also known as the root partition; Linux is a tree file system, the root partition is the root node, any directory files will be hung below the root node, and linux only a root, no matter how many partition of the hard disk, will be these partitions. No matter how many partitions you have on your hard disk, you have to mount those partitions under the root directory before you can use them.
The so-called root partition is, frankly, the system partition, the root partition, where everything goes.
Linux is a tree file system, and the root partition is its root node, and any directory files will hang below the root node.Linux has only one root. You can partition your hard disk, however, the partition device must be mounted to a specified location under the linux root directory, such as /usr,/var,/home, etc. If you want to operate on the partition, it will be mounted to the root directory. If you want to operate the partition, you can only do it in the directory where the partition is mounted. So, no matter how many partitions you have on your hard disk, you need to mount them in the root directory before you can use them.
What are the types of disk partitions for linux system?
1. / partition. Used to store system files.
2. swap, or swap partition, is also a file system that serves as virtual memory for Linux. Under Windows, virtual memory is a file: pagefile.sys; while under Linux, virtual memory requires the use of a separate partition, the purpose of which is said to be to improve the performance of virtual memory.
3. /home: is where the user folder is located. If you partition /home independently, you can use LiveCD to boot to your own files even if Ubuntu doesn’t boot.
4. /boot: contains the kernel of the operating system and files to be used during the boot process.
Many older tutorials tell the user to mount a separate partition about 100MB in size on the /boot directory, and recommend placing that /boot at the front of the hard disk – before the 1024 columns. In fact, that’s a relic from the days when Lilo couldn’t boot an OS kernel after 1024-pillars. Of course, there are those who say that the advantage of mounting /boot independently is that it allows multiple Linuxes to share a single /boot.
Actually, there’s no need to partition /boot independently, for either of these reasons. First of all, Grub can boot a Linux kernel 1024 columns back, and secondly, even if you have multiple Linux installations, it’s perfectly fine not to share /boot because the /boot directory is usually very small, about 20MB, and a 100MB partition is a waste of time, as well as fragmenting your hard disk in a way that’s not easy to manage.
Additionally, if you have two Linux systems sharing a single /boot, every time you upgrade your kernel, it will cause conflicts with Grub’s configuration files, which can lead to unnecessary problems. Also, not having a separate /boot partition only takes up about 20MB or so of space in the root directory, and doesn’t affect root usage at all.
How to manually partition when installing a linux system
1. First open the linux system. Then use fdisk-l to query the disk information.
2. Then create a disk partition. The command is fdisk disk device name.
3. Then press m to see the command parsed. Then press n to create a disk.
4. Then use the p command to create the primary partition. Then set the serial number of the partition.
5. Then set the size of the disk. Then use t to change the partition format of the disk.