Jump to content

Simple Question: What causes automatic reboot/restart as a part of armbian-resize-filesystem?


forestj

Recommended Posts

This is a bunch of background info, scroll down to TL;DR for my question....

Hello,  I am working on developing an application to make single board computers easier to use for non-technical users.  You can think of it as something similar to yunohost or freedombox, but with more hand-holding involved around the hardware & network setup.   I'm trying to enable people like my mother who've never seen or used a terminal/shell before to be able to set up and operate a server in their home.

The general process looks something like this:
 

  1. user downloads my cross platform desktop application called "seedpacket"
  2. they run the app and go through a series of setup wizard screens
  3. one of the screens prompts them to insert an SD card, then the application will flash the SD card with a linux image for their SBC.
  4. seedpacket will then write additional files to the SD card, including things like the user's wifi credentials that they entered earlier on in the wizard.
  5. finally, the user will be prompted to insert the SD card into the SBC and turn it on.
  6. automated setup scripts will run on the SBC and send data to a cloud service, seedpacket will poll this cloud service and display progress information to the user.

 

I want to support installing Armbian this way. So far I have steps 2 thru 5 working. I can flash the image to the SD card and write my custom config files to the SD card as well.  I just tried testing it on my odroid XU4 and it boots, my custom sshd_config & authorized_keys files work, which is great!

Next steps:

  • I want to figure out where to put my script that communicates with the cloud service
  • I want to automate the stuff that happens automatically on first login (/usr/lib/armbian/armbian-firstlogin)
  • I want to automate the process of migrating the OS to a USB SATA device (/usr/sbin/nand-sata-install)

 

I want the script that communicates with the cloud service to be able to post an update ASAP, preferably after the first boot and before it reboots to apply the partition re-sizing on the SD card. 

------------------------  TL;DR  ---------------------------------

 

I just booted Armbian on my odroid XU4 and  I can tell it rebooted once after the first boot, based on the /var/log/armbian-hardware-monitor.log having two boot cycles in it. However, I've been looking through https://github.com/armbian/build/blob/master/packages/bsp/common/usr/lib/armbian/armbian-resize-filesystem and I can't tell for the life of me where/what  causes the system to reboot. Maybe I am just blind and missing something obvious?

I want to understand this because I may want to ensure that some additional steps complete before it reboots.



EDIT 2: :unsure:

 

Soooo it looks like I'm a fool, nothing caused it to restart, because it didn't restart...  I must have rebooted it myself and forgotten about it, because I just re-flashed the SD card, did it again, and it only booted once.  Lol.  At any rate, I will still ask just in case: is there any situation where it will reboot after the first boot ?
 

 

 

Edited by forestj
oops I am a dummy
Link to comment
Share on other sites

I don't think there is any case in which Armbian reboots by itself without asking unless there is an issue with the system (freeze/crash/overheat...). If you do a kernel switch from within armbian-config it tells you that it will reboot.

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines