Correct /etc/fstab in 12.1

In 12.1, openSUSE uses tmpfs for some usage cases. I think, also for /tmp et. al. As I’ve updated from 11.4-Tumbleweed, I don’t know whether my mount still conform to current standard.

/etc/fstab reads like this

/dev/disk/by-id/ata-WDC_WDxxxx-part2 swap    swap    defaults 0 0 
/dev/disk/by-id/ata-WDC_WDxxxx-part1 /       ext4    defaults 1 1 
proc    /proc   proc    defaults 0 0 
sysfs   /sys    sysfs   noauto 0 0 
debugfs /sys/kernel/debug       debugfs noauto 0 0 
usbfs   /proc/bus/usb   usbfs   noauto 0 0 
devpts  /dev/pts        devpts  mode=0620,gid=5 0 0 

Output of “mount” shows:

devtmpfs on /dev type devtmpfs (rw,relatime,size=1985936k,nr_inodes=496484,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda1 on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /media type tmpfs (rw,nosuid,nodev,relatime,mode=755)

I switched back from systemd to sysvinit (among other reasons), because swap was not mounted. However, I am still missing swap in above list. /tmp is still mounted conventionally. Therefore: What would an /etc/fstab as created by a virgin 12.1 installation look like? What do I have to change to bring my mounts up to standard?

I don’t know about correct; fstab is non-standard in that you do not have a separate /home partition. However, all the entries appear to be ‘normal.’ Others may be able to give more specific information.

But isn’t /tmp mounted as tmpfs nowadays, too?

Concerning the seperate home-partiton: As nobody could explain me up to now why I should partition a single harddisk for a seperate home-partition, I always force YaST to forget about this stuff ;).

No, it normally isn’t. You can do that if you want. I am currently doing it.

If you use an encrypted swap, then mounting “/tmp” from tmpfs is a good idea.

I will give you the reasons that I use a separate “/home”:

  1. The most important backup is of “/home”. It is easier to separate it by having a separate partition;
  2. When I install the next version, I can keep my current “/home”.

As for swap being mounted - that won’t show up in the output of the “mount” command. If you use the command “free” it will tell you how much swap space you have and how much is used.

On 2011-11-20 19:16, Larx wrote:

> I switched back from systemd to sysvinit (among other reasons), because
> swap was not mounted. However, I am still missing swap in above list.

Swap is not ever listed as “mounted”. man swapon.

> /tmp is still mounted conventionally. Therefore: What would an
> /etc/fstab as created by a virgin 12.1 installation look like? What do I
> have to change to bring my mounts up to standard?


> Elanor:~ # cat /etc/fstab
> LABEL=Swap              swap                    swap            defaults                0 0
> LABEL=Main               /                      ext4            acl,user_xattr          1 1
> proc                    /proc                   proc            defaults                0 0
> sysfs                   /sys                    sysfs           noauto                  0 0
> debugfs                 /sys/kernel/debug       debugfs         noauto                  0 0
> usbfs                   /proc/bus/usb           usbfs           noauto                  0 0
> devpts                  /dev/pts                devpts          mode=0620,gid=5         0 0


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 11/20/2011 10:16 PM, Larx wrote:
>
> But isn’t /tmp mounted as tmpfs nowadays, too?

as far as i know (which may be wrong) /tmp is still mounted to the
partition where / lives…

>
> Concerning the seperate home-partiton: As nobody could explain me up to
> now why I should partition a single harddisk for a seperate
> home-partition, I always force YaST to forget about this stuff

and, the prime reason to do that is so you can elect to install (or
upgrade) from one version of openSUSE to another without formatting /home…

but, you are correct in that you certainly can elect to not do it that way…


DD http://tinyurl.com/DD-Caveat http://tinyurl.com/DD-Hardware
http://tinyurl.com/DD-Software
dump Flash: http://www.bbc.co.uk/news/technology-15797399

As has been stated swap does not appear in the output of mount.

/tmp could be mounted on tmpfs (which is essentially a ramdisk) but normally isn’t because files in /tmp can get large and RAM is too precious for that.

There isn’t anything particularly odd about your fstab other than your choice not to have a separate /home.

Though it’s OT: I’ve also been upgrading from one version to the next without separate home partition for years (*). I also can backup my /home-drawer quite effortlessly without separate home partition. The filesystem is the same, it’s only physically organized another way - on one and the same harddisk. For me this partitioning is a relict of past Unix days, giving nowadays no advantages but forcing an inflexible harddisk organisation onto the user. A separate home partiton only makes sense if running several Linux systems in parallel, which, however, would require a much more sophisticated partitioning than most of the users have.

