All of lore.kernel.org
 help / color / mirror / Atom feed
* [wic][PATCH] systemd-bootdisk.wks: use PARTUUID
@ 2016-10-24 13:54 Ed Bartosh
  2016-10-24 16:06 ` Benjamin Esquivel
  2016-10-24 17:34 ` Saul Wold
  0 siblings, 2 replies; 4+ messages in thread
From: Ed Bartosh @ 2016-10-24 13:54 UTC (permalink / raw)
  To: openembedded-core; +Cc: benjamin.esquivel

Root device name in systemd-bootdisk.wks is 'sda'. This can cause
images, produced using this wks to refuse booting if real device
name is not 'sda'. For example, when booting MinnowBoard MAX from
MicroSD card the boot process stucks with this message on the boot
console output: Waiting for root device /dev/sda2...
This happens because real device name of MicroSD card on this device
is mmcblk1.

Used --use-uuid option for root partition. This should make
wic to put partiion UUID instead of device name into kernel command
line.

[YOCTO #10485]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 scripts/lib/wic/canned-wks/systemd-bootdisk.wks | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
index b900023..4bd9d6a 100644
--- a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
+++ b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
@@ -4,7 +4,7 @@
 
 part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024
 
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
 
 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [wic][PATCH] systemd-bootdisk.wks: use PARTUUID
  2016-10-24 13:54 [wic][PATCH] systemd-bootdisk.wks: use PARTUUID Ed Bartosh
@ 2016-10-24 16:06 ` Benjamin Esquivel
  2016-10-24 17:34 ` Saul Wold
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Esquivel @ 2016-10-24 16:06 UTC (permalink / raw)
  To: Ed Bartosh, openembedded-core

On Mon, 2016-10-24 at 16:54 +0300, Ed Bartosh wrote:
> Root device name in systemd-bootdisk.wks is 'sda'. This can cause
> images, produced using this wks to refuse booting if real device
> name is not 'sda'. For example, when booting MinnowBoard MAX from
> MicroSD card the boot process stucks with this message on the boot
> console output: Waiting for root device /dev/sda2...
> This happens because real device name of MicroSD card on this device
> is mmcblk1.
> 
> Used --use-uuid option for root partition. This should make
> wic to put partiion UUID instead of device name into kernel command
> line.
This change worked just fine, I tried it both in Minnowboard and Joule
and both boot to login prompt.
> 
> [YOCTO #10485]
> 
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
>  scripts/lib/wic/canned-wks/systemd-bootdisk.wks | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> index b900023..4bd9d6a 100644
> --- a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> +++ b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> @@ -4,7 +4,7 @@
>  
>  part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" 
> --ondisk sda --label msdos --active --align 1024
>  
> -part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> --align 1024
> +part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> --align 1024 --use-uuid
>  
>  part swap --ondisk sda --size 44 --label swap1 --fstype=swap
>  
> -- 
> 2.1.4
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [wic][PATCH] systemd-bootdisk.wks: use PARTUUID
  2016-10-24 13:54 [wic][PATCH] systemd-bootdisk.wks: use PARTUUID Ed Bartosh
  2016-10-24 16:06 ` Benjamin Esquivel
@ 2016-10-24 17:34 ` Saul Wold
  2016-10-25  7:56   ` Ed Bartosh
  1 sibling, 1 reply; 4+ messages in thread
From: Saul Wold @ 2016-10-24 17:34 UTC (permalink / raw)
  To: Ed Bartosh, openembedded-core; +Cc: benjamin.esquivel

On Mon, 2016-10-24 at 16:54 +0300, Ed Bartosh wrote:
> Root device name in systemd-bootdisk.wks is 'sda'. This can cause
> images, produced using this wks to refuse booting if real device
> name is not 'sda'. For example, when booting MinnowBoard MAX from
> MicroSD card the boot process stucks with this message on the boot
> console output: Waiting for root device /dev/sda2...
> This happens because real device name of MicroSD card on this device
> is mmcblk1.
> 
> Used --use-uuid option for root partition. This should make
> wic to put partiion UUID instead of device name into kernel command
> line.
> 
> [YOCTO #10485]
> 
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
>  scripts/lib/wic/canned-wks/systemd-bootdisk.wks | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> index b900023..4bd9d6a 100644
> --- a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> +++ b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> @@ -4,7 +4,7 @@
>  
>  part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" 
> --ondisk sda --label msdos --active --align 1024
>  
> -part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> --align 1024
> +part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> --align 1024 --use-uuid
>  
 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
>  
I understand the --use-uuid for the partition labeling, but how does it
affect everything marked as ondisk sda?  Or is ondisk ignored with use-
uuid?

Sau!
> 
> -- 
> 2.1.4
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [wic][PATCH] systemd-bootdisk.wks: use PARTUUID
  2016-10-24 17:34 ` Saul Wold
@ 2016-10-25  7:56   ` Ed Bartosh
  0 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2016-10-25  7:56 UTC (permalink / raw)
  To: Saul Wold; +Cc: benjamin.esquivel, openembedded-core

On Mon, Oct 24, 2016 at 10:34:40AM -0700, Saul Wold wrote:
> On Mon, 2016-10-24 at 16:54 +0300, Ed Bartosh wrote:
> > Root device name in systemd-bootdisk.wks is 'sda'. This can cause
> > images, produced using this wks to refuse booting if real device
> > name is not 'sda'. For example, when booting MinnowBoard MAX from
> > MicroSD card the boot process stucks with this message on the boot
> > console output: Waiting for root device /dev/sda2...
> > This happens because real device name of MicroSD card on this device
> > is mmcblk1.
> > 
> > Used --use-uuid option for root partition. This should make
> > wic to put partiion UUID instead of device name into kernel command
> > line.
> > 
> > [YOCTO #10485]
> > 
> > Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> > ---
> >  scripts/lib/wic/canned-wks/systemd-bootdisk.wks | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> > b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> > index b900023..4bd9d6a 100644
> > --- a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> > +++ b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks
> > @@ -4,7 +4,7 @@
> >  
> >  part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" 
> > --ondisk sda --label msdos --active --align 1024
> >  
> > -part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> > --align 1024
> > +part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> > --align 1024 --use-uuid
> >  
>  part swap --ondisk sda --size 44 --label swap1 --fstype=swap
> >  
> I understand the --use-uuid for the partition labeling, but how does it
> affect everything marked as ondisk sda?  Or is ondisk ignored with use-
> uuid?

--use-uuid uses PARTUUID to specify root device in kernel command line
instead of /dev/sdaX. In this sense yes, sda is ignored.

However, disk name(sda) is also used to group partitions to one disk image.
Theoretically wic can produce several images if more than one disk name
is used in .wks file.

For swap position sda is still used, which can make swap partitions not
functional on the devices with different disk names. This needs to be fixed
by using PARTUUID in fstab for swap partitions. For this to work in poky images
busybox swapon should support PARTUUID syntax, which I'm not entirely sure it does.

--
Regards,
Ed


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-25  8:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 13:54 [wic][PATCH] systemd-bootdisk.wks: use PARTUUID Ed Bartosh
2016-10-24 16:06 ` Benjamin Esquivel
2016-10-24 17:34 ` Saul Wold
2016-10-25  7:56   ` Ed Bartosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.