FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-02-2010, 07:08 PM
Frank McCormick
 
Default auto-mounting disks that might not be present (e.g. usb drives)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 02 Feb 2010 19:59:13 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:

> On Tue, 02 Feb 2010 14:46:09 -0500, Frank McCormick wrote:
>
> > To the OP:
> >
> > The bottom line: There is no problem even if flashdrives/cameras
> > etc are in fstab but not present- you simply get the error logged
>
> Question is, do you really need "those" devices (flash drives and
> MC/SD memory cards) to be present in "fstab"? That is, do you need
> static mount points for that kind of devices?
>
> USB hard drives make sense, but for media cards I'd better let
> hotplug subsystem auto-manages them.


In my particular case, yes. I like to know beforehand where they
are mounted. AFAIK hotplug or its successor mounts them where it
wants to ?

Cheers
- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaIZZAAoJEMEDyLTvrVhjGMsIAI/JRvj7uRODArSlyIbfpYzN
D5dwoMKIpJz/8Q8kJGpz+Pk+gbnB9xFF7+B6ZNpnEtMUk3naL/xb/ReCntfUZ5o9
WkIRHB6yn4HSmUV76RnlLf7d4eRmd1GA59tHIyuMgJkiIufhqP IyGGDAVGBYqLBO
ctoSSA2XK/Bv29Q618gxRoX0FrkLhkJPz9rhdjjzOKpUlDZ+iQTodEym5Y9a aYC3
eLnlyqKn6Tg7ze8XzlCNy242nI8IhLXS13aGDgADHCNirzKD0s aft4mGCWhVctVo
HL94eEti/+2kksHTe1yy4+yWepjwMh0UZLoeeK5uciMuadIa86wdvSa3AG/TA9Y=
=J/bJ
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-02-2010, 09:38 PM
Camaleón
 
Default auto-mounting disks that might not be present (e.g. usb drives)

On Tue, 02 Feb 2010 15:08:57 -0500, Frank McCormick wrote:

> On Tue, 02 Feb 2010 19:59:13 +0000 (UTC) Camaleón wrote:

>> Question is, do you really need "those" devices (flash drives and MC/SD
>> memory cards) to be present in "fstab"? That is, do you need static
>> mount points for that kind of devices?
>>
>> USB hard drives make sense, but for media cards I'd better let hotplug
>> subsystem auto-manages them.
>
>
> In my particular case, yes. I like to know beforehand where they
> are mounted. AFAIK hotplug or its successor mounts them where it wants
> to ?

Mmm... I think "LABEL" would take precedence over another mount option
(UUID, ID or PATH) so if you "tag" your media device with a LABEL, it
should be mounted when plugged under "/media/mylabel".

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-02-2010, 09:59 PM
Arthur Marsh
 
Default auto-mounting disks that might not be present (e.g. usb drives)

Frank McCormick wrote, on 03/02/10 02:11:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 02 Feb 2010 15:00:41 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:


On Tue, 02 Feb 2010 22:25:12 +1030, Arthur Marsh wrote:


Hi, I found that initscripts seems to attempt to run fsck on
non-existent devices that appear in /etc/fstab, and different fsck
programs for different filesystem types give different error
codes.

What is the easiest way to set up Debian to automatically mount
specific devices if they are present, but not cause a boot
failure when they are absent?

"man fstab" says that if the <passno> digit is other than zero,
"fsck" will try to check that mount point.



I have devices (usually flashdrives and or digital cameras) that
may or may not be present during boot and they don't cause boot
failure. But I guess you're talking about differnt devices ??


- --
Frank


I was just using a USB flashdrive formatted to vfat.

dosfstools 3.0.1 would have error code 1 for a drive entry in /etc/fstab
that wasn't plugged in and it would boot fine whether the USB drive
was present or not.


If fsck returns with error code greater than 1, the boot process stops
at a prompt to enter root password or control-d.


My argument is that the boot process should not even try to run fsck on
a non-existent device.


Arthur.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-02-2010, 10:12 PM
Arthur Marsh
 
Default auto-mounting disks that might not be present (e.g. usb drives)

Frank McCormick wrote, on 03/02/10 06:16:


To the OP:

The bottom line: There is no problem even if flashdrives/cameras etc

are in fstab but not present- you simply get the error logged


Cheers
- --
Frank


Well, there is a definite problem in my case (Debian unstable on i386).

Error code 1 on fsck gets an error logged, but doesn't stop the boot
process.


Upgrading dosfstools past 3.0.1 caused an error code greater than 1,
which triggers the stop of the boot process.


I don't understand why initscripts tries to fsck a non-existent device.

Maybe I should file a bug against initscripts.

I had initially filed a bug against dosfstools but had no response:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562536

I would just like to have USB flash drives that may or may not be
plugged into machines that aren't switched on all the time, and I would
like them to be mounted if they're plugged in when the machine is
powered on, and for the machine to boot anyway if the USB flash drive is
not present.


Regards,

Arthur.

Regards,

Arthur.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-02-2010, 10:31 PM
Frank McCormick
 
Default auto-mounting disks that might not be present (e.g. usb drives)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 03 Feb 2010 09:42:40 +1030
Arthur Marsh <arthur.marsh@internode.on.net> wrote:

> >
> > The bottom line: There is no problem even if flashdrives/cameras
> > etc are in fstab but not present- you simply get the error logged
>
> Well, there is a definite problem in my case (Debian unstable on
> i386).
>
> Error code 1 on fsck gets an error logged, but doesn't stop the
> boot process.
>
> Upgrading dosfstools past 3.0.1 caused an error code greater than
> 1, which triggers the stop of the boot process.
>
> I don't understand why initscripts tries to fsck a non-existent
> device.
>
> Maybe I should file a bug against initscripts.
>
> I had initially filed a bug against dosfstools but had no response:
>

Very strange -
This is my fstab#

/etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 errors=remount-ro 0 1
/dev/hda1 none swap sw 0 0
/dev/hda5 none swap sw 0 0
/dev/hdc /media/dvd udf,iso9660 rw,user,noauto,unhide 0 0
/dev/hdd /media/dvd-rom udf,iso9660 rw,user,noauto,unhide 0 0
#/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hda3 /media/intrepid auto rw,user,auto 0 0
/dev/sda1 /media/FlashDrive vfat rw,user,auto 0 0
/dev/sdb1 /media/camera vfat rw,user,auto 0 0


I'm running testing with dosfstools 3.0.7-1

sda1 is usually plugged in...but the camera usually is not.

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaLXLAAoJEMEDyLTvrVhjYMQH/2HnvNIaWZCBnT+1bKBOvxry
dk+iJDaKC4PqJ4ZolFyFDTXU5ZWgcCE8Nsi1iNLLv3uwl8nPhR IyBLjksdMk1ewq
Zgn76x+YBpfpan3cy0ATFFKCzrCYIfooofeGIjBilFYQXi1Dvp LOOrfiFMJUDOxh
rJH+4h7hjCN7amZsDpm02wAKZ5lv013X8HClkqDSH3lyePmAwE 5NHsRGbjqLjZsV
O/rmvwX5SawcTLVQNmRuQZbKqmJSPIK5k5lHBBFSW/+78PwU/CjheUpYfxs+gZFT
QDpIn7NbosYsX6xXE+Uo2N8NCiQgvzCVDjUzofZMO4gIrcWLcz PI+Y6vjOktuzA=
=vppa
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-02-2010, 11:25 PM
Arthur Marsh
 
Default auto-mounting disks that might not be present (e.g. usb drives)

Frank McCormick wrote, on 03/02/10 10:01:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 03 Feb 2010 09:42:40 +1030
Arthur Marsh <arthur.marsh@internode.on.net> wrote:


