I'm running slackware 14.0 linux.
I was recently doing an open office document and sent emails out and then my internet was cutting out then after a bit I got hinted that my disk was full then I cleared up some space. But what I don't understand is how is it possible that I can use my computer with the root filesystem mounted but it doesn't automatically show it with the mount command?
Here is an extract when I execute dmesg while looking for info about the root partition (sda2):
[ 4.293905] sd 2:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[ 4.294372] sd 2:0:0:0: [sda] Write Protect is off
[ 4.294434] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 4.294477] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.307345] sda: sda1 sda2 sda3 sda4
[ 4.307942] sd 2:0:0:0: [sda] Attached SCSI disk
[ 4.322793] EXT3-fs (sda2): mounted filesystem with ordered data mode
[ 6.917851] EXT3-fs (sda2): using internal journal
[ 15.260713] EXT3-fs (sda3): using internal journal
[ 15.260774] EXT3-fs (sda3): mounted filesystem with ordered data mode
[ 15.297340] EXT3-fs (sda4): using internal journal
[ 15.297400] EXT3-fs (sda4): mounted filesystem with ordered data mode
I also ran fsck to do a thorough scan on the same partition and it found no errors.
When I ran mount, I see this but no entry for sda2:
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda3 on /80gb type ext3 (rw,commit=0)
/dev/sda4 on /disk type ext3 (rw,commit=0)
/dev/sda1 on /DOS type vfat (rw,umask=0022)
tmpfs on /dev/shm type tmpfs (rw)
/dev/ram0 on /tmp type ext2 (rw,nodev,noatime,nodiratime)
So I gave it a gamble to mount it manually and I get this error:
mount: /dev/sda2 already mounted or / busy
I looked for a running utility that might have something to do with automounting with "ps -A | grep uto" but nothing was found.
I checked /etc/fstab and I see:
/dev/sda2 / ext3 defaults 1 1
/dev/sda3 /80gb ext3 defaults 1 2
/dev/sda4 /disk ext3 defaults 1 2
/dev/sda1 /DOS vfat umask=0022 1 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
Yet what is odd is that I can still access the filesystem even though its not listed in mount and I am able to save data to it.
Also, what's even odder is that for me to find disk space info in the root filesystem I have to execute "df -h /" instead of "df -h". then it shows "-" as the filesystem. I would rather do "df -h" and see "/dev/sda2" as the filesystem with the correct free space.
Also, when I stared at the startup sequence, it indicated that everything is mounted. Only time it would unmount things is when I restart or shutdown my computer.
How do I fix this so when I execute mount with no parameters, I see the root partition already mounted along with the other partitions?
Best Answer
The
mount
command only shows you whatever is listed in/etc/mtab
. If you want to see all the mounts, you can docat /proc/mounts
. You can mount something without having it recorded in/etc/mtab
by using themount -n
option.The fact that
/etc/mtab
and/proc/mounts
are not necessarily the same thing can be useful for the shutdown scripts, as it lets them only worry about unmounting the stuff that's listed in/etc/mtab
.