LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-26-2003, 12:43 PM   #1
sannik
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
mount not writing to /etc/mtab if is symlink?


Just that...

[root@adia:~]# cat /etc/mtab
/dev/hda1 / xfs rw 0 0
proc /proc proc rw 0 0
/dev/hda2 /usr xfs rw 0 0
/dev/hda6 /pub ext3 ro,noexec,noatime 0 0
/dev/hdb2 /pub/Images xfs rw,noexec,nosuid,noatime 0 0
/dev/hdb3 /pub/httpd xfs rw 0 0
tmpfs /dev/shm tmpfs rw,size=16m 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda5 /home ext3 rw,nosuid 0 0
/dev/hdb1 /var xfs rw 0 0
sysfs /sys sysfs rw 0 0
[root@adia:~]# cp /etc/mtab /var/lib/misc/mtab
[root@adia:~]# rm /etc/mtab
[root@adia:~]# ln -s /var/lib/misc/mtab /etc/mtab
[root@adia:~]# cat /etc/mtab
/dev/hda1 / xfs rw 0 0
proc /proc proc rw 0 0
/dev/hda2 /usr xfs rw 0 0
/dev/hda6 /pub ext3 ro,noexec,noatime 0 0
/dev/hdb2 /pub/Images xfs rw,noexec,nosuid,noatime 0 0
/dev/hdb3 /pub/httpd xfs rw 0 0
tmpfs /dev/shm tmpfs rw,size=16m 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda5 /home ext3 rw,nosuid 0 0
/dev/hdb1 /var xfs rw 0 0
sysfs /sys sysfs rw 0 0
[root@adia:~]# umount /sys
[root@adia:~]# cat /etc/mtab
/dev/hda1 / xfs rw 0 0
proc /proc proc rw 0 0
/dev/hda2 /usr xfs rw 0 0
/dev/hda6 /pub ext3 ro,noexec,noatime 0 0
/dev/hdb2 /pub/Images xfs rw,noexec,nosuid,noatime 0 0
/dev/hdb3 /pub/httpd xfs rw 0 0
tmpfs /dev/shm tmpfs rw,size=16m 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda5 /home ext3 rw,nosuid 0 0
/dev/hdb1 /var xfs rw 0 0
sysfs /sys sysfs rw 0 0
[root@adia:~]# mount /sys
[root@adia:~]# rm /etc/mtab
[root@adia:~]# cp /var/lib/misc/mtab /etc/mtab
[root@adia:~]# cat /etc/mtab
/dev/hda1 / xfs rw 0 0
proc /proc proc rw 0 0
/dev/hda2 /usr xfs rw 0 0
/dev/hda6 /pub ext3 ro,noexec,noatime 0 0
/dev/hdb2 /pub/Images xfs rw,noexec,nosuid,noatime 0 0
/dev/hdb3 /pub/httpd xfs rw 0 0
tmpfs /dev/shm tmpfs rw,size=16m 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda5 /home ext3 rw,nosuid 0 0
/dev/hdb1 /var xfs rw 0 0
sysfs /sys sysfs rw 0 0
[root@adia:~]# umount /sys
[root@adia:~]# cat /etc/mtab
/dev/hda1 / xfs rw 0 0
proc /proc proc rw 0 0
/dev/hda2 /usr xfs rw 0 0
/dev/hda6 /pub ext3 ro,noexec,noatime 0 0
/dev/hdb2 /pub/Images xfs rw,noexec,nosuid,noatime 0 0
/dev/hdb3 /pub/httpd xfs rw 0 0
tmpfs /dev/shm tmpfs rw,size=16m 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda5 /home ext3 rw,nosuid 0 0
/dev/hdb1 /var xfs rw 0 0
[root@adia:~]# mount /sys

Why would mount not write to mtab if it were a sym link?
 
Old 07-27-2003, 12:18 AM   #2
sannik
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Well, the /etc/mtab is hard coded in glibc, but its open source so I changed it to point to the place on /var I wanted it to go, recompiled, recompiled util-linux (mount), and it works fine. I left /etc/mtab as a symlink in case other apps want to read it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
/etc/mtab problem = can't mount anything--cdrom,floppy,etc. theo444 Slackware 11 08-23-2005 01:57 AM
mount: can't find /dev/hda1 in /etc/fstab or /etc/mtab timalan Suse/Novell 24 08-20-2005 09:41 AM
Symlink or Mount or Another Technique? jalperin Linux - Newbie 1 08-26-2004 06:43 PM
mount & cd-writing problems archish Slackware 2 11-08-2003 06:45 PM


All times are GMT -5. The time now is 12:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration