1 |
On Sat, 22 Oct 2011 23:38:45 -0400, Walter Dnes wrote: |
2 |
|
3 |
> On Sat, Oct 22, 2011 at 09:21:50PM +0100, Neil Bothwick wrote |
4 |
> |
5 |
> > This came up recently with a different subject. Your device does not |
6 |
> > have a partition table, instead the filesystem occupies the whole |
7 |
> > device (sometimes referred to as a "superfloppy" format). There's |
8 |
> > nothing wrong with this, I have a couple of USB sticks like it, and |
9 |
> > my Nexus S is the same. |
10 |
> > |
11 |
> > Your automounter should still pick it up. |
12 |
> |
13 |
> I don't use an automounter. I like to be in control of what gets |
14 |
> mounted when. |
15 |
|
16 |
Then use an intelligent automounter, that only mounts things you want it |
17 |
to and lets you make choices about the rest :) |
18 |
|
19 |
> Thanks for the explanation. With it in mind I've finally |
20 |
> come up with a plan that works. |
21 |
> In /etc/sudoers.d/001 I've included... |
22 |
> |
23 |
> waltdnes i3 = (root) NOPASSWD: /sbin/fdisk -l /dev/sdc |
24 |
> |
25 |
> And there's an entry for a vfat device in /etc/fstab for directory |
26 |
> /mnt/extc. The command "/sbin/fdisk -l /dev/sdc" seems to read in the |
27 |
> partition table into the system and things work from there on in. fdisk |
28 |
> only works as root, hence the sudo command. Here's a sample session... |
29 |
> |
30 |
> =================================================================== |
31 |
> waltdnes@i3 ~ $ mount /mnt/extc |
32 |
> mount: special device /dev/sdc1 does not exist |
33 |
> waltdnes@i3 ~ $ sudo /sbin/fdisk -l /dev/sdc |
34 |
> |
35 |
> Disk /dev/sdc: 16.0 GB, 16012804096 bytes |
36 |
> 256 heads, 63 sectors/track, 1939 cylinders, total 31275008 sectors |
37 |
> Units = sectors of 1 * 512 = 512 bytes |
38 |
> Sector size (logical/physical): 512 bytes / 512 bytes |
39 |
> I/O size (minimum/optimal): 512 bytes / 512 bytes |
40 |
> Disk identifier: 0x00000000 |
41 |
> |
42 |
> Device Boot Start End Blocks Id System |
43 |
> /dev/sdc1 * 2048 31275007 15636480 c W95 FAT32 (LBA) |
44 |
> waltdnes@i3 ~ $ mount /mnt/extc |
45 |
> waltdnes@i3 ~ $ |
46 |
> =================================================================== |
47 |
|
48 |
In that case, you have a different situation since there is clearly a |
49 |
partition on the disk. The partition table may be slightly faulty, hence |
50 |
the need for fdisk. Recreating the partition table with fdisk should fix |
51 |
that permanently. |
52 |
|
53 |
|
54 |
-- |
55 |
Neil Bothwick |
56 |
|
57 |
Those who live by the sword get shot by those who don't. |