Skip to contentSkip to conversation

wic/wks boot using labels instead of partitions

DISCUSSION Mark Hatle 2 participants 3 messages Sep 16, 2022 – Sep 17, 2022

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

Is there a way to tell the _generated_ fstab to use labels to boot and not hard coded partitions?

If I remove the --ondisk <device> attribute from the wks file it defaults to /dev/sda.

What I tried was:

part /boot --source bootimg-partition --fstype=vfat --label boot --active --align 4 size 16 part / --source rootfs --fstype=ext4 --label root --align 4

If I manually add --no-fstab-update to the wks entries and add the following to the system default fstab:

LABEL=boot /boot vfat default 0 2

This works. But I'd like to automate it within the wks.

(Alternatively I could use uuid instead of label booting, but either case, I need to only boot with the uuid or label -- not the partition as the location of the disk can change.)

--Mark

#1 lore raw

--use-label

This should do it.

Am Fr, 16. Sep 2022 um 16:41:48 -0500 schrieb Mark Hatle <[email protected]>:

Quoted 30 lines

Is there a way to tell the _generated_ fstab to use labels to boot and not hard coded partitions?

If I remove the --ondisk <device> attribute from the wks file it defaults to /dev/sda.

What I tried was:

part /boot --source bootimg-partition --fstype=vfat --label boot --active --align 4 size 16
part / --source rootfs --fstype=ext4 --label root --align 4

If I manually add --no-fstab-update to the wks entries and add the following to the system default fstab:

LABEL=boot /boot vfat default 0 2

This works. But I'd like to automate it within the wks.

(Alternatively I could use uuid instead of label booting, but either case, I need to only boot with the uuid or label -- not the partition as the location of the disk can change.)

--Mark

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170823): <https://lists.openembedded.org/g/openembedded-core/message/170823>
Mute This Topic: <https://lists.openembedded.org/mt/93732744/3618223>
Group Owner: [email protected] <mailto:[email protected]>
Unsubscribe: <https://lists.openembedded.org/g/openembedded-core/unsub> [[email protected] <mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw

Thank you, this worked perfectly.

Quoted 19 lines · Markus Volk

--use-label

This should do it.

Am Fr, 16. Sep 2022 um 16:41:48 -0500 schrieb Mark Hatle <[email protected]>:

Quoted 4 lines

Is there a way to tell the _generated_ fstab to use labels to boot and not hard coded partitions? If I remove the --ondisk <device> attribute from the wks file it defaults to /dev/sda. What I tried was: part /boot --source bootimg-partition --fstype=vfat --label boot --active --align 4 size 16 part / --source rootfs --fstype=ext4 --label root --align 4 If I manually add
--no-fstab-update to the wks entries and add the following to the system
default fstab: LABEL=boot /boot vfat default 0 2 This works. But I'd like to automate it within the wks. (Alternatively I could use uuid instead of label booting, but either case, I need to only boot with the uuid or label -- not the partition as the location of the disk can change.) --Mark

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170825): https://lists.openembedded.org/g/openembedded-core/message/170825
Mute This Topic: https://lists.openembedded.org/mt/93732744/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-