You are not logged in.

#1 2011-09-25 07:18:45

agkbill
Member
Registered: 2011-06-13
Posts: 85

[SOLVED] uuid identity failed at boot, booting wrong disk.

Hi,

I am using uuid in grub2 to identify what partition to use during boot.

I use to have problem that /dev/sda disk changed, well everything have worked fine untill now.


All of the sudden modules could not loaded.


After tracking down loog and boot info I found that wrong disk was used.

I have two 250 Gb disks. One for arch and the outer as a backup for arch. I use clonezilla to clone one disk to the outher.

Arch that I use was updated with kernel 3.0, backup not, so when backup was booted the 3.0 folder for modules was missing.

I cloned the original disk over to the backup disk and now it is working.


It looks like uuid in grub2 now is pointing at the backup disk.

My question is how is this possible?

Is not uuid uniqe for the disk?

How is uuid created?

 Disks by lable. I named the partion after use. 
[christer@Arch ~]$ ls /dev/disk/by-label/
total 0
lrwxrwxrwx 1 root root 10 Sep 25 07:59 arch-boot -> ../../sdc1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 arch-home -> ../../sdc4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 arch-root -> ../../sdc3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 kubuntu_hd -> ../../sda4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 matrox -> ../../sdf1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 movie-disk -> ../../sdd1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 System\x20Reserved -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 win7-hd -> ../../sdb2
[christer@Arch ~]$ 
 Disks by id
[christer@Arch ~]$ ls /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Sep 25 09:21 ata-HL-DT-ST_DVDRAM_GSA-H10A_761414E7AAF7 -> ../../sr0
lrwxrwxrwx 1 root root  9 Sep 25 07:59 ata-ST3500630AS_9QG6NV7F -> ../../sdf
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-ST3500630AS_9QG6NV7F-part1 -> ../../sdf1
lrwxrwxrwx 1 root root  9 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D565751 -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D565751-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D565751-part2 -> ../../sdb2
lrwxrwxrwx 1 root root  9 Sep 25 09:26 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D569679 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D569679-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D569679-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D569679-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D569679-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00L5B1_WD-WCAU4D569679-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 Sep 25 07:59 ata-WDC_WD10EADS-00M2B0_WD-WMAV51249027 -> ../../sdd
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD10EADS-00M2B0_WD-WMAV51249027-part1 -> ../../sdd1
lrwxrwxrwx 1 root root  9 Sep 25 07:59 ata-WDC_WD2500KS-00MJB0_WD-WCANK5634175 -> ../../sdc
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500KS-00MJB0_WD-WCANK5634175-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500KS-00MJB0_WD-WCANK5634175-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500KS-00MJB0_WD-WCANK5634175-part3 -> ../../sdc3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500KS-00MJB0_WD-WCANK5634175-part4 -> ../../sdc4
lrwxrwxrwx 1 root root  9 Sep 25 07:59 ata-WDC_WD2500SB-01KBC0_WD-WCAL78747249 -> ../../sde
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500SB-01KBC0_WD-WCAL78747249-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500SB-01KBC0_WD-WCAL78747249-part2 -> ../../sde2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500SB-01KBC0_WD-WCAL78747249-part3 -> ../../sde3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 ata-WDC_WD2500SB-01KBC0_WD-WCAL78747249-part4 -> ../../sde4
lrwxrwxrwx 1 root root  9 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D565751 -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D565751-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D565751-part2 -> ../../sdb2
lrwxrwxrwx 1 root root  9 Sep 25 09:26 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D569679 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D569679-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D569679-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D569679-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D569679-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D569679-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WMAV51249027 -> ../../sdd
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD10EADS-00_WD-WMAV51249027-part1 -> ../../sdd1
lrwxrwxrwx 1 root root  9 Sep 25 07:59 scsi-SATA_WDC_WD2500KS-00_WD-WCANK5634175 -> ../../sdc
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500KS-00_WD-WCANK5634175-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500KS-00_WD-WCANK5634175-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500KS-00_WD-WCANK5634175-part3 -> ../../sdc3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500KS-00_WD-WCANK5634175-part4 -> ../../sdc4
lrwxrwxrwx 1 root root  9 Sep 25 07:59 scsi-SATA_WDC_WD2500SB-01_WD-WCAL78747249 -> ../../sde
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500SB-01_WD-WCAL78747249-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500SB-01_WD-WCAL78747249-part2 -> ../../sde2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500SB-01_WD-WCAL78747249-part3 -> ../../sde3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SATA_WDC_WD2500SB-01_WD-WCAL78747249-part4 -> ../../sde4
lrwxrwxrwx 1 root root  9 Sep 25 07:59 scsi-SMaxtor_OneTouch_2HA1DRJK -> ../../sdf
lrwxrwxrwx 1 root root 10 Sep 25 07:59 scsi-SMaxtor_OneTouch_2HA1DRJK-part1 -> ../../sdf1
lrwxrwxrwx 1 root root  9 Sep 25 07:59 usb-Generic_Flash_HS-CF_000022272228-0:0 -> ../../sdg
lrwxrwxrwx 1 root root  9 Sep 25 07:59 usb-Generic_Flash_HS-MS_000022272228-0:1 -> ../../sdh
lrwxrwxrwx 1 root root  9 Sep 25 07:59 usb-Generic_Flash_HS-SD_MMC_000022272228-0:3 -> ../../sdj
lrwxrwxrwx 1 root root  9 Sep 25 07:59 usb-Generic_Flash_HS-SM_000022272228-0:2 -> ../../sdi
lrwxrwxrwx 1 root root  9 Sep 25 07:59 wwn-0x50014ee0ac9c112e -> ../../sdd
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee0ac9c112e-part1 -> ../../sdd1
lrwxrwxrwx 1 root root  9 Sep 25 07:59 wwn-0x50014ee1020c0e5d -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c0e5d-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c0e5d-part2 -> ../../sdb2
lrwxrwxrwx 1 root root  9 Sep 25 09:26 wwn-0x50014ee1020c11c2 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c11c2-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c11c2-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c11c2-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c11c2-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 wwn-0x50014ee1020c11c2-part5 -> ../../sda5
[christer@Arch ~]$
 Disks by uuid 
[christer@Arch ~]$ ls /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Sep 25 07:59 0088ABD388ABC60E -> ../../sdf1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 07588b90-b464-4422-acbc-7c89e74eac6c -> ../../sdc2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 0a7abd89-e007-42df-9770-d97876372637 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 2E3235B5323582BF -> ../../sdb2
lrwxrwxrwx 1 root root 10 Sep 25 07:59 3d093000-e27a-4722-9003-3b6c171cad0d -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 6df74e4d-6c13-444b-8c7d-d4231eb56d4a -> ../../sda4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 8516fa60-0d45-4f33-b269-817c5290f6cc -> ../../sdc1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 9f1d3309-b392-49f6-bc0b-4fce8caec8e0 -> ../../sda5
lrwxrwxrwx 1 root root 10 Sep 25 07:59 9f32e668-2548-4ed4-a10b-3fbea66a6d95 -> ../../sdc3
lrwxrwxrwx 1 root root 10 Sep 25 07:59 BC46C8EA46C8A70C -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 25 07:59 c7a1174a-3bc2-48db-8d1b-fd910a25f6a6 -> ../../sdc4
lrwxrwxrwx 1 root root 10 Sep 25 07:59 cece8b47-6d22-4038-81b6-7c65fb577810 -> ../../sda3
[christer@Arch ~]$ 

Thank you!

Best regards,
/Christer

Last edited by agkbill (2011-09-25 19:35:55)

Offline

#2 2011-09-25 11:45:30

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] uuid identity failed at boot, booting wrong disk.

The UUID of a partition can be changed easily.

For the ext filesystems you can assign a specific UUID when the filesystem is created with 'mk2fs -U'.  You can change it later using 'tune2fs -U'.  Other filesystems have different tools.

You can generate a random or time-based UUID using 'uuidgen'.  The 'blkid' command allows you to examine the UUID quickly, 'blkid /dev/sdc2'.

Cloning implies an exact replica.  The ability to duplicate or change UUIDs allows drives to be swapped quickly, with minimal downtime.  That's just fine with me, it's saves me work when drives fail.

Last edited by thisoldman (2011-09-25 11:46:18)

Offline

#3 2011-09-25 16:51:22

stoat
Member
Registered: 2011-08-07
Posts: 12

Re: [SOLVED] uuid identity failed at boot, booting wrong disk.

agkbill wrote:

Is not uuid uniqe for the disk?

Yes, but when you start cloning and restoring partitions, all bets are sort of off. The UUID is unique for the filesystems of your partitions. It is stored in their superblocks. Depending on the cloning method used, the UUID may or may not be preserved in the restored version of a clone, and you may or may not want that. For example, I prefer tar to backup partitions with Arch and other systems. That method copies only files from the original filesystem, and they are restored into entirely new partitions with new filesystems and new UUIDs. So I always have to fix the UUID wherever it appears in a system restored from a tarball (usually just menu.lst and fstab). Cloning methods that copy sectors (say, dd) also will copy the superblock (and the UUID). I don't use or know anything about how Clonezilla works.

Offline

#4 2011-09-25 19:35:38

agkbill
Member
Registered: 2011-06-13
Posts: 85

Re: [SOLVED] uuid identity failed at boot, booting wrong disk.

Thank you for clarifying how UUID works.

I first thought that it was connected to the hardware, now I understand better what happen.

I will now clone my arch disk to a image instead to a disk..

Thank you thisoldman & stoat for explaining.

Best reagards,
/Christer

Offline

Board footer

Powered by FluxBB