Welcome to the Linux Foundation Forum!

Question(s) about proper order when creating partition, filesystem and mounting (labs 17 and 18).

I am a bit confused as to the correct/proper order in setting up a partition, putting a file system on it and then mounting it. In the chapter 17 labs. It seems that we create the image file, associate with a loop device, partition the loop device, put filesystems on the loop device partitions, and then mount them.

In Lab 18.2.. It looks like we create the image file, THEN put a file system on the imagefile 3 times (3 different partitions?), then mount it as a loop device.

Can you clarify what path is correct? I found it a bit confusing and lacking of explanation.

Comments

  • coop
    coop Posts: 915

    In 18.2 you are not using 3 different partitions, you are doing mkfs 3 times on the same partition, with different options so you can look at the output to see the differences. If you do the steps as specified you will see this; there is only one partition involved. Thus there is no conflict between the labs in 17 and 18.

  • Okay then a follow up question. What is the part of the parted command (17.3 Number 3) with mkpart primary ext4 doing vs. a few steps later(Number 6) doing mkfs?

  • coop
    coop Posts: 915

    mkpart is involved in creatiing the partition and configuring it. It does not create a filesystem. These are two different steps and one has to follow the other, it cannot be the other order

Categories

Upcoming Training