Re: "/etc/vfstab" re-creation

[email protected] Thu, 3 Jun 2004 09:25:41 +1000
Newsgroups gmane.comp.security.sun
Message-ID <OFD8C5F96F.4DF3BC61-ONCA256EA7.00806AB6-CA256EA7.0080D84E@national.com.au>
The following command prints currently mounted file systems in "vfstab" 
format.
# mount -p
/dev/dsk/c0t0d0s0 - / ufs - no 
rw,intr,largefiles,onerror=panic,suid,dev=2200000
/dev/dsk/c0t0d0s3 - /usr ufs - no 
rw,intr,largefiles,onerror=panic,suid,dev=2200003
/proc - /proc proc - no dev=3ec0000
fd - /dev/fd fd - no rw,suid,dev=3f80000
mnttab - /etc/mnttab mntfs - no dev=4080000
/dev/dsk/c0t0d0s5 - /var ufs - no 
rw,intr,largefiles,onerror=panic,suid,dev=2200005
swap - /var/run tmpfs - no dev=1
/dev/dsk/c0t0d0s6 - /opt ufs - no 
rw,intr,largefiles,onerror=panic,suid,dev=2200006
swap - /tmp tmpfs - no dev=2
/dev/dsk/c0t0d0s7 - /u1 ufs - no 
rw,intr,largefiles,onerror=panic,suid,dev=2200007

Just redirect the output to a file.

Russell Page
Certified Solaris Network Administrator

Security Analyst
Security Services
National Australia Bank Limited
+61 3 9886 2401

"The concept of the atom has proved rather useful." - Lord Rutherford






"Lawrence Sica" <[email protected]>
03/06/2004 06:00 AM
 
        To:     [email protected]
        cc:     [email protected]
        Subject:        Re: "/etc/vfstab" re-creation


<quote who="[email protected]">
>
> Hi!
>
> I accidently deleted my /etc/vfstab on my solaris 2.5.1 server.  I 
copied
> the mount output to a file before rebooting. Using this file I have
> created vfstab file. However is there a way to re-create or to restore 
the
> vfstab file?
>
> Thanks in advance!
> Ali
>
>

The only thing I can think of off the top of my head is using /etc/mnttab
as a  template for recreating vfstab.

--Larry