2

I am using a Raspberry2 with the root system on a USB thumb drive.

It does boot correctly if I reference my USB drive by /dev/sda1:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootfstype=ext4 elevator=deadline rootwait rootdelay=10

It does not boot when I reference the root system by it's UUID like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=$MY_PART_UUID rootfstype=ext4 elevator=deadline rootwait rootdelay=30

($MY_PART_UUID is a replacement for my real PARTUUID)

If at all possible, i'd really like to reference it by UUID for obvious reasons. So hopefully someone can help with this problem? Thank you very much in advance!

PS: @Huygens had an idea, so here is further information:

Interestingly, blkid does not report a PARTUUID:

sudo blkid /dev/sda1

/dev/sda1: LABEL="raspiRoot" UUID="7e5ab27b-[...]" TYPE="ext4"

But, on the other hand:

sudo gdisk /dev/sda

Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present

Partition GUID code: 0FC63DAF-[...] (Linux filesystem) Partition unique GUID: 6A7A04D3-[...]

  • 2
    Did you remove UUID from code, or is it simply not there? (root=PARTUUID=[...]) I haven't seen PARTUUID syntax before, are you certain it is correct? I've seen stuff like that: root=UUID=b13e754d-80d8-431d-a24e-54445693efcb (link to UUID referencing) – Piotr Kamoda Jul 6 '15 at 5:57
  • Thank you for your comment, I have added the information to my question. As to the "root=PARTUUID=..." syntax: I used that exact same syntax with another USB device, wich worked just fine. – Archibald Jul 6 '15 at 15:51
3

I am trying the same with PARTUUID. Important to know is that the PARTUUID is different to the UUID and is only supported if your partition table supports GPT. This is not done with your drive as you wrote: "Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present".

You have to enable this partition table (the content of drive will be deleted!). Follow the instruction from https://melgrubb.wordpress.com/2014/08/01/raspberry-pi-home-server-part-6-adding-a-hard-drive/ section "Attach the hard drive" to add GPT. Afterward copy your root data to the external drive and try it again.

2

You are confusing me between UUID and PARTUUID. Which one do you want to use?

It was reported that UUID does not work in the cmdline.txt configuration file as the Raspberry Pi official kernel is not compiled with the right option.

However, it seems that one can use PARTUUID in this configuration file (as you said). To get the PARTUUID you should use blkid which report both UUID and PARTUUID. For example:

$ blkid /dev/sda1
/dev/sda1: UUID="3d2cb3c9-(...)" UUID_SUB="(...)" (...) PARTUUID="000c43e3-01"

Note that I haven't tried this my self. I'm booting from the MicroSD card, so I don't need this feature.

Update

I would give another try with UUID. Using the output from blkid and the UUID keyword in the cmdline.txt.

  • Interestingly, blkid does not report a PARTUUID: # sudo blkid /dev/sda1 /dev/sda1: LABEL="raspiRoot" UUID="7e5ab27b-[...]" TYPE="ext4" – Archibald Jul 12 '15 at 12:44
  • Older versions of blkid do not report PARTUUID. – solsTiCe Jul 12 '15 at 13:42
  • This is my version: blkid from util-linux 2.20.1 (libblkid 2.20.0, 19-Oct-2011) I regularly use apt-get update; apt.get dist-upgrade to update the system; am I doin it wrong? ;) – Archibald Jul 12 '15 at 14:40
  • I'm using Raspbian based on Jessie and not Wheezy... That could explain the newer blkid in my case. Try to use the UUID reported by blkid and use the UUID keyword instead of PARTUUID. – Huygens Jul 14 '15 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.