2014-09-17

Archlinux VM -- Part the Third -- Making Filesystems (Like It's 1999)

In Part Two, we defined the five partitions for the VM's hard-disk.



Now we need to create the file-systems for each of these partitions.


A file-system, to be really, really general, is the particular way that files are organized on a partition. Each file-system, generally, tries to cater to a specific use-profile:


  • Some file-systems attempt to deliver the fastest read/write speeds possible
    For example: the Reiser-FS is optimized for dealing with lots of really tiny files
  • Other file-systems attempt to preserve data-integrity against sudden power-loss -- usually by maintaining a journal -- a record of "what I'm doing right now".


Read more -- more than you never knew you ever wanted to know -- about it on the Arch Wiki!


In an earlier post, we decided on the file-systems we'll be using:


  • /dev/sda1 -- /boot -- ext3
  • /dev/sda5 -- (swap) -- swap*
  • /dev/sda6 -- /home -- ext4
  • /dev/sda7 -- /     -- ext4
  • /dev/sda8 -- /var  -- Reiser-FS

* actually, the swap partition doesn't have much of a file-system -- just enough to support addressing extra RAM-pages. but we still need to create and activate it.


So -- after making sure that the partition table is written to the hard-disk, exit cfdisk.


Let's work down the list from the top: /dev/sda1

Make an ext3 file-system by executing: mkfs.ext3 /dev/sda1

You'll see an alert about a pre-existing partition table -- accept it ...

And just like that, it's done!

Like I said earlier -- ext3 is pretty simple to set up.


Moving on to the swap partition!
Execute: mkswap /dev/sda5

Again -- trivial.

While we're here, we might as well activate the swap partition, too! (Thus allowing Arch to use that hard-disk space for RAM swapping, should it prove necessary.)

So, execute: swapon /dev/sda5


We're just flying through this, ain't we?

On to /dev/sda6! Execute: mkfs.ext4 /dev/sda6

Cool. Do the same thing for /dev/sda7.


Four down, one to go!
We want to use a different file-system for this last partition.
Execute: mkfs.reiserfs /dev/sda8



The file-system program will give you a hilariously-overdramatic message about "DELTING ALL UR FILS". Smile, nod, and move along.

Well, that wasn't too bad.


So cool. We've created the file-systems for each of these partitions.

Now we need to "mount" them -- insert them as virtual directories into Arch's directory structure -- so we can install the system software.

But that'll have to wait 'til Part the Fourth.

No comments:

Post a Comment