[svlug] Re: Need a shell/bash loop over each partition and execute dd && rm

Eric De Mund ead-svlug at ixian.com
Tue Aug 2 12:58:13 PDT 2011


Jesse, All,

] Robert Hajime Lanning <lanning at lanning.cc>:
] # hopefully BSD uses the same output format for mount(8)

Jesse Monroy <jesse650 at gmail.com>:
] No. BSD differs slightly. Output below.
] ===FreeBSD 7.2-RELEASE===
] ...
] /dev/ad4s1d on /var (ufs, local, soft-updates)
] ...
] ===Ubuntu 10.10===
] ...
] /dev/sda1 on /host type fuseblk
] ...

I notice on CentOS 5.6 and Debian 6.0.2 that mount(8) output includes
the word "type" while the /etc/mtab files do not. (And FreeBSD mount(8)
output, above, doesn't seem to include the word "type".)

So I wonder if working directly from /etc/mtab rather than from mount(8)
output might be the way to go.

For comparison:

CentOS 5.6 /etc/mtab:
    /dev/mapper/VolGroup00-LogVol01 / ext3 rw 0 0
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    devpts /dev/pts devpts rw,gid=5,mode=620 0 0
    /dev/sda1 /boot ext3 rw 0 0
    tmpfs /dev/shm tmpfs rw 0 0
    none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
    sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
    edemund /media/sf_edemund vboxsf gid=501,rw 0 0

RHEL 5.5 /etc/mtab:
    /dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    devpts /dev/pts devpts rw,gid=5,mode=620 0 0
    /dev/sda1 /boot ext3 rw 0 0
    tmpfs /dev/shm tmpfs rw 0 0
    none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
    sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
    10.0.100.22:/vol/vol3/ixx /ixx nfs rw,addr=10.0.100.22 0 0
    10.0.100.77:/vol/vol1/common /shared/common nfs rw,addr=10.0.100.77 0 0
    10.0.100.77:/vol/vol1/homes /mnt/nxx/home nfs rw,addr=10.0.100.77 0 0
    10.0.100.77:/vol/vol1/vxx /mnt/nxx/vxx nfs rw,addr=10.0.100.77 0 0
    10.0.100.77:/vol/vol1/viewxx /mnt/nxx/viewxx nfs rw,addr=10.0.100.77 0 0

Debian 6.0.2 /etc/mtab:
    /dev/mapper/tigre-01--root / ext3 rw,errors=remount-ro 0 0
    tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
    udev /dev tmpfs rw,mode=0755 0 0
    tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
    devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
    /dev/sda1 /boot ext3 rw 0 0
    /dev/sdb1 /disk2 ext3 rw 0 0
    /dev/mapper/tigre-03--home /home ext3 rw 0 0
    rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
    fusectl /sys/fs/fuse/connections fusectl rw 0 0
    nfsd /proc/fs/nfsd nfsd rw 0 0

SunOS 5.10 /etc/mnttab (excerpt, hand-wrapped at column 72):
    /dev/dsk/c0t0d0s6       /export ufs     rw,intr,largefiles,logging,\
    xattr,onerror=panic,dev=800026       1304717967
    /dev/dsk/c0t0d0s4       /opt    ufs     rw,intr,largefiles,logging,\
    xattr,onerror=panic,dev=800024       1304717967

CYGWIN_NT-6.1 /etc/mtab:
    C:/cygwin/bin /usr/bin ntfs binary,auto 1 1
    C:/cygwin/lib /usr/lib ntfs binary,auto 1 1
    C:/cygwin / ntfs binary,auto 1 1
    C: /cygdrive/c ntfs binary,posix=0,user,noumount,auto 1 1

Cheers,
Eric
--
To invent, you need a good imagination and a pile of junk. --Thomas Edison

Eric De Mund   |  Y!: ead0002
ead at ixian.com  |  ICQ: 811788





More information about the svlug mailing list