<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Perhaps you could try NFS kernel boot option. Set up the remote (tftp root) directory to reflect the path the init code expects.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I tried this for a little while but ran into what 2 issues - network driver init is later than NFS (due to it being a LKM rather than part of kernel), and Avahi screwing around with IP addresses. I looked into the log
to confirm timing for the first one, and fixed this with kernel reconfiguration. However, I've yet to try fixing Avahi (remove it) as I'm not sure how to do it yet.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">My time ran out, and I got another workable solution. So I shelved this NFS approach. If you get this working, would appreciate it if you could publish it, and any issues you run into implementing it.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Raymond</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Vincent Daanen <vincent.daanen@orthotaxy.com><br>
<b>Sent:</b> Thursday, May 3, 2018 11:43 PM<br>
<b>To:</b> Raymond Yeung; yocto@yoctoproject.org<br>
<b>Subject:</b> RE: [yocto] PXE booting ISO image fails with message "Waiting for removable media..."</font>
<div> </div>
</div>
<div lang="EN-GB" link="blue" vlink="purple">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:12.0pt">Hi Raymond,</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> I'd recently gone through similar issue that you're experiencing. The "Waiting for Removable Media" hang had been there for at least 7-8 years. A workaround was put in around 2013. See here: https://patchwork.openembedded.org/patch/42291/</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> Add "debugshell=30" (30 is in second, for timeout, or any other reasonable value that you like) to the append
</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> statement in your pxelinux.cfg/default file. Then you'd timeout when you "normally" hangs, break into a shell,</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> where you could initiate udhcpc to configure networking, after which you could transfer your bootable image onto</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> your RAM, and write out onto your HDD/SSD.</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">Unfortunately, we cannot use this trick because the MB which boots using PXE is not accessible and we want to use PXE booting for every boot…</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> It seems this kernel boot option of debugshell isn't documented officially in kernel-parameters.txt file.</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> You could also look for init-live.sh on your yocto tree, and look for "Waiting for Removable Media", and see the</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">> surrounding code to get a fell how this debugshell thing works.</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">I think this is what we will have to do ..</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">I read the description of the internals of the initrd provided by Archlinux. The main difference is that Yocto initrd searches for the final rootfs on physical device (/dev/sdX) whereas the Archlinux initrd
identifies (using LABEL) the support it was launched from and then searches on this support for the final rootfs.</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">I guess this approach would unify all booting: from USB, CD-ROM and PXE.. But at the moment, I don’t know how to reproduce the archlinux initrd works with Yocto…</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">If only a guru of Yocto could help …</span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:12.0pt">Vincent</span></p>
<div>
<div>
<div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="color:black">Date: Thu, 3 May 2018 14:27:46 +0000<br>
From: Vincent Daanen <<a href="mailto:vincent.daanen@orthotaxy.com" id="LPlnk148599" class="OWAAutoLink" previewremoved="true">vincent.daanen@orthotaxy.com</a>><br>
To: "<a href="mailto:yocto@yoctoproject.org" id="LPlnk455762" class="OWAAutoLink" previewremoved="true">yocto@yoctoproject.org</a>" <<a href="mailto:yocto@yoctoproject.org" id="LPlnk529830" class="OWAAutoLink" previewremoved="true">yocto@yoctoproject.org</a>><br>
Subject: [yocto] PXE booting ISO image fails with message "Waiting for<br>
removable media..."<br>
Message-ID:<br>
<<a href="mailto:VI1P192MB01430B16A66D217CB44829098D870@VI1P192MB0143.EURP192.PROD.OUTLOOK.COM" id="LPlnk390352" class="OWAAutoLink" previewremoved="true">VI1P192MB01430B16A66D217CB44829098D870@VI1P192MB0143.EURP192.PROD.OUTLOOK.COM</a>><br>
<br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
<br>
We want to deploy image created with Yocto (Rocko) via PXE.<br>
The target board is a Intel-based SBC (AAEON GENE BT05).<br>
<br>
At first, we tried with a ISO from Archlinux and the target-board successfully booted.<br>
<br>
Then we create a ISO using Yocto but boot hangs with a message ?Waiting for removable media ...?.<br>
Googling this message points me to this post: <a href="http://thread.gmane.org/gmane.linux.embedded.yocto.general/20611" id="LPlnk713613" class="OWAAutoLink" previewremoved="true">
http://thread.gmane.org/gmane.linux.embedded.yocto.general/20611</a> which relates exactly the same problem, explain why the issue raises, gives an indication to how to fix .. and that?s all ?<br>
<br>
So at this point, we know that the problem comes from the /recipes-core/initrdscripts/files/init-live.sh file.<br>
It seems searching for an /dev/sdx should be protected by a timeout set by default to 30 secs but during our trials, no timeout seems to exist.<br>
<br>
What we do not understand, is how to highlight the differences between the Yocto-based and the Archlinux ISO files so that we can ?unblock? the boot using the Yocto-based ISO file.<br>
<br>
Is the someone here how could help?<br>
<br>
Thanks<br>
<br>
Vincent</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>