The bottom line: There is no problem even if flashdrives/cameras

etc are in fstab but not present- you simply get the error logged

Well, there is a definite problem in my case (Debian unstable on
i386).

Error code 1 on fsck gets an error logged, but doesn't stop the
boot process.

Upgrading dosfstools past 3.0.1 caused an error code greater than
1, which triggers the stop of the boot process.

I don't understand why initscripts tries to fsck a non-existent
device.

Maybe I should file a bug against initscripts.

I had initially filed a bug against dosfstools but had no response:



Very strange -
This is my fstab#


/etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 errors=remount-ro 0 1
/dev/hda1 none swap sw 0 0
/dev/hda5 none swap sw 0 0
/dev/hdc /media/dvd udf,iso9660 rw,user,noauto,unhide 0 0
/dev/hdd /media/dvd-rom udf,iso9660 rw,user,noauto,unhide 0 0
#/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hda3 /media/intrepid auto rw,user,auto 0 0
/dev/sda1 /media/FlashDrive vfat rw,user,auto 0 0
/dev/sdb1 /media/camera vfat rw,user,auto 0 0


I'm running testing with dosfstools 3.0.7-1

sda1 is usually plugged in...but the camera usually is not.

- --
Frank


This is the /etc/fstab entry I had to comment out:

UUID=4823-93A9 /mnt/usb8gig vfat
defaults,users,uid=65534,gid=65534,umask=000,short name=win95 0
2


(all on one line)

Arthur.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-03-2010, 01:22 AM
Celejar
 
Default auto-mounting disks that might not be present (e.g. usb drives)

On Wed, 03 Feb 2010 09:42:40 +1030
Arthur Marsh <arthur.marsh@internode.on.net> wrote:

> Frank McCormick wrote, on 03/02/10 06:16:
> >
> > To the OP:
> >
> > The bottom line: There is no problem even if flashdrives/cameras etc
> > are in fstab but not present- you simply get the error logged
> >
> >
> > Cheers
> > - --
> > Frank
>
> Well, there is a definite problem in my case (Debian unstable on i386).
>
> Error code 1 on fsck gets an error logged, but doesn't stop the boot
> process.
>
> Upgrading dosfstools past 3.0.1 caused an error code greater than 1,
> which triggers the stop of the boot process.
>
> I don't understand why initscripts tries to fsck a non-existent device.

Definite problem here, too, on my uptodate Sid system, with ext3. My
fstab has lines like this:

LABEL=software /media/software ext3
defaults,user,exec,noauto 0 0

[The target is a LV within a VG on top of a partition on an external
USB disk.]

When the last field is 2, the boot stops after fsck fails with error
code 8, until I hit <ctrl>-D. From /var/log/fsck/fsck/checkfs

fsck.ext3: Unable to resolve 'LABEL=software'
fsck died with exit status 8

> Maybe I should file a bug against initscripts.

Probably a good idea. I just changed the fs_passno field to 0, but a
bug is probably in order.

> I had initially filed a bug against dosfstools but had no response:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562536

Well, it's not really a bug in fsck, but, as you noted earlier, in
initscripts. Perhaps you can just reassign the bug?

> I would just like to have USB flash drives that may or may not be
> plugged into machines that aren't switched on all the time, and I would
> like them to be mounted if they're plugged in when the machine is
> powered on, and for the machine to boot anyway if the USB flash drive is
> not present.

Exactly. But mounting automatically is not the problem. You can have
them mounted, without the fsck being performed.

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@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-03-2010, 04:30 AM
Frank McCormick
 
Default auto-mounting disks that might not be present (e.g. usb drives)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> > >
> > > The bottom line: There is no problem even if
> > > flashdrives/cameras etc are in fstab but not present- you
> > > simply get the error logged
> >
> > Well, there is a definite problem in my case (Debian unstable on
> > i386).
> >
> > Error code 1 on fsck gets an error logged, but doesn't stop the
> > boot process.
> >
>
> Definite problem here, too, on my uptodate Sid system, with ext3.
> My fstab has lines like this:
>
> LABEL=software /media/software ext3
> defaults,user,exec,noauto 0 0
>

