<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1468956225858_7110"><span>Gentlemen:</span></div><div id="yui_3_16_0_1_1468956225858_7111"><span><br></span></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7113"><span id="yui_3_16_0_1_1468956225858_7112">Thank you for your responses and for directing my attention to Debian. I can now start my own C++ program on the Minnowboard Turbot, without manual intervention, from power up. I offer these notes:</span></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7114"><span><br></span></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7331">A procedure to place Debian on a Minnowboard Turbot with UEFI.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7332">This procedure is a modification for the Minnowboard Turbot of </div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7333">http://forums.debian.net/viewtopic.php?f=16&t=124417</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7334"><br id="yui_3_16_0_1_1468956225858_7335"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7336">1) Download Debian and Shell.efi ...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7337">1a) On a Linux desktop PC (for example Linux Mint Cinnamon with the Nemo file explorer) web browse to </div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7338">http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7339">and download Live ISO:</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7340">debian-live-8.5.0-amd64-lxde-desktop.iso</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7341">1b) Download Shell.efi from</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7342">https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellBinPkg/UefiShell/X64/</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7343">If warned that the file is potentially harmful, click KEEP.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7344">1c) Take note of where the browser puts the .iso and .efi files, perhaps into a folder named Downloads.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7345"><br id="yui_3_16_0_1_1468956225858_7346"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7347">2) Format a microSD as FAT32...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7348">2a) On the desktop PC, start the Nemo file explorer</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7349">2b) Put the microSD into a USB port adapter and plug it into a free USB port. Expect hot plugging to find it.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7350">2c) In Nemo, at the left under Devices look the newly visible line for the microSD. </div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7351">2d) Right click on that line and select Format. Select FAT32 and click the Format button. This takes about 4 seconds.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7352">2e) Click OK and close the "USB Stick Formatter" that you invoked through Nemo.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7353"><br id="yui_3_16_0_1_1468956225858_7354"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7355">3) Extract the Debian ISO to the microSD.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7356">3a) With Nemo, open the Downloads folder, right click on the Debian .iso file just downloaded, and select "Open with Archive Manager".</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7357">3b) Push "Extract". Then, in the left pane of the window, find the microSD device. Select Extract. This takes about 3 minutes. Ignore the error about "File system does not support symbolic links". Close the Archive Manager and the window showing the extracted files.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7358"><br id="yui_3_16_0_1_1468956225858_7359"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7360">4) Add files to enable UEFI booting...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7361">4a) With Nemo, click on the microSD device to view the files just extracted and now resident on the microSD.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7362">4b) With the file menu, "create new folder", to make a new folder named EFI (all caps might be important).</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7363">4c) In a similar way, make a new folder under EFI named BOOT.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7364">4d) Copy Shell.efi from Downloads into the new microSD folder /EFI/BOOT.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7365">4e) Using a text editor such as gedit, create a new file containing this line</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7366">live\vmlinuz initrd=live\initrd.img append boot=live components</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7367">4f) Use "save as" to put that file on the microSD, root directory, named startup.nsh.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7368"><br id="yui_3_16_0_1_1468956225858_7369"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7370">5) Boot Debian on the Minnowboard Turbot from microSD...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7371">5a) On the desktop PC, Nemo, right click on the microSD device and select Eject.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7372">5b) Remove the USB adapter containing the microSD from the desktop PC.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7373">5c) Remove the microSD card from its USB adapter.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7374">5d) With Minnowboard power off, orient the microSD card so that the gold contacts face up relative to the Minnowboard.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7375">5e) Insert the microSD into its holder on the Minnowboard. It will click into place. (Later, you also push to release and remove).</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7376">5f) Power up the Minnowboard. Startup takes 80 seconds with reassuring messages as it comes up and with only one anxiety-causing blank screen lasting 11 seconds.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7377"><br id="yui_3_16_0_1_1468956225858_7378"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7379">6) Optionally, add your own files to the microSD...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7380">6a) Return the microSD to the desktop PC.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7381">6b) Using Nemo, add files to the microSD to the root directory or in a new folder of your choice.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7382">6c) Move the microSD back to the Minnowboard and reboot.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7383">6d) Start menu, Accessories, Disks, click "SD Card Reader". Under contents, notice the link after "Mounted at" (/lib/live/mount/medium). Click that link.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7384">6e) Locate your files in the file explorer window that pops up.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7385"><br id="yui_3_16_0_1_1468956225858_7386"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7387"><br id="yui_3_16_0_1_1468956225858_7388"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7389">Opinion - this procedure has these advantages:</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7390">* Installs a Minnowboard Turbot UEFI-bootable Linux on microSD using only three common GUI-based utilities:</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7391">** a web browser to download two files</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7392">** a file explorer to format FAT32 and place files on a microSD</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7393">** a text editor to put one line in one file on the microSD</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7394">---- No need for UNetbootin, gparted, Disks, "Create Bootable USB stick", or to "remaster" an .ISO. </div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7395">* Boots to the LXDE desktop on powerup without manual intervention.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7396">* Add your own files without .ISO compression, "remaster", or squashfs utilities (although I describe that next).</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7397">* Preliminary conclusion: if you start an application that does not require disk I/O after loading, you can actually unplug the microSD to verify that Linux isn't doing microSD writes behind the scenes.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7398">* Preliminary conclusion: no need to change the UEFI boot order (which I suspect of being faulty - sometimes forgets the boot order you set&save).</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7399"><br id="yui_3_16_0_1_1468956225858_7400"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7401">and at least one disadvantage:</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7402">* because this is a "live cd", changes made to files on the Minnowboard are not actually written to the microSD and do not survive reboot.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7403"><br id="yui_3_16_0_1_1468956225858_7404"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7405">UNIX systems have a root directory at the top of a file system which is mounted and available after booting. With "Live CD" distributions such as the one used here, that file system is compressed and placed on the microSD in /live/filesystem.squashfs. This becomes the file system that you see on the Minnowboard when invoking file explorer utilities or invoking console commands like ls. What follows is a procedure for adding your own files to this (squashed) file system on the microSD.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7406"><br id="yui_3_16_0_1_1468956225858_7407"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7408">7) Optionally, add your own files to the squashed file system...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7409">7a) If not already present, on your desktop PC, use Start, Administration, Software Manager, to install squashfs-tools.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7410">7b) With the microSD back in your desktop PC, copy /live/filesystem.squashfs from the microSD to a folder of your choice, perhaps unsq. </div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7411">7c) Start a terminal window, log in as root, and enter</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7412">unsquashfs -f -d unsq/ filesystem.squashfs</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7413">It will take about one minute to unsquash the file system into a directory named unsq.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7414"><br id="yui_3_16_0_1_1468956225858_7415"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7416">--- you may repeat from here down ---</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7417"><br id="yui_3_16_0_1_1468956225858_7418"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7419">7d) Make modifications of your choice to the files in the unsq directory. Because the unsquashed files are owned by root, I find it convenient to use Nemo, "Open as root" to gain write permissions.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7420">7e) Again from the terminal window enter</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7421"> (skip this the first time or just ignore the error) rm resquashedfs</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7422"> mksquashfs unsq/ resquashedfs</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7423">This takes about 4 minutes.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7424">The new file resquashedfs contains your modified file system and needs to be moved to the microSD and named filesystem.squashfs, so...</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7425">7f) In Nemo, accessing the microSD, delete live/filesystem.squashfs.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7426">7g) Copy and paste resquashedfs into the microSD in the live directory. This takes about two minutes even though the Nemo progress bar immediately shows 90% completion.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7427">7h) Rename requashedfs to filesystem.squashfs</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7428">7i) As before, eject the microSD with Nemo, insert into the Minnowboard, and reboot.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7429">You may make repeated changes to the Minnowboard file system by repeating steps 7d onward.</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7430"><br id="yui_3_16_0_1_1468956225858_7431"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7432">8) Optionally, start your program in a terminal window after Minnowboard reboot</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7433">8a) At step 7d, place an executable file, perhaps named hello_world in /usr/local/bin (which is in the PATH of this Linux build)</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7434">8b) Also append this line</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7435">@lxterminal -e /usr/local/bin/hello_world</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7436">to</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7115"></div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7437">/etc/xdg/lxsession/LXDE/autostart</div><div dir="ltr" id="yui_3_16_0_1_1468956225858_7438"><br id="yui_3_16_0_1_1468956225858_7439"></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, July 15, 2016 4:10 PM, John 'Warthog9' Hawley <warthog9@eaglescrag.net> wrote:<br></font></div> <br><br> <div class="y_msg_container">Some of the rescue CDs have a good way to run straight out of RAM, worth<br clear="none">looking into spinning a custom one of those (knoppix comes to mind as<br clear="none">having done that), not sure what's available these days but it's<br clear="none">completely doable. If your stuff is small enough you could run it out<br clear="none">of the initrd potentially.<br clear="none"><br clear="none">- John<br clear="none"><div class="yqt6312541741" id="yqtfd52195"><br clear="none">On 07/15/2016 02:32 PM, Jim Elliott wrote:<br clear="none">> I have an application that will run continuously, interrupted only by a<br clear="none">> power failure from the electric utility. I would be interested in<br clear="none">> suggestions on how to meet these goals:<br clear="none">> * OS and my executable resident on the microSD<br clear="none">> * both USB ports on the Minnowboard (Turbot) are taken, they cannot hold<br clear="none">> a USB flash drive containing my executable.<br clear="none">> * at power up the OS and my application start without manual intervention.<br clear="none">> * no writes to the microSD after initialization - my application does<br clear="none">> not perform any I/O to the storage device after initialization.<br clear="none">> * at powerup, initialization can be slow - no problem if it takes two<br clear="none">> minutes or so.<br clear="none">> <br clear="none">> Thanks for all ideas!<br clear="none">> Jim</div><br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> _______________________________________________<br clear="none">> elinux-MinnowBoard mailing list<br clear="none">> <a shape="rect" ymailto="mailto:elinux-MinnowBoard@lists.elinux.org" href="mailto:elinux-MinnowBoard@lists.elinux.org">elinux-MinnowBoard@lists.elinux.org</a><br clear="none">> <a shape="rect" href="http://lists.elinux.org/mailman/listinfo/elinux-minnowboard" target="_blank">http://lists.elinux.org/mailman/listinfo/elinux-minnowboard</a><div class="yqt6312541741" id="yqtfd81832"><br clear="none">> <br clear="none"><br clear="none"></div><br><br></div> </div> </div> </div></div></body></html>