mail archive of the rauc mailing list
 help / color / mirror / Atom feed
* [RAUC] Issues when executing rauc ,while booting from usb
@ 2018-10-18 11:02 Abhishek Kumar Rai
  2018-10-18 13:07 ` Enrico Joerns
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Kumar Rai @ 2018-10-18 11:02 UTC (permalink / raw)
  To: rauc


[-- Attachment #1.1: Type: text/plain, Size: 3844 bytes --]

Hi Team,


I am working on boot from a USB flash drive and try to flash the data
(rfs/appfs) to MMC partitions using RAUC. I am  currently facing some
issues on the same. The same scenario works well when we boot from NFS and
try to flash the data to MMC partitions.


By attempting to boot from a flash drive partition that has RAUC and trying
to install the bundle to MMC are we trying to do something that RAUC
supports or are we missing something?


Please find the related logs for USB flash drive based RAUC installation
attempt below


*root@test:~# rauc install test.raucb *
rauc-Message: installing /home/root/test.raucb: installing
rauc-Message: installing /home/root/test.raucb:   0% Installing
rauc-Message: installing /home/root/test.raucb:   0% Determining slot states
rauc-Message: installing /home/root/test.raucb:  20% Determining slot
states failed.
rauc-Message: installing /home/root/test.raucb: 100% Installing failed.
*rauc-Message: installing /home/root/test.raucb: LastError: Did not find
booted slot*
Installing `/home/root/test.raucb` failed
root@test:~#
root@test:~#
root@test:~#
*root@test:~# rauc status*
*rauc-Message: Failed to resolve realpath for
'/dev/disk/by-partuuid/00000000-01'*
Failed to determine slot states: Did not find booted slot
root@test:~#
root@test:~#
root@test:~#
root@test:~#
*root@test:~# /usr/bin/rauc --mount=/run/rauc service*
*rauc-Message: Failed to resolve realpath for
'/dev/disk/by-partuuid/00000000-01'*
rauc-Message: Failed to obtain name de.pengutronix.rauc
root@test:~#
root@test:~#
root@test:~#
*root@test:~# ps ax | grep rauc*
  380 ?        Ssl    0:00 /usr/bin/rauc --mount=/run/rauc service
  392 ttymxc0  S+     0:00 grep rauc
root@test:~#
root@test:~#
*root@test:~# rauc status*
*rauc-Message: Failed to resolve realpath for
'/dev/disk/by-partuuid/00000000-01'*
Failed to determine slot states: Did not find booted slot
root@test:~#
root@test:~#
root@test:~#
*root@test:~# rauc install test.raucb *
rauc-Message: installing /home/root/test.raucb: installing
rauc-Message: installing /home/root/test.raucb:   0% Installing
rauc-Message: installing /home/root/test.raucb:   0% Determining slot states
rauc-Message: installing /home/root/test.raucb:  20% Determining slot
states failed.
rauc-Message: installing /home/root/test.raucb: 100% Installing failed.
*rauc-Message: installing /home/root/test.raucb: LastError: Did not find
booted slot*
rauc-Message: installing /home/root/test.raucb: idle
Installing `/home/root/test.raucb` failed

Please provide your valuable suggestions and input on the same

Regards,
Abhishek

-- 














The information contained in this e-mail message (including 
any 


attachments) may be confidential, proprietary, privileged, or 
otherwise


exempt from disclosure under applicable laws. It is intended to 
be 


conveyed only to the designated recipient(s). Any use, dissemination, 



distribution, printing, retaining or copying of this e-mail (including 
its 


attachments) by unintended recipient(s) is strictly prohibited and 
may 


be unlawful. If you are not an intended recipient of this e-mail, or 
believe 


that you have received this e-mail in error, please notify the 
sender 


immediately (by replying to this e-mail), delete any and all 
copies of 


this e-mail (including any attachments) from your system, and 
do not


disclose the content of this e-mail to any other person. Thank you 
for your cooperation.






-- 
_This e-mail message (including any attachments) may be confidential, 
proprietary, privileged, or otherwise exempt from disclosure under 
applicable laws. If you are not an intended recipient, please delete this 
message. Thank you.
_

[-- Attachment #1.2: Type: text/html, Size: 8637 bytes --]

[-- Attachment #2: Type: text/plain, Size: 65 bytes --]

_______________________________________________
RAUC mailing list

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

* Re: [RAUC] Issues when executing rauc ,while booting from usb
  2018-10-18 11:02 [RAUC] Issues when executing rauc ,while booting from usb Abhishek Kumar Rai
@ 2018-10-18 13:07 ` Enrico Joerns
  2018-10-23  9:16   ` Abhishek Kumar Rai
  0 siblings, 1 reply; 4+ messages in thread
From: Enrico Joerns @ 2018-10-18 13:07 UTC (permalink / raw)
  To: Abhishek Kumar Rai; +Cc: rauc

Hi Abhishek,

On 10/18/18 1:02 PM, Abhishek Kumar Rai wrote:
> Hi Team,
> 
> I am working on boot from a USB flash drive and try to flash the data (rfs/appfs) to MMC partitions using RAUC. I am  currently facing some issues on the same. The same scenario works well when we boot from NFS and try to flash the data to MMC partitions.
> 
> By attempting to boot from a flash drive partition that has RAUC and trying to install the bundle to MMC are we trying to do something that RAUC supports or are we missing something?
> 
> Please find the related logs for USB flash drive based RAUC installation attempt below
> 
> *root@test:~# /usr/bin/rauc --mount=/run/rauc service*
> *rauc-Message: Failed to resolve realpath for '/dev/disk/by-partuuid/00000000-01'*
> rauc-Message: Failed to obtain name de.pengutronix.rauc
> root@test:~#
> root@test:~#
> root@test:~#
> *root@test:~# ps ax | grep rauc*
> 380 ?        Ssl    0:00 /usr/bin/rauc --mount=/run/rauc service
> 392 ttymxc0  S+     0:00 grep rauc
> root@test:~#
> root@test:~#
> *root@test:~# rauc status*
> *rauc-Message: Failed to resolve realpath for '/dev/disk/by-partuuid/00000000-01'*
> Failed to determine slot states: Did not find booted slot
> Please provide your valuable suggestions and input on the same

this all shows the same issue, RAUC cannot resolve the /dev/disk/by-partuuid/00000000-01 symlink
to the actual device. What does

   ls -la /dev/disk/by-partuuid/00000000-01

give you?

What RAUC tries is pretty much the same as

   realpath /dev/disk/by-partuuid/00000000-01

does this work calling manually? Maybe it's an issue that you do not have a disk ID set.


Best regards, Enrico

-- 
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
RAUC mailing list

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

* Re: [RAUC] Issues when executing rauc ,while booting from usb
  2018-10-18 13:07 ` Enrico Joerns
@ 2018-10-23  9:16   ` Abhishek Kumar Rai
  2018-11-06  9:57     ` Enrico Joerns
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Kumar Rai @ 2018-10-23  9:16 UTC (permalink / raw)
  To: ejo; +Cc: rauc


[-- Attachment #1.1: Type: text/plain, Size: 6099 bytes --]

Hi Enrico,

Thanks for your prompt reply.


For us the 'realpath' command is working fine. The devices do exist at the
respective location. Below are the logs from our end for the post-boot
scenario and the bootargs. It seems RAUC is trying to look for device '
00000000-01' whereas the actual device is '1b325bba-01'. Is there a way we
can configure RAUC in userspace to look for device 1b32bba-01 in place of
00000000-01?


*Kernel bootargs*

*MMC: *
Kernel command line: console=ttymxc0,115200 root=PARTUUID=*1b325bba*-01
rootwait rw *rauc.slot=A* video=mxcfb0:dev=lcd,TRULY-WVGA,if=RGB24,rotate

=3 consoleblank=0 vt.global_cursor_default=0

*USB:*

Kernel command line: console=ttymxc0,115200 root=PARTUUID=*00000000*-01
rootwait rw video=mxcfb0:dev=lcd,TRULY-WVGA,if=RGB24,rotate=3 consolebl

ank=0 vt.global_cursor_default=0


*USB post-boot logs*

*root@test:~# mount*
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
...

...
root@test:~#
root@test:~#
root@test:~#
*root@test:~# ls /dev/disk/by-partuuid/**
/dev/disk/by-partuuid/1b325bba-01  /dev/disk/by-partuuid/1b325bba-03
/dev/disk/by-partuuid/1b325bba-05
/dev/disk/by-partuuid/1b325bba-02  /dev/disk/by-partuuid/1b325bba-04
root@test:~#
root@test:~#
*root@test:~# realpath /dev/disk/by-partuuid/**
/dev/mmcblk1p1
/dev/mmcblk1p2
/dev/mmcblk1p3
/dev/mmcblk1p4
/dev/mmcblk1p5
root@test:~#
root@test:~#
*root@test:~# rauc status*
rauc-Message: Failed to resolve realpath for '/dev/disk/by-partuuid/
*00000000*-01'
Failed to determine slot states: Did not find booted slot


*MMC post-boot logs*

*root@test:~# mount*
/dev/mmcblk1p1 on / type ext4 (rw,relatime,data=ordered)
...

...
root@test:~# ls /dev/disk/by-partuuid/*
/dev/disk/by-partuuid/1b325bba-01  /dev/disk/by-partuuid/1b325bba-03
/dev/disk/by-partuuid/1b325bba-05
/dev/disk/by-partuuid/1b325bba-02  /dev/disk/by-partuuid/1b325bba-04
root@test:~#
root@test:~#
*root@test:~# realpath /dev/disk/by-partuuid/*   *

/dev/mmcblk1p1
/dev/mmcblk1p2
/dev/mmcblk1p3
/dev/mmcblk1p4
/dev/mmcblk1p5
root@test:~#
root@test:~#
root@test:~#
root@test:~#
*root@test:~# rauc status*
Compatible:  klondike-test
Variant:     (null)
Booted from: A
Activated:   rootfs.0
slot states:
  rootfs.0: class=rootfs,
device=/dev/disk/by-path/platform-219c000.usdhc-part1, type=ext4, bootname=A
      state=booted, description=, parent=(none), mountpoint=(none)
      boot status=good
  rootfs.1: class=rootfs,
device=/dev/disk/by-path/platform-219c000.usdhc-part2, type=ext4, bootname=B
      state=inactive, description=, parent=(none), mountpoint=(none)
      boot status=bad

root@test:~#

Regards,

Abhishek

On Thu, Oct 18, 2018 at 6:37 PM Enrico Joerns <ejo@pengutronix.de> wrote:

> Hi Abhishek,
>
> On 10/18/18 1:02 PM, Abhishek Kumar Rai wrote:
> > Hi Team,
> >
> > I am working on boot from a USB flash drive and try to flash the data
> (rfs/appfs) to MMC partitions using RAUC. I am  currently facing some
> issues on the same. The same scenario works well when we boot from NFS and
> try to flash the data to MMC partitions.
> >
> > By attempting to boot from a flash drive partition that has RAUC and
> trying to install the bundle to MMC are we trying to do something that RAUC
> supports or are we missing something?
> >
> > Please find the related logs for USB flash drive based RAUC installation
> attempt below
> >
> > *root@test:~# /usr/bin/rauc --mount=/run/rauc service*
> > *rauc-Message: Failed to resolve realpath for
> '/dev/disk/by-partuuid/00000000-01'*
> > rauc-Message: Failed to obtain name de.pengutronix.rauc
> > root@test:~#
> > root@test:~#
> > root@test:~#
> > *root@test:~# ps ax | grep rauc*
> > 380 ?        Ssl    0:00 /usr/bin/rauc --mount=/run/rauc service
> > 392 ttymxc0  S+     0:00 grep rauc
> > root@test:~#
> > root@test:~#
> > *root@test:~# rauc status*
> > *rauc-Message: Failed to resolve realpath for
> '/dev/disk/by-partuuid/00000000-01'*
> > Failed to determine slot states: Did not find booted slot
> > Please provide your valuable suggestions and input on the same
>
> this all shows the same issue, RAUC cannot resolve the
> /dev/disk/by-partuuid/00000000-01 symlink
> to the actual device. What does
>
>    ls -la /dev/disk/by-partuuid/00000000-01
>
> give you?
>
> What RAUC tries is pretty much the same as
>
>    realpath /dev/disk/by-partuuid/00000000-01
>
> does this work calling manually? Maybe it's an issue that you do not have
> a disk ID set.
>
>
> Best regards, Enrico
>
> --
> Pengutronix e.K.                           | Enrico Jörns                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
>

-- 














The information contained in this e-mail message (including 
any 


attachments) may be confidential, proprietary, privileged, or 
otherwise


exempt from disclosure under applicable laws. It is intended to 
be 


conveyed only to the designated recipient(s). Any use, dissemination, 



distribution, printing, retaining or copying of this e-mail (including 
its 


attachments) by unintended recipient(s) is strictly prohibited and 
may 


be unlawful. If you are not an intended recipient of this e-mail, or 
believe 


that you have received this e-mail in error, please notify the 
sender 


immediately (by replying to this e-mail), delete any and all 
copies of 


this e-mail (including any attachments) from your system, and 
do not


disclose the content of this e-mail to any other person. Thank you 
for your cooperation.






-- 
_This e-mail message (including any attachments) may be confidential, 
proprietary, privileged, or otherwise exempt from disclosure under 
applicable laws. If you are not an intended recipient, please delete this 
message. Thank you.
_

[-- Attachment #1.2: Type: text/html, Size: 16145 bytes --]

[-- Attachment #2: Type: text/plain, Size: 65 bytes --]

_______________________________________________
RAUC mailing list

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

* Re: [RAUC] Issues when executing rauc ,while booting from usb
  2018-10-23  9:16   ` Abhishek Kumar Rai
@ 2018-11-06  9:57     ` Enrico Joerns
  0 siblings, 0 replies; 4+ messages in thread
From: Enrico Joerns @ 2018-11-06  9:57 UTC (permalink / raw)
  To: Abhishek Kumar Rai; +Cc: rauc

Hi Abhishek,

I fear I left this mail uncommented..

On 10/23/18 11:16 AM, Abhishek Kumar Rai wrote:
> Hi Enrico,
> 
> Thanks for your prompt reply.
> 
> For us the 'realpath' command is working fine. The devices do exist at the respective location. Below are the logs from our end for the post-boot scenario and the bootargs. It seems RAUC is trying to look for device '00000000-01' whereas the actual device is '1b325bba-01'.__Is there a way we can configure RAUC in userspace to look for device 1b32bba-01 in place of 00000000-01?_
> 
> _*Kernel bootargs*_
> 
> _*MMC: *_
> Kernel command line: console=ttymxc0,115200 root=PARTUUID=*1b325bba*-01 rootwait rw *rauc.slot=A* video=mxcfb0:dev=lcd,TRULY-WVGA,if=RGB24,rotate
> 
> =3 consoleblank=0 vt.global_cursor_default=0
> 
> _*USB:*_
> 
> Kernel command line: console=ttymxc0,115200 root=PARTUUID=*00000000*-01 rootwait rw video=mxcfb0:dev=lcd,TRULY-WVGA,if=RGB24,rotate=3 consolebl
> 
> ank=0 vt.global_cursor_default=0

In USB boot, PARTUUID is 00000000 and realpath won't work for this. You need to set a valid disk id in your USB MBR in order to make this work.

> _*USB post-boot logs*_
> 
> *root@test:~# mount*
> /dev/sda1 on / type ext4 (rw,relatime,data=ordered)
> ...
> 
> ...
> root@test:~#
> root@test:~#
> root@test:~#
> *root@test:~# ls /dev/disk/by-partuuid/**
> /dev/disk/by-partuuid/1b325bba-01  /dev/disk/by-partuuid/1b325bba-03  /dev/disk/by-partuuid/1b325bba-05
> /dev/disk/by-partuuid/1b325bba-02  /dev/disk/by-partuuid/1b325bba-04
> root@test:~#
> root@test:~#
> *root@test:~# realpath /dev/disk/by-partuuid/**
> /dev/mmcblk1p1
> /dev/mmcblk1p2
> /dev/mmcblk1p3
> /dev/mmcblk1p4
> /dev/mmcblk1p5

Your logs show that there are definitely no /dev/disk/by-partuuid-symlinks for the USB stick (and thus that realpath does not work for USB; as you can see there are only mmc-symlinks).
Of course your eMMC is still fine, but you do not boot from it.

> root@test:~#
> root@test:~#
> *root@test:~# rauc status*
> rauc-Message: Failed to resolve realpath for '/dev/disk/by-partuuid/*00000000*-01'
> Failed to determine slot states: Did not find booted slot

Yes, RAUC needs to detect where it is booted from to operate safely.

One option is to obtain this info from the root= by finding the appropriate root device.
Another (actually the preferred) option of identifying the booted device in RAUC is to pass this information explictily from the bootloader via kernel command line arg 'rauc.slot=<bootname>'.

> _*MMC post-boot logs*_
> 
> *root@test:~# mount*
> /dev/mmcblk1p1 on / type ext4 (rw,relatime,data=ordered)
> ...
> 
> ...
> root@test:~# ls /dev/disk/by-partuuid/*
> /dev/disk/by-partuuid/1b325bba-01  /dev/disk/by-partuuid/1b325bba-03  /dev/disk/by-partuuid/1b325bba-05
> /dev/disk/by-partuuid/1b325bba-02  /dev/disk/by-partuuid/1b325bba-04
> root@test:~#
> root@test:~#
> *root@test:~# realpath /dev/disk/by-partuuid/* ***
> /dev/mmcblk1p1
> /dev/mmcblk1p2
> /dev/mmcblk1p3
> /dev/mmcblk1p4
> /dev/mmcblk1p5
> root@test:~#
> root@test:~#
> root@test:~#
> root@test:~#
> *root@test:~# rauc status*
> Compatible:  klondike-test
> Variant:     (null)
> Booted from: A
> Activated:   rootfs.0
> slot states:
>    rootfs.0: class=rootfs, device=/dev/disk/by-path/platform-219c000.usdhc-part1, type=ext4, bootname=A
>        state=booted, description=, parent=(none), mountpoint=(none)
>        boot status=good
>    rootfs.1: class=rootfs, device=/dev/disk/by-path/platform-219c000.usdhc-part2, type=ext4, bootname=B
>        state=inactive, description=, parent=(none), mountpoint=(none)
>        boot status=bad
> 
> root@test:~#

Ok, this works fine as expected :)


Best regards, Enrico

-- 
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
RAUC mailing list

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

end of thread, other threads:[~2018-11-06  9:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 11:02 [RAUC] Issues when executing rauc ,while booting from usb Abhishek Kumar Rai
2018-10-18 13:07 ` Enrico Joerns
2018-10-23  9:16   ` Abhishek Kumar Rai
2018-11-06  9:57     ` Enrico Joerns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox