[SATLUG] Trying to understand UUID and grub

Charles Mims chmims at gmail.com
Thu Nov 20 22:23:40 CST 2008


I was using /dev/sdx only as an example.  I  am querying several partitions
on /dev/sda and /dev/sdb
including sda1, sda2, sda3 and sdb1, sdb2.  This is the output I get
for  *blkid
*and *vol_id.
*The UUID returned for /dev/sdb2 is different for each command.  So how do I
know which
one to use for adding a partition to grub.

*chmims at ubuntu:~$ /sbin/blkid*
/dev/sda1: LABEL="/1" UUID="ca5f02f4-5c43-4701-be99-c5219bcaf7ec"
SEC_TYPE="ext2" TYPE="ext3"
/dev/sda2: UUID="792d7929-6e55-42de-8fdb-f639e8ce1f9e" TYPE="ext3"
/dev/sda3: UUID="EA38F76738F730E5" TYPE="ntfs"
/dev/sdb1: UUID="eabacf03-0b6c-49f3-b978-7d56d2d6781c" TYPE="swap"
*/dev/sdb2: LABEL="/" UUID="b416c7ba-0e6a-46ae-93b2-52a0044dd1e9"
SEC_TYPE="ext2" TYPE="ext3" *
/dev/sdb5: UUID="bb802856-e1b8-4801-8dc5-1ef8b74df978" TYPE="ext3"
/dev/loop0: TYPE="squashfs"
chmims at ubuntu:~$ sudo /sbin/vol_id
[sudo] password for chmims:
no device
*chmims at ubuntu:~$ sudo /sbin/vol_id /dev/sdb2*
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
*ID_FS_UUID=fea4a071-796a-4621-a4a2-cc19f69cfa3a*
ID_FS_UUID_ENC=fea4a071-796a-4621-a4a2-cc19f69cfa3a
ID_FS_LABEL=/
ID_FS_LABEL_ENC=\x2f
ID_FS_LABEL_SAFE=
chmims at ubuntu:~$


On Thu, Nov 20, 2008 at 6:01 PM, John Pappas <j at jvpappas.net> wrote:

> Your email indicated you were querying via /dev/sdx rather than the
> explicit
> partition number.  Can you include the contents of your /boot/grub/menu.lst
> so that I can see what you are talking about?
>
> On Thu, Nov 20, 2008 at 15:11, Charles Mims <chmims at gmail.com> wrote:
>
> > I can see where a disk would have a guid and each partitions on it have a
> > different
> > guid.  But I am asking for the guid on a partition using *blkid *and
> > *vol_id
> > *and getting
> > two different numbers.  Or at least that is what I think I am  doing.
> >
> > On Thu, Nov 20, 2008 at 11:29 AM, John Pappas <j at jvpappas.net> wrote:
> >
> > > I am not using a GUID boot setup (LVM), but I am thinking that you need
> > to
> > > be using the partition GUID, not the disk GUID.  Try using sdxy where y
> > is
> > > your root partition.  You may need to specify your boot part GUID as
> > well,
> > > but I know at least your root partition GUID.
> > >
> > > On Wed, Nov 19, 2008 at 19:34, Charles Mims <chmims at gmail.com> wrote:
> > >
> > > > I am trying to understand UUID #.   I understand that it is a unique
> ID
> > > for
> > > > a device.
> > > > But unfortunately it seems to be able to change for partitions which
> > > seems
> > > > to be
> > > > causing problems with GRUB.   I have tried substituting /dev/sdx but
> > that
> > > > doesn't
> > > > seem to be the solutions.   So I am trying to find out the UUID # for
> a
> > > > partition
> > > > so I can use that.    How ever I seem to be getting two different #'s
> .
> > > >
> > > > #/sbin/blkid /dev/sdx gives me one UUID #.  Which does not seem to
> > change
> > > > with
> > > > reformating the partition.  However!
> > > >
> > > > #/sbin/vol_id /dev/sdx returns a different UUID # and that number
> > changes
> > > > if
> > > > the
> > > > partition is reformated.
> > > >
> > > > My concern is that installing a different distro of Linux and
> lettting
> > it
> > > > write a new
> > > > GRUB to the MBR seems to result in being unable to load the the
> > > previously
> > > > installed
> > > > distro.   Simply copying the old grub  config to the new doesn't seem
> > to
> > > > work.
> > > >
> > > > Charles
> > > > --
> > > > _______________________________________________
> > > > SATLUG mailing list
> > > > SATLUG at satlug.org
> > > > http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
> > > > Powered by Rackspace (www.rackspace.com)
> > > >
> > > --
> > > _______________________________________________
> > > SATLUG mailing list
> > > SATLUG at satlug.org
> > > http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
> > > Powered by Rackspace (www.rackspace.com)
> > >
> > --
> > _______________________________________________
> > SATLUG mailing list
> > SATLUG at satlug.org
> > http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
> > Powered by Rackspace (www.rackspace.com)
> >
> --
> _______________________________________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
> Powered by Rackspace (www.rackspace.com)
>


More information about the SATLUG mailing list