From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] [SOLVED] Balky mounting of external devices
Date: Sat, 22 Oct 2011 23:38:45 -0400 [thread overview]
Message-ID: <20111023033845.GA30216@waltdnes.org> (raw)
In-Reply-To: <20111022212150.2cc8ebe6@digimed.co.uk>
On Sat, Oct 22, 2011 at 09:21:50PM +0100, Neil Bothwick wrote
> This came up recently with a different subject. Your device does not have
> a partition table, instead the filesystem occupies the whole device
> (sometimes referred to as a "superfloppy" format). There's nothing wrong
> with this, I have a couple of USB sticks like it, and my Nexus S is the
> same.
>
> Your automounter should still pick it up.
I don't use an automounter. I like to be in control of what gets
mounted when. Thanks for the explanation. With it in mind I've finally
come up with a plan that works. In /etc/sudoers.d/001 I've included...
waltdnes i3 = (root) NOPASSWD: /sbin/fdisk -l /dev/sdc
And there's an entry for a vfat device in /etc/fstab for directory
/mnt/extc. The command "/sbin/fdisk -l /dev/sdc" seems to read in the
partition table into the system and things work from there on in. fdisk
only works as root, hence the sudo command. Here's a sample session...
===================================================================
waltdnes@i3 ~ $ mount /mnt/extc
mount: special device /dev/sdc1 does not exist
waltdnes@i3 ~ $ sudo /sbin/fdisk -l /dev/sdc
Disk /dev/sdc: 16.0 GB, 16012804096 bytes
256 heads, 63 sectors/track, 1939 cylinders, total 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 31275007 15636480 c W95 FAT32 (LBA)
waltdnes@i3 ~ $ mount /mnt/extc
waltdnes@i3 ~ $
===================================================================
The mount after "sudo /sbin/fdisk -l /dev/sdc" is successful. So all
I need is a short script "~/bin/mntc" like so...
#!/bin/bash
sudo /sbin/fdisk -l /dev/sdc
mount /mnt/extc
--
Walter Dnes <waltdnes@waltdnes.org>
next prev parent reply other threads:[~2011-10-23 3:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-22 0:03 [gentoo-user] Balky mounting of external devices Walter Dnes
2011-10-22 20:21 ` Neil Bothwick
2011-10-23 3:38 ` Walter Dnes [this message]
2011-10-23 11:07 ` [gentoo-user] [SOLVED] " Neil Bothwick
2011-10-25 0:40 ` Walter Dnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111023033845.GA30216@waltdnes.org \
--to=waltdnes@waltdnes.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox