This request is to change /etc/fstab to mount partitions with UUID instead of kernel name descriptors. The current image format relies on the wic parameter "--ondisk" to generate the fstab entries. When different decide such as eMMC or SD where block devices are mmcblkNpM causing systems to fail to boot the system. Also, potentially there could be multiple disks that can appear in a random order depending on the boot race conditions.
*** Bug 11678 has been marked as a duplicate of this bug. ***
Couple of notes before development started: wic supports 2 types of partition UUIDS - for MBR and GPT partition tables. It would be great if both types can be used in FSTAB Please, cover the implementation with tests and add them to wic test suite at meta/lib/oeqa/selftest/cases/wic.py
Noted. Looking into it and will keep you updated, Ed.
Here is a patchset that at least partly fixes this issue: http://lists.openembedded.org/pipermail/openembedded-core/2017-September/142638.html It triggered discussion, which started in Sep when patchset was first sent for review and continued in November: http://lists.openembedded.org/pipermail/openembedded-core/2017-November/143923.html
Given that I've been discussing this with Ed on the list, I'll just take this entry.
(In reply to comment #5) > Given that I've been discussing this with Ed on the list, I'll just take > this entry. No problem. Thank you!
Added Scott as we'll need his help in documenting this.
At this point I've submitted a follow-up series but then Ross found some problems on the auto-builder and I can't replicate them.
At this point now, I've submitted a v4 that fixes the problem Ross found, after he determined what steps were required to reproduce the problem.
I see that Richard has merged this in master now today, moving to resolved.
Hello Ed - referencing your Comment 7 - what changes need to be applied to the docs? Thanks! Kristi
Kristi, this would be better answered by Tom I believe. From my point of view Tom's work added new functionality: ability to use filesystem UUIDs. This should be reflected in the documentation. Tom, can you give us more details on this? PS: Most of the wic related content is now in http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#creating-partitioned-images-using-wic
At a minimum the help output needs to be updated as that's been updated to have a new --fsuuid option, to allow a specific (rather than random) UUID to be used. Other than that, we don't really document why we pass --use-uuid today, so nothing more is strictly required. But we could talk about that using --use-uuid is a good idea for all partitions as it makes the wks file more adaptable to work in the cases where an image could be used via USB or an SD card.
Ed/Tom - Thank you! Tom, since this is marked as RESOLVED, but there are still doc changes needed, do you want to re-open and assign to me or keep as is and let me work on the doc part? Kristi
Re-opening for doc changes and related tracking, thanks!
Tom, I'm using the master branch of poky and tried wic help fsuuid and wic help use-uuid. There is no help on either. Where do I find the help information for this? Thank you! Also, when you type in wic -h you still get a lot of unformatted information. The following is the way the help should look (cut and pasted this from bug 12205) https://bugzilla.yoctoproject.org/show_bug.cgi?id=12205 : The Wic help returned to the user is unreadable. Formatting is non-existent and the amount of information is unnecessary. Here are the commands that return help: $ wic help $ wic --help $ wic -h Wic has 6 commands and 3 topics on which it can return help using the following form: $ wic help [COMMAND or TOPIC] The only command you cannot get help on is the help command. Thus, the following command returns an error: $ wic help help All other help returned for any COMMAND or TOPIC is formatted very well, is readable, and is informative. So commands like the following are all good: $ wic help create $ wic help ls $ wic help list When a user enters general help (wic help), they get a huge listing of unformatted help that spans every facet of the wic command. All the user really needs is help and usage on the wic command itself. It is redundant to provide help on individual COMMANDs or TOPICs. I propose the following help output for general help: $ wic help wic version 0.2.0 Creates a customized OpenEmbedded image. Usage: wic [--version] wic help [COMMAND or TOPIC] wic COMMAND [ARGS] usage 1: Returns the current version of Wic usage 2: Returns detailed help for a COMMAND or TOPIC usage 3: Executes COMMAND COMMAND: list - List available canned images and source plugins ls - List contents of partitioned image or partition rm - Remove files or directories from the vfat or ext* partitions help - Show help for a wic COMMAND or TOPIC write - Write an image to a device cp - Copy files and directories to the vfat or ext* partitions create - Create a new OpenEmbedded image TOPIC: overview - Presents an overall overview of Wic plugins - Presents an overview and API for Wic plugins kickstart - Presents a Wic kicstart file reference Examples: $ wic --version Returns the current version of Wic $ wic help cp Returns the SYNOPSIS and DESCRIPTION for the Wic "cp" command. $ wic list images Returns the list of canned images (i.e. *.wks files located in the /scripts/lib/wic/canned-wks directory. $ wic create mkefidisk -e core-image-minimal Creates an EFI disk image from artifacts used in a previous core-image-minimal build in standard BitBake locations (e.g. Cooked Mode).
All of the content I added is under "wic help kickstart". In specific: This is achieved by wic adding entries to the fstab during image generation. In order for a valid fstab to be generated one of the --ondrive, --ondisk or --use-uuid partition options must be used for - each partition that specifies a mountpoint. + each partition that specifies a mountpoint. Note that with --use-uuid + and non-root <mountpoint>, including swap, the mount program must + understand the PARTUUID syntax. This currently excludes the busybox + versions of these applications. And: + --fsuuid: This option is specific to wic. It specifies filesystem UUID. + It's useful if preconfigured filesystem UUID is added to kernel command line + in bootloader configuration before running wic. In this case .wks file can + be generated or modified to set preconfigured filesystem UUID using this op
Hi Tom, I have updated the following section with the new information you provided in Comment 17. In addition to those you listed, I've updated the list of other supported options that were missing from the documentation. Please review the section and let me know if additional changes are needed. Thanks! http://www.yoctoproject.org/docs/2.5/ref-manual/ref-manual.html#command-part-or-partition -Kristi
LGTM, but I only know the UUID stuff well, thanks!
Thanks Tom, Marking this one RESOLVED and setting the Doc flag to "Done". Kristi