Your fstab may contain the labels your OS gave to your partitions or drives, and these can be fickle. A change or update can swap them around or change their names entirely. A way to make sure this doesn't happen is to give them their UUID designations (Universally Unique Identifier). Open up a terminal, and type:
$ sudo blkid
This will output something like this:
/dev/sda1: UUID="c8646246-7e25-4ca6-a0f0-ce390a054765" TYPE="ext4"
/dev/sda2: UUID="3c612e92-477a-48f9-91a4-e886c95dbf39" TYPE="ext4"
/dev/sda3: UUID="93e3e59a-26f9-420f-af75-82ca3d75d369" TYPE="swap"
/dev/sda4: UUID="7eac36b1-2356-4657-be14-6dda81dfb46d" TYPE="ext4"
The long seemingly random strings after "UUID=" are unique and unchanging on your system, hence the stability that I mentioned earlier. You may see something different at the beggining, but that's ok because you will see the same thing in your fstab. Now, open a new terminal window but don't close this one. in the new terminal type this:
$ sudo nano /etc/fstab
Now in this window find the line that has "/dev/sda1" in it (or whatever you got in the first window). Replace the whole "filesystem" section of that line in fstab with the matching UUID from the blkid command. Do this for each disk/partition you have. Then ctrl+o to save, ctrl+x to exit nano, and done.
Friday, August 28, 2015
Adding noatime to fstab
So this is a tweak that I discovered a while ago, and it seems to me to speed things up a little bit. Boot time feels a little faster, but regular mucking about just feels slightly more responsive. The "tweak" involves the access time - the time in a files properties that it was last accessed. Every single time a file is accessed, read, or written to, it is both a read and a write event, and writing takes up a lot more cpu time than just reading alone. So we can add the noatime option in fstab to stop this silly function from wasting time! Open a terminal (I use guake usually) and type (or copy and paste):
$sudo nano /etc/fstab
Then hit enter. You will get something like this (though instead of large random strings of characters you may see labels like sda1, that's fine - though I address that here which is a separate tweak).
Now look for the partition with a mount point that's just a simple slash like this "/" without the quotes. Move over to the "options" section of that partition, and after "default" type:
,noatime
That's a comma, NOT a period, and there is no space between noatime and the comma. Now just ctrl+o to save, then ctrl+x to exit nano, and reboot to take effect. Done!
Now, some say that noatime can cause a few issues with certain programs like email and the like though I haven't had any issues myself, but if you want to be sure no issues will crop up, use:
,relatime
This means that instead of never logging any times in your files, your system will instead log the last time each file was modified/changed. This may not be necessary, but that's up to you.
$sudo nano /etc/fstab
Then hit enter. You will get something like this (though instead of large random strings of characters you may see labels like sda1, that's fine - though I address that here which is a separate tweak).
Now look for the partition with a mount point that's just a simple slash like this "/" without the quotes. Move over to the "options" section of that partition, and after "default" type:
,noatime
That's a comma, NOT a period, and there is no space between noatime and the comma. Now just ctrl+o to save, then ctrl+x to exit nano, and reboot to take effect. Done!
Now, some say that noatime can cause a few issues with certain programs like email and the like though I haven't had any issues myself, but if you want to be sure no issues will crop up, use:
,relatime
This means that instead of never logging any times in your files, your system will instead log the last time each file was modified/changed. This may not be necessary, but that's up to you.
Subscribe to:
Comments (Atom)