Or what am I missing here?

(*) Either by system update or, to start from scratch, by removing any drawer on the harddisk but /home when booting from the installation system. Never any problem.

Some people prefer to do fresh installs rather than upgrades. In such a case you would have to do a backup and restore if you didn’t have a separate /home.

Another reason is that it prevents an overflow of /home, say by downloading too many files, from breaking system operation.

Given that entry level disks are TBs now and that only 20-30GB max is needed for /, it doesn’t impose much overhead from the partitioning.

On the flip side, with a small disk (say up to 50GB) I would certainly choose a single partition to minimise fragmentation of available space. In fact that’s what the openSUSE installer will do (don’t know the threshold).

Nearly all of the time either way will work fine. I run distros that put everything under / and I usually go with the default for the distro. So it’s not an inflexible rule, but as long as you are aware of the pros and cons.

As I said, I always achieve this by booting from the install media, removing any drawer but /home (brute rmdir or moving them into e.g. /old) and then installing. Not a big deal. The latter option even gives you an easy option to “roll back” the update.

I would reconsider that if I had a) several Linux installations in parallel or b) would administrate a system with more than a few (more or less trusted) users. For a typical home user scenario I always recommend to do only a minimum of partitioning because of the resulting inflexibility.

Which inflexibility. if I may ask? IMHO having a seperate /home (which I have from around 2002, stuff from 9 years ago still in the same place I put it, though on a new disk. A clean install, an upgrade, they leave my /home intact. That’s what I call flexible. Re. size, I learned: /home is a 500GB partition on a 1 TB disk, the other 500 contains my music, I dd’d a copy to an identical disk, which I used as a base for backups.

Seems like a lot of work to avoid an extra partition which is really insignificant in the scheme of things. Some people go further and have an alternate partition for / which they can use to test new releases and have easy rollback.

I find it advantageous to have a separate “/home”. But perhaps that is because I am a relic of the past.

I don’t have a /home partition on this machine … because my /home partition’s on another machine so it stays safe when I break this one

Seriously though, it depends on the scenario, I usually create a seperate /home but I’ve one laptop that dual boots with win 7 on which I haven’t done that, all documents, mail/browser profiles & media files etc are on an ntfs partition (shock! horror!) and accessed there from both windows and opensuse

I suppose the ‘right’ way is whatever the individual finds most convenient

Therefore I’m quite surprised how often I got the answer that it’s unnatural not to have a separate home-partition, no discussion allowed. I’ve set up my set of servers in former times and always chose the partitioning schema which was best fit for the scenario. For a home user I consider it a waste of harddisk space without real-life advantages. But that’s up to everyone…

Nothing is natural or unnatural, it all depends on the situation and usage. For me a few GB of disk space is nothing, given the sizes of disks nowadays, probably worth less than a dollar. Therefore I prefer the separate /home when it is offered, but neither this scheme nor its converse is one that I pursue with zeal since I know how to deal with either one.

In fact rather than labelling as an “inflexible Unix relic”, be glad that both schemes and many more are possible in Linux/Unix. I’d rather have this relic than the other relic of C: D: etc.

ken yap wrote:

>
> Larx;2408149 Wrote:
>> Therefore I’m quite surprised how often I got the answer that it’s
>> unnatural not to have a separate home-partition, no discussion allowed.
>
> Nothing is natural or unnatural, it all depends on the situation and
> usage. For me a few GB of disk space is nothing, given the sizes of
> disks nowadays, probably worth less than a dollar. Therefore I prefer
> the separate /home when it is offered, but neither this scheme nor its
> converse is one that I pursue with zeal since I know how to deal with
> either one.
>
> In fact rather than labelling as an “inflexible Unix relic”, be glad
> that both schemes and many more are possible in Linux/Unix. I’d rather
> have this relic than the other relic of C: D: etc.

I frequently test upgrades/updates by installing them to a different /
partition using a common /home, especially when the / partition contains a
lot of extra installed programs that I don’t want to re-install if something
goes south. I think the appropriate description comes from an old tv
program: “different strokes for different folks”. That’s the beautiful part
of Linux - use the tool or alignment that works for your specific case.
Your reasoning resonates with me.


Will Honea

On 2011-11-22 05:26, Larx wrote:
> For a home user
> I consider it a waste of harddisk space without real-life advantages.

It does have important real life advantages.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2011-11-20 22:16, Larx wrote:
> But isn’t /tmp mounted as tmpfs nowadays, too?

I was told that, too.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)