I am creating my OS using Linux from Scratch. I have installed Puppy Linux on my current hard disk (A). I want to create LFS on second drive (B). Can someone brief me a little on how partitioning has to be done as I am not completely able to understand the manual. I am a little confused as many types of partitions have been mentioned there. Do I have to create partitions mentioned in article 2.4.1 (root,swap and grub bios) or those mentioned in 220.127.116.11 (/boot, /home, /usr, /tmp and /usr/src) or both.
It can be all the same device, or separate.
You can put the new OS into just one partition: no need for
/boot (in the old days PCs could not boot to large partitions, so one would need a small partition for boot). Other partitions are for experts only (do it if you have a reason).
You may want a separate partition for
/home, this separates the OS for your files. This makes upgrading to a new OS easier, as you can keep the
Consider installing into Virtual-box, it slower for gaming (you won't notice much for other use cases). However is is much easier as you can not break your current OS and you can run both OSs at the same time.
The root directory is the top of the hierarchy, the point where the primary filesystem is mounted and from which all other filesystems stem. All files and directories appear under the root directory /, even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system. Therefore, certain directories under / are not candidates for separate partitions. The / partition or root partition is necessary and it is the most important. The other partitions can be replaced by it.
Warning: Directories essential for booting (except for /boot) must be on the same partition as / or mounted in early userspace by the initramfs.
The /boot directory contains the kernel and ramdisk images as well as the bootloader configuration file and bootloader stages. It also stores data that is used before the kernel begins executing user-space programs. /boot is not required for normal system operation, but only during boot and kernel upgrades (when regenerating the initial ramdisk).
A separate /boot partition is only needed if your boot loader cannot access your root filesystem. For example, if the boot loader does not have a filesystem driver for it, or if / is on software RAID, a encrypted volume or a LVM volume.
If booting using UEFI boot loaders that do not have drivers for other file systems it is recommended to mount EFI system partition to /boot. A suggested size for /boot is 200 MiB unless you are using EFI system partition as /boot, in which case 550 MiB is recommended.
The /home directory contains user-specific configuration files, caches, application data and media files. Separating out /home allows / to be re-partitioned separately.
A swap partition provides memory that can be used as virtual RAM. A swap file should be considered too, as they do not have any performance overhead compared to a partition but are much easier to resize as needed. A swap partition can potentially be shared between operating systems, but not if hibernation is used.
For a detailed explanation of partitioning look here: https://wiki.archlinux.org/index.php/Partitioning