You are not logged in.

#1 2014-09-14 11:06:53

keshara.dorakumbura
Member
Registered: 2014-09-14
Posts: 15

ArchLinux mounts filesystem with no entries in /etc/fstab

I have successfully installed ArchLinux and now its working perfectly fine.

Although, while I check `/etc/fstab` entries I do not see any mounts, even the root partition is omitted. However when I execute `mount`, it shows the mount-points of each on my system.

My question is how my file-system gets mounted. Would it have something to do with systemd?

Offline

#2 2014-09-14 11:42:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,890
Website

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

Can you post the output of `mount` (in code tags)?  Did you generate and fstab during the installation?  What bootloader are you using and how is it configured?  How many partitions do you have?

-- mod note: not a wiki discussion, moving to System Administration --


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-09-14 11:52:08

keshara.dorakumbura
Member
Registered: 2014-09-14
Posts: 15

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

01. Here is the output of `mount`
>[root@archlinuxVM ~]# mount
>proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
>sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
>dev on /dev type devtmpfs (rw,nosuid,relatime,size=924480k,nr_inodes=231120,mode=755)
>run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
>/dev/mapper/vg_archlinux-lv_root on / type ext4 (rw,relatime,data=ordered)
>securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)

02.  Did you generate and fstab during the installation?
>Yes

03. What bootloader are you using and how is it configured?
>BOOTLOADER is Grub & the way i configured it was `$ grub-mkconfig -o /boot/grub/grub.cfg`

04. How many partitions do you have?
> Its LVM and have two partition: one for root and one for swap.

Offline

#4 2014-09-14 12:49:19

null
Member
Registered: 2009-05-06
Posts: 398

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

I'm not sure about grub2 and auto mount of the root fs, but systemd will still automount some stuff. See # systemctl status *.mount

Offline

#5 2014-09-14 12:52:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,890
Website

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

Please see the bbcode info on how to use code tags as suggested.

But it seems nothing is mounted after boot.  The boot partition is mounted by the bootloader and only remounted by systemd (the init system) if it is in fstab.  There is no mounted swap either.  So it seems something went wrong in your creation of your fstab during the installation but it hasn't had too severe of results because you only have one necessary system partition.

Just fix your fstab to enable swap and you should be set.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2014-09-14 13:20:07

keshara.dorakumbura
Member
Registered: 2014-09-14
Posts: 15

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

@Trilby: you are dead right. With your help it solved.!

what i learn during this is that system mounts /root & /boot using the bootloader in the first place. After that they are remounted by systemd if only they exist in /etc/fstab. Due to some reason, my /etc/fstab did not generate as it should withing the installation. But the reason it works was that bootloader mounts required mount-points when the system boots.

Am i right Trilby?

Offline

#7 2014-09-14 13:36:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,890
Website

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

That seems to be the case, yes.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2014-09-14 19:06:11

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

keshara.dorakumbura wrote:

@Trilby: you are dead right. With your help it solved.!

what i learn during this is that system mounts /root & /boot using the bootloader in the first place. After that they are remounted by systemd if only they exist in /etc/fstab. Due to some reason, my /etc/fstab did not generate as it should withing the installation. But the reason it works was that bootloader mounts required mount-points when the system boots.

Am i right Trilby?

No, this is not entirely correct.

The bootloader mounts /boot only to exec the kernel which then finds initrd. After that, /boot is _not_ mounted (and you don't have it mounted either). In fact, for your system to work, /boot partition does not even need to exist. For example, on my machine:

$ ls -hl /boot
total 0
$ mountpoint /boot
/boot is not a mountpoint
$ mount | grep boot
$

If you want /boot to be mounted at all times, you must specify it in fstab.

The / partition is mounted from the initramfs (initramfs-* files in your /boot). This is necessary to exec systemd from there. Now, systemd keeps / mounted, so you don't need an entry for it in fstab (unless you want specific mount options).

Other filesystemd that you are seeing are pseudo-filesystems, mounted automatically by systemd. The reason why your fstab was empty is probably because you ran genfstab > /etc/fstab, not your target installation.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#9 2014-09-16 02:46:25

keshara.dorakumbura
Member
Registered: 2014-09-14
Posts: 15

Re: ArchLinux mounts filesystem with no entries in /etc/fstab

@Leonid.I

100% correct answer. Thank you for the info.

Offline

Board footer

Powered by FluxBB