> Camaleón wrote:


>>Mmm... I think "LABEL" would take precedence over another mount option
<<(UUID, ID or PATH) so if you "tag" your media device with a LABEL, it
>>should be mounted when plugged under "/media/mylabel".

Well Label didn't work in my case either - I gave the USB drive a label
of Music...then changed fstab to the LABEL=Music from /dev/sda1

The drive did not get mounted and I had to go back to /dev/sda1

But as long as /dev/sda1 is used, there is no fsck of the drive.

Cheers

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaQoHAAoJEMEDyLTvrVhjPzoH+wdfQB1LpT Biran2Rf1A9IRL
SzpIPgXsf0glxaVwT5n1lKnOBUENqInmsnuZe5jNoVrF8aLohd RqFfBwxYX8kFwh
sfz9Rjp8oFr/ASZpgdmyvP2s4tGAeuh/rSNx2hEPJFQiZKpE7mOSmXQ1+6SGMzvq
sIh7yxKcmo8+14+Whc0GdaqCVKej3/aQW+nYkFbmA93Uy2xzkOP8Dox/DFDsFXMJ
NJnbspWbss/XEQTcLn61tKmxwoL3jpxFq5k/ytMFXu1rH7IFDrz5AMYHpG3roxEM
LG9zIEiF0pkflKrfQM1hk+hqdONjO9mtSkBgcyXWLNco3ErmoX yKKp/9Jy4Bvkg=
=bL9P
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-03-2010, 10:22 AM
Camaleón
 
Default auto-mounting disks that might not be present (e.g. usb drives)

On Wed, 03 Feb 2010 00:30:47 -0500, Frank McCormick wrote:

>> Camaleón wrote:
>
>
>>>Mmm... I think "LABEL" would take precedence over another mount option
> <<(UUID, ID or PATH) so if you "tag" your media device with a LABEL, it
>>>should be mounted when plugged under "/media/mylabel".
>
> Well Label didn't work in my case either - I gave the USB drive a
> label
> of Music...then changed fstab to the LABEL=Music from /dev/sda1
>
> The drive did not get mounted and I had to go back to /dev/sda1
>
> But as long as /dev/sda1 is used, there is no fsck of the drive.

You should not list your devices in fstab if you want to make use of your
DE hotplug capabilities.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-03-2010, 11:31 AM
Arthur Marsh
 
Default auto-mounting disks that might not be present (e.g. usb drives)

Frank McCormick wrote, on 03/02/10 16:00:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


The bottom line: There is no problem even if

flashdrives/cameras etc are in fstab but not present- you
simply get the error logged

Well, there is a definite problem in my case (Debian unstable on
i386).

Error code 1 on fsck gets an error logged, but doesn't stop the
boot process.


Definite problem here, too, on my uptodate Sid system, with ext3.
My fstab has lines like this:

LABEL=software /media/software ext3
defaults,user,exec,noauto 0 0




Camaleón wrote:



Mmm... I think "LABEL" would take precedence over another mount option
<<(UUID, ID or PATH) so if you "tag" your media device with a LABEL, it

should be mounted when plugged under "/media/mylabel".


Well Label didn't work in my case either - I gave the USB drive a label
of Music...then changed fstab to the LABEL=Music from /dev/sda1

The drive did not get mounted and I had to go back to /dev/sda1

But as long as /dev/sda1 is used, there is no fsck of the drive.

Cheers


In my case I have:

UUID=4823-93A9 /mnt/usb8gig vfat
defaults,users,uid=65534,gid=65534,umask=000,short name=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?


Arthur.


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

Thread Tools




All times are GMT. The time now is 06:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org