1 00:00:06,559 --> 00:00:10,369 All right, so let's talk about creating file systems. 2 00:00:12,150 --> 00:00:17,800 So what is the purpose of a file system? Well, we just created a partition, but we can't do anything with 3 00:00:17,800 --> 00:00:23,449 it. If you want to do something with your partition, you need to put a file system on top of it. 4 00:00:24,589 --> 00:00:27,589 File systems are required to store files on partitions. 5 00:00:29,170 --> 00:00:32,850 Generic file systems on Linux are XFS and ext4. 6 00:00:33,719 --> 00:00:37,340 XFS is the default on Red Hat. Ext4 is the default on Ubuntu. 7 00:00:38,119 --> 00:00:43,634 You may also hear about butterfs, written as BTRFs to be pronounced as butterfs, 8 00:00:43,634 --> 00:00:49,149 which is a relatively new file system and is used on some distributions. 9 00:00:49,729 --> 00:00:54,109 But as the main distributions are using XFS and EXE for. I'm not going 10 00:00:54,109 --> 00:00:58,490 to make it too complicated and we won't talk about butterfs in this class. 11 00:00:59,630 --> 00:01:05,519 If you want to create file systems, MKFS is the main utility now 12 00:01:05,519 --> 00:01:11,409 MKFS XFS for XFS and MKFS EXE4 to create an EXE4 file system. 13 00:01:11,409 --> 00:01:17,299 If you are interested in multi operating system support, there's also vfat and 14 00:01:17,299 --> 00:01:23,189 ntfsng which are provided for Windows support. But I'm wondering, hey, this is 15 00:01:23,189 --> 00:01:29,079 a Linux system, why would you want to have Windows support? 16 00:01:29,700 --> 00:01:36,079 You're not going to run Windows on top of your Linux system. So NTFS NG, forget about it. 17 00:01:36,799 --> 00:01:43,393 VFat is a different thing because VFAT is used for the UEFI system partition, and this UEFI 18 00:01:43,393 --> 00:01:49,986 system partition is required while booting to get essential boot information from disk. Now, if you want 19 00:01:49,986 --> 00:01:56,579 to know how that is relevant to Linux. Well, on a Linux system that is using GPT 20 00:01:56,580 --> 00:02:03,173 for booting, and GPT is a standard since 2010, so all systems nowadays should be using it. 21 00:02:03,173 --> 00:02:09,766 There should be a UEFI system partition with the system information, and this is formatted as vfat 22 00:02:09,766 --> 00:02:16,360 so that it can be read From Linux, from macOS as well as from Windows. 23 00:02:16,840 --> 00:02:21,580 That's an industry standard. So you need this VFAT partition and you will also see it. 24 00:02:22,210 --> 00:02:26,259 Now let me show you the current file systems in use, and let me also show 25 00:02:26,259 --> 00:02:30,310 you how we can create a file system on the partition that we just created. 26 00:02:31,349 --> 00:02:35,680 All right, so we want to show these current file systems. 27 00:02:36,180 --> 00:02:42,475 Well, I'm going to use sudo, mount, pipe, grab everything starting with a slash and 28 00:02:42,475 --> 00:02:48,770 there we can see that we have an LVM logical volume which is xfs. 29 00:02:49,750 --> 00:02:55,180 We have partition number two mounted on boot, which is also xfs. We have 30 00:02:55,180 --> 00:03:00,610 partition number one, which is the EFI partition which is mounted as vfat. 31 00:03:01,490 --> 00:03:06,199 All right, this is the existing partitions, we need to do something with the new partition. 32 00:03:06,800 --> 00:03:11,824 So sudo mkfs xfs on dev nvme0n1p4 because 33 00:03:11,824 --> 00:03:16,849 that's the name of the new partition. 34 00:03:18,490 --> 00:03:20,430 Hey, this is kind of unexpected. 35 00:03:21,169 --> 00:03:27,579 What do we see here? Well, we see that it has an error unexpected device. That's because of 36 00:03:27,579 --> 00:03:33,990 this weird behavior that the disk that I am expecting to be NVMe 0n1 has become NVMe 0n2. 37 00:03:36,590 --> 00:03:41,550 So I need to change my command and do it on disk number two. 38 00:03:42,210 --> 00:03:48,460 Now, as I know that these disk names are subject to change, that's something that we need 39 00:03:48,460 --> 00:03:54,710 to carefully consider in the next lesson when we are going to make for persistent mounts. 40 00:03:55,569 --> 00:04:00,039 For now, all is good and we now have a file system on this partition.