[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: question about fstab in squeeze and uuid



On Fri, 12 Mar 2010 13:27:55 -0500 (EST), Paul E Condon wrote:
>
> I'm working on a computer that I am trying to make dual-boot into both
> Lenny and Squeeze. As some are already aware, squeeze rewrites
> /etc/fstab to replace devices like /dev/hda2 with a UUID for the
> device that is a long computer generated string.  I know very little
> about UUIDs but I suppose they are intended to be 'unique'. But I
> suppose that they are required to be persistent, i.e. they don't
> change over time.
> 
> I experienced non-persistence today. While running Squeeze I noticed
> that one of my partitions, in particular the one that contained the
> Lenny installation, which I had put in the /dev/hda3, had been
> re-identified with a different UUID on reboot of the compute so that
> the entry in /etc/fstab could not be used to mount that partition
> under Squeeze (which was installed in /dev/hda2). I edited /etc/fstab
> to contain the new, diffenent UUID that I found by looking in
> /dev/disk/by-uuid, and was able to mount the partition, but it was
> hardly 'automatic'.
> 
> I'm looking for reliable information on how UUIDs are generated, and
> how their uses is intended within Squeeze, so that I can puzzle out
> what I might be doing wrong.
>  
> I think I know already that they are suppose to overcome some
> difficulties in the traditional way SCSI devices are handled in the
> Linux kernel.  The disks that I am working with are NOT SCSI. But the
> fix for SCSI seems to be stepping on the traditional solution for ATA
> that had been working nicely. Or, maybe I just did something stupid.
> 
> I need to read some more. Please make suggestions.

Paul,

I believe a UUID is generated when the partition is "formatted", either with
mkfs or mkswap.  If you asked for the partition to be formatted during the
install of Lenny, which would be typical, the UUID will change.  I believe
that the installer's recent penchant for using UUIDs is the result of
the sometimes-capricious device naming conventions chosen by udev.
This has been made worse recently by the latest kernels using SCSI emulation
for traditional ATA IDE hard disks.  If SCSI emulation is not used, the partitions
are called /dev/hda1, /dev/hda2, etc.  If SCSI emulation is used, the
partitions may be called /dev/sda1, /dev/sda2, etc.  I personally don't
like the use of UUIDS by the installer and I change them back to their
traditional names.  I guess I'll deal with the SCSI emulation issue when
it gets here.  Suit yourself.

-- 
  .''`.     Stephen Powell    <zlinuxman@wowway.com>
 : :'  :
 `. `'`
   `-


Reply to: