Another trick:
http://dev.shyd.de/2013/06/booting-with-uuid-not-device-name/
it should be possible to boot by LABEL!
I.e.:
root=LABEL=rootfs
This appears to be the most portable and stable solution!
It might mix up the rootfs of eMMC and µSD if both have the same partition label. But for testing purposes I just want to see that the eMMC can be accessed. I have currently no need to install a partition on it.
BR, Nikolaus
Am 18.01.2016 um 19:09 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi Vagrant,
Am 18.01.2016 um 18:58 schrieb Vagrant Cascadian vagrant@debian.org:
On 2016-01-18, H. Nikolaus Schaller wrote:
Am 18.01.2016 um 18:40 schrieb Vagrant Cascadian vagrant@debian.org:
On 2016-01-18, H. Nikolaus Schaller wrote:
the mapping of the mmc interfaces as named/numbered in the kernel has no stable relation to the device names.
This makes it very difficult to set the root=/dev/mmcblk0p2 boot arg in a stable way so that it works on all boards.
What about using filesystems labels or UUIDs? Then it doesn't matter what order the mmcblk devices are initialized in...
Hm. Does this work for µSD cards and the boot command line to define the location of the root file system?
I use UUID on numerous other boards, though they all use an initramfs that supports UUIDs.
Yes, that makes it easier and in the long run we will need initramfs anyways on the Pyra since otherwise we can't use the MIPI display panel for boot splash, boot options etc.
But for board bring-up and testing it is one level of additional complexity that I want (and have so far) avoided.
How can I find out the UUID of an µSD card of a system that does not yet boot?
I usually look in /dev/disk/by-uuid/, it also prints out the UUID when you run mkfs to create the filesystem, and I'm pretty sure there's some utility to print the UUID of a specified partition...
Ok, that is an alternative.
And are UUIDs the same if I create a new µSD card with the same OS on it or do they change, i.e. do I need a different boot script for every µSD card?
You would need a different boot script for every OS image.
Hm. That is what I did expect not to like :)
If you use the same OS image on multiple SD cards, each SD card would have the same UUIDs for the partitions on that particular OS image.
Well, that works if SD cards are created by cloning (e.g. dd). But since the cards have different size, I fdisk + mkfs new partitions and untar all components. So each SD card will apparently get a different UUID.
My general impression is specifying the rootfs via hard-coded device is frowned upon as predictible device naming is no longer reliable on many forms of media.
Yes, indeed. But UUIDs hard-coded in boot scripts and/or initramfs makes me frown... It has worked in the past 5 years to avoid both :)
Many thanks for the prompt help to better understand the situation.
BR, Nikolaus
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel