Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Correct /etc/fstab in 12.1

  1. #1

    Default 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
    Code:
    /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:
    Code:
    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?

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,017

    Default Re: Correct /etc/fstab in 12.1

    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.

  3. #3

    Default Re: Correct /etc/fstab in 12.1

    Quote Originally Posted by john_hudson View Post
    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 .

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    21,627

    Default Re: Correct /etc/fstab in 12.1

    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?


    Code:
    
    > 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)

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    4,816
    Blog Entries
    3

    Default Re: Correct /etc/fstab in 12.1

    Quote Originally Posted by Larx View Post
    But isn't /tmp mounted as tmpfs nowadays, too?
    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.

    Quote Originally Posted by Larx View Post
    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 .
    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.
    opensuse factory; KDE 4.13.80 (main desktop);
    opensuse 13.1, KDE 4.11.5 (laptop);

  6. #6
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    11,210

    Default Re: Correct /etc/fstab in 12.1

    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

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,941
    Blog Entries
    4

    Default Re: Correct /etc/fstab in 12.1

    Quote Originally Posted by Larx View Post
    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?
    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.

  8. #8

    Default Re: Correct /etc/fstab in 12.1

    Quote Originally Posted by DenverD View Post
    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..
    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.

  9. #9
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,941
    Blog Entries
    4

    Default Re: Correct /etc/fstab in 12.1

    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.

  10. #10

    Default Re: Correct /etc/fstab in 12.1

    Quote Originally Posted by ken_yap View Post
    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.
    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.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •