From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RHoua-0001W9-NM for garchives@archives.gentoo.org; Sun, 23 Oct 2011 03:39:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DFD9721C1A7; Sun, 23 Oct 2011 03:39:36 +0000 (UTC) Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 92B9821C029 for ; Sun, 23 Oct 2011 03:38:37 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiwHAAaLo05MCqlH/2dsb2JhbABDmhGOf4EGgW4BAQQBOhwoCz8SFCU3iACzRIM2hClhBJlDh3iERQ X-IronPort-AV: E=Sophos;i="4.69,393,1315195200"; d="scan'208";a="143888589" Received: from 76-10-169-71.dsl.teksavvy.com (HELO waltdnes.org) ([76.10.169.71]) by ironport2-out.pppoe.ca with SMTP; 22 Oct 2011 23:38:35 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Sat, 22 Oct 2011 23:38:45 -0400 From: "Walter Dnes" Date: Sat, 22 Oct 2011 23:38:45 -0400 To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] [SOLVED] Balky mounting of external devices Message-ID: <20111023033845.GA30216@waltdnes.org> References: <20111022000321.GA26680@waltdnes.org> <20111022212150.2cc8ebe6@digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111022212150.2cc8ebe6@digimed.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: X-Archives-Hash: 6c3d0879383f8b85f05a5606c87650d8 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