From: Celejar on
On Thu, 4 Feb 2010 10:31:10 -0600
"Boyd Stephen Smith Jr." <bss(a)iguanasuicide.net> wrote:

....

> In any case, /etc/fstab is for *static* file systems. It is *not* for file
> systems that may or may not be there when the system is booting (or otherwise
> in operation).

Please substantiate this assertion with some documentation. The
manpage just mentions "static information about the filesystems" - I see
nothing that implies that it "is *not* for file systems that may or may
not be there when the system is booting".

Celejar
--
foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Boyd Stephen Smith Jr. on
On Thursday 04 February 2010 17:00:49 Celejar wrote:
> On Thu, 4 Feb 2010 10:31:10 -0600
> "Boyd Stephen Smith Jr." <bss(a)iguanasuicide.net> wrote:
> > In any case, /etc/fstab is for *static* file systems. It is *not* for
> > file systems that may or may not be there when the system is booting (or
> > otherwise in operation).
>
> Please substantiate this assertion with some documentation. The
> manpage just mentions "static information about the filesystems" - I see
> nothing that implies that it "is *not* for file systems that may or may
> not be there when the system is booting".

If the file system may or may not be there, the information about the file
system is not *static* (unchanging). Because the answer is sometimes
"/dev/some/thing/or/other" and sometimes the answer is NULL and errno is set
to ENOENT (No such file or directory).
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss(a)iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
From: Celejar on
On Thu, 4 Feb 2010 17:42:45 -0600
"Boyd Stephen Smith Jr." <bss(a)iguanasuicide.net> wrote:

....

> If the file system may or may not be there, the information about the file
> system is not *static* (unchanging). Because the answer is sometimes
> "/dev/some/thing/or/other" and sometimes the answer is NULL and errno is set
> to ENOENT (No such file or directory).

I see your point, but I disagree. I think that the fact that the fs is
always in the same place when it's there is sufficient to consider its
information static, the fact that it sometimes isn't there at all
notwithstanding.

Celejar
--
foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Dave Thayer on
On Wed, Feb 03, 2010 at 11:01:00PM +1030, Arthur Marsh wrote:
>
> In my case I have:
>
> UUID=4823-93A9 /mnt/usb8gig vfat
> defaults,users,uid=65534,gid=65534,umask=000,shortname=win95
> 0 2
>
> (all on one line)
>
> If I change that trailing "2" to a zero, no fsck should be performed.
>
> I would like to have automatic mounting with fsck if the drive is
> present when the machine is booted, and automatic mounting without
> fsck if the drive is plugged in after the machine is booted.
>
> Is this possible with any of the standard Debian tools and config
> files, or will it require yet-another-script?
>

How about if you leave your fstab set up for no automount and no fsck,
and then use a @reboot cronjob to fsck and mount the device if the
device node is present. For instance, in /etc/crontab you could try:

@reboot root test -L /dev/disk/by-uuid/4823-93A9 && fsck.vfat -a
/dev/disk/by-uuid/4823-93A9 && mount /mnt/usb8gig

(all on one line, with terminating newline)

HTH

dt

--
Dave Thayer | Whenever you read a good book, it's like the
Denver, Colorado USA | author is right there, in the room talking to
dave(a)thayer-boyle.com | you, which is why I don't like to read
| good books. - Jack Handey "Deep Thoughts"


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Arthur Marsh on
Dave Thayer wrote, on 05/02/10 16:01:
> On Wed, Feb 03, 2010 at 11:01:00PM +1030, Arthur Marsh wrote:
>> In my case I have:
>>
>> UUID=4823-93A9 /mnt/usb8gig vfat
>> defaults,users,uid=65534,gid=65534,umask=000,shortname=win95
>> 0 2
>>
>> (all on one line)
>>
>> If I change that trailing "2" to a zero, no fsck should be performed.
>>
>> I would like to have automatic mounting with fsck if the drive is
>> present when the machine is booted, and automatic mounting without
>> fsck if the drive is plugged in after the machine is booted.
>>
>> Is this possible with any of the standard Debian tools and config
>> files, or will it require yet-another-script?
>>
>
> How about if you leave your fstab set up for no automount and no fsck,

Like:

UUID=4823-93A9 /mnt/usb8gig vfat
defaults,users,uid=65534,gid=65534,umask=000,flush,shortname=win95,noauto
0 0

(all on the one line)

> and then use a @reboot cronjob to fsck and mount the device if the
> device node is present. For instance, in /etc/crontab you could try:
>
> @reboot root test -L /dev/disk/by-uuid/4823-93A9 && fsck.vfat -a
> /dev/disk/by-uuid/4823-93A9 && mount /mnt/usb8gig
>
> (all on one line, with terminating newline)

OK, man 5 crontab shows that @reboot can be used instead of the first 5
fields of /etc/crontab

Last question is, what guarantee is there that the device file will have
been generated (assuming that the USB drive is present) before the
@reboot cron event is run?

incron might be able to help, but I haven't yet fully understood how to
set up incron.

Thanks for your help!

Arthur.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org