fstab-sync

David Zeuthen david at fubar.dk
Thu Jul 15 13:48:02 PDT 2004


On Thu, 2004-07-15 at 16:36 -0400, John (J5) Palmieri wrote:
> > 2. The program put /dev/hda1 into my fstab but that one is already there
> > as LABEL=/. This can be resolved by looking at the volume.label for the
> > volume you are processing.
> 
> We were discussing this.  Problem being that how do you determine which
> disk is which when there are more than one partition labeled with "/"?
> 

If that's the case, I suppose you're pretty screwed already; how would
the boot scripts have mounted "/" then? 

Hmm, but we should still handle the usecase of a user taking the disk
from one system (with the first partition having label "/") and putting
it in USB enclosure and, at runtime, attaching it to another system
with /dev/hda1 being LABEL=/.

So, to resolve this perhaps all we need to do is to lookup in /etc/mtab
when processing each line of the /etc/fstab. So when processing 

 LABEL=/                 /                       ext3    defaults        1 1

in /etc/fstab we lookup in /etc/mtab and find this line (we search on
mount point /)

 /dev/hda1 / ext3 rw 0 0

and conclude that /dev/hda1 is mounted on /. When we attach the USB disk
then we get /dev/sda1 with LABEL=/ and since /dev/sda1 is not in the in
memory representation of the fstab we add an entry. Sounds OK?
 
> > 3. There is an entry for my cd-rom drive only when I've got a disc in
> > the drive; this breaks the current hal patch for gnome-vfs (though when
> > J5's changes are in this should no longer be required).
> 
> First part of the patch was committed.  Now I need to hook up hal.
> 

Good stuff.

> > 5. The program uses the kudzu option to recognize entries made by the
> > program, perhaps this should be 'hal' instead? If think it could be
> > useful to host this program with the hal package as it's not Fedora
> > specific? If we do this we should probably use the 'hal' option and also
> > host the (trivial) patch to mount that achieves this as well.
> 
> A mail went out to the upstream mount maintainer.  He agreed to accept
> the no-op "managed" so I think we will go in this direction instead of
> making it hal specific.  

Yay, that's nice!

> If we feel we need to be more specific we can
> always add a comment to the end like #hal managed.

Hadn't thought about that, that's pretty clever.

Cheers,
David
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list