Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #208592

Re: pmount could perhaps be of greater utility?

From Erik Christiansen <dvalin@internode.on.net>
Newsgroups linux.debian.user
Subject Re: pmount could perhaps be of greater utility?
Date 2019-05-12 10:00 +0200
Message-ID <xWRyN-33Q-1@gated-at.bofh.it> (permalink)
References <xTWEF-um-3@gated-at.bofh.it> <xWAoh-Vc-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11.05.19 14:38, Eric S Fraga wrote:
> On Saturday,  4 May 2019 at 16:43, Erik Christiansen wrote:
> >  To provide that convenient automation, I use:
> >
> >  $ which lmount
> >  lmount is a function
> >  lmount () 
> >  { 
> >      pmount $1 `e2label $1`
> >  }
> 
> This is nice; is there an equivalent for FAT file systems?  Most of the
> devices I mount using pmount are sd cards (cameras etc.).

Pmount is just a wrapper around the standard mount program, and that
will try to guess the fs type if not specified in the invocation - as
above. That manages ext2 and ext3 without assistance, but ... Ah, yes,
with a vfat stick it gives:

$ lmount /dev/sdb1
e2label: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.

And "tune2fs -l /dev/sdb1" says the same. Quite what the automounter
does to overcome that, I haven't yet figured out. A quick rewrite of
the tiny wrapper wrapper does improve matters somewhat:

lmount () {                         # Mount a USB stick at /media/read_stick_label
   if [ mp=`e2label $1` ] ; then    # if e2label can grok the label.
      pmount $1 $mp
   else                             # When that fails, TRY TO
      pmount -t vfat $1 vfat        # use fs type as mountpoint, for now.
   fi
}

mounts vfat OK, but the "label" argument, now third, is ignored despite
being compliant with the manpage. So it falls back to mounting on
/media/sdb1 in a most wilful manner:

/dev/sdb1 on /media/sdb1 type vfat
(rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,quiet,utf8,errors=remount-ro)

Either I'm not holding my mouth right, or that looks like a bug.

> Thanks.

We're not home yet.

Erik

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-04 08:50 +0200
  Re: pmount could perhaps be of greater utility? Jonas Smedegaard <jonas@jones.dk> - 2019-05-04 13:50 +0200
    Re: pmount could perhaps be of greater utility? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-05-06 15:10 +0200
      Re: pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-06 16:00 +0200
        Re: pmount could perhaps be of greater utility? David <bouncingcats@gmail.com> - 2019-05-07 02:20 +0200
          Re: pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-07 06:10 +0200
            Netiquette [Was: Re: pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-07 14:50 +0200
              Re: Netiquette [Was: Re: pmount could perhaps be of greater utility? rhkramer@gmail.com - 2019-05-07 15:10 +0200
                Re: Netiquette [Was: Re: pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-08 05:30 +0200
          Re: pmount could perhaps be of greater utility? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-05-07 14:20 +0200
            Re: pmount could perhaps be of greater utility? David <bouncingcats@gmail.com> - 2019-05-19 07:10 +0200
          Shell game? was Re: pmount could perhaps be of greater utility? David Wright <deblis@lionunicorn.co.uk> - 2019-05-07 21:00 +0200
            Re: Shell game? was Re: pmount could perhaps be of greater utility? KHMan <keinhong@gmail.com> - 2019-05-08 08:10 +0200
              Re: Shell game? was Re: pmount could perhaps be of greater utility? David Wright <deblis@lionunicorn.co.uk> - 2019-05-08 18:40 +0200
                Re: Shell game? was Re: pmount could perhaps be of greater utility? KHMan <keinhong@gmail.com> - 2019-05-08 20:10 +0200
    Remove nautilus to stop automounts? [Was: Re: pmount could perhaps  be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-07 13:40 +0200
      Re: Remove nautilus to stop automounts? [Was: Re: pmount could  perhaps be of greater utility? Brian <ad44@cityscape.co.uk> - 2019-05-07 14:00 +0200
  Re: pmount could perhaps be of greater utility? Eric S Fraga <e.fraga@ucl.ac.uk> - 2019-05-11 15:40 +0200
    Re: pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-12 10:00 +0200
      Re: pmount could perhaps be of greater utility? Eric S Fraga <e.fraga@ucl.ac.uk> - 2019-05-12 14:50 +0200
        Re: pmount could perhaps be of greater utility? Erik Christiansen <dvalin@internode.on.net> - 2019-05-12 15:40 +0200
          Re: pmount could perhaps be of greater utility? Eric S Fraga <e.fraga@ucl.ac.uk> - 2019-05-12 21:30 +0200
          Re: pmount could perhaps be of greater utility? David Wright <deblis@lionunicorn.co.uk> - 2019-05-15 06:40 +0200
      Re: pmount could perhaps be of greater utility? Eric S Fraga <e.fraga@ucl.ac.uk> - 2019-05-12 15:00 +0200
      Re: pmount could perhaps be of greater utility? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-05-13 15:10 +0200

csiph-web