Hello Patrick.
Here is the explanation you're looking for, I hope.
If you use 'mount' command to list all mounted filesystems, it only
reads /etc/mtab and it prints the lines from it. It doesn't care about
the filesystems which are actually mounted, it only cares about /etc/mtab.
If you use -n option while mounting (which means: don't update mtab) or
if you try to get the list of mounted filesystems _after_
pivot_root/chroot, then 'mount' will not show you anything as /etc/mtab
is empty.
You'll have to 'cat /proc/mounts', which is always updated by kernel.
The text above should answer your first question. Now regarding
/etc/fstab: this file doesn't need to be updated, but it may be
sometimes useful to do it.
The /etc/fstab file is usually used only for 'mount' command, as a help
file for the case if you don't use full mount command.
from man: The file fstab contains descriptive information about the
various systems. fstab is only read by programs, and not written; it is
the duty of the system administrator (or a Live CD startup script) to
properly create and maintain this file.
If you have entries in fstab, then you can use (for example):
mount /mnt/diskC
command, and it will work. If you don't have this mountpoint in fstab,
mount will not work, it will complain about missing arguments.
So in general, you don't need to update /etc/fstab if you are not using
incomplete mount commands, and if you're sure any software needs fstab.
Some programs may require a fstab entry in order to mount the
filesystem, including root filesystem /, so Live CDs usually create a
dummy entry for root partition in fstab, something like 'aufs / aufs
defaults 0 0', or 'tmpfs / tmpfs defaults 0 0'.
Moreover Live CDs (like Slax) create new fstab file automatically,
depending on what filesystems and partitions are detected. It makes
things easier but is not required.
Tomas M
linux-live.org
Patrick wrote:
> [EMAIL PROTECTED] schrieb:
>> Hello Patrick,
>>
>> Patrick:
>>
>>> Now my question is .. do I have to adapt /etc/fstab at all? What also
>>> concerns me, is that 'mount' does not show any unionfs/aufs related
>>> stuff (I run-init'ed into the unionfs tho) .. is that normal? I am
>>> asking because common livecd's (knoppix, grml, etc.) always come up with
>>> a unionfs/aufs listed in the output of 'mount'.
>>>
>> mount(8) shows /etc/mtab file.
>> If the file didn't exist and you didn't install /sbin/mount.aufs, or you
>> used -n option to you mount(8), then you need to create /etc/mtab
>> manually.
>>
> Err, I used -n and /etc/mtab exists. I dont get at all, what you're
> refering to. My initial question was, wether /etc/fstab needs adaption,
> since mount does not list anything unionfs related. But still it works
> fine since I run-init (switch_root - pivot_root with initrd) into the
> unified filesystems.
>> I suggest you to execute this command just after mounting aufs.
>> # cp /proc/mounts /etc/mtab
>> Additionally, if you use 'mount -o remount,... /your/aufs' later, it is
>> recommended to install mount.aufs.
>>
>> Current aufs produces all branch paths to /proc/mounts.
>> Therefore if you have a lot of branches, you may meet a limitation of a
>> page which is usually 4k bytes. mount(8), /etc/mtab, /proc/mounts have
>> this limitation.
>> I will try sysfs and modify aufs entry in /proc/mounts in a few weeks.
>>
>>
>> Junjiro Okajima
>>
>>
> As I said .. what I do is mount the rootfs .. then mount a new tmpfs ..
> then mount the unionfs (tmpfs overlays rootfs) .. then I run-init into
> the unified filesystems. Still mount doesnt show any unionfs/aufs
> related stuff (I tried with aufs and unionfs - same behavior). 'mount''s
> output is the same as if I wouldnt have used a unionfs at all .. (I also
> didnt change /etc/fstab, since I dont know wether it's required)... So
> what is wrong .. or to be more specific what is not wrong with it? :)
>
>
> regards,
> Patrick
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV