Petitboot using Serial Console

Post Reply
Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Petitboot using Serial Console

Post by Richard Schaefer »

I pretty much run all of my SBC (N2+ most recently) in a headless + wifi connected configuration.
I like to do initial boot config using the console ... then SSH to do everthing after booted.
Is it posible to configure Petitboot to use the serial console instead of the HDMI and connected to keyboard and/or mouse ?

I would not have a problem building my own petitboot image ... or editing the existing image.

User avatar
tobetter
Posts: 7861
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 442 times
Been thanked: 1227 times
Contact:

Re: Petitboot using Serial Console

Post by tobetter »

I am wondering what you want to change the config in the command line, boot order or something else?

Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: Petitboot using Serial Console

Post by Richard Schaefer »

I would like to use Petitboot and USB OTG ... to reflash without having to pull out the eMMC card and pluging it into an adapter.
So I need to drop to petetboot shell and issue ums command.
Two cables to hook up Serial Console and OTG usb port to my PC.
Then I can use my existing monitor, mouse, and keyboard (connected to PC and NOT to N2)
I hate needing to use multiple keyboards and mice ...

User avatar
tobetter
Posts: 7861
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 442 times
Been thanked: 1227 times
Contact:

Re: Petitboot using Serial Console

Post by tobetter »

Richard Schaefer wrote:
Fri Jun 04, 2021 3:22 am
I would like to use Petitboot and USB OTG ... to reflash without having to pull out the eMMC card and pluging it into an adapter.
So I need to drop to petetboot shell and issue ums command.
Two cables to hook up Serial Console and OTG usb port to my PC.
Then I can use my existing monitor, mouse, and keyboard (connected to PC and NOT to N2)
I hate needing to use multiple keyboards and mice ...
You will have serial console through UART debugging port and can run commands ums. Only not possible to select a boot entry from the console.

Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: Petitboot using Serial Console

Post by Richard Schaefer »

Need to keep it from auto boothing last config

User avatar
tobetter
Posts: 7861
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 442 times
Been thanked: 1227 times
Contact:

Re: Petitboot using Serial Console

Post by tobetter »

Richard Schaefer wrote:
Fri Jun 04, 2021 3:48 am
Need to keep it from auto boothing last config
Sorry, can you explain more?

Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: Petitboot using Serial Console

Post by Richard Schaefer »

When you boot with SPI ... you have 10 seconds to get into the graphical PetitBoot config before it starts booting (i.e. from eMMC)
I do not want it to boot ... I want to upgrade the eMMC.

User avatar
tobetter
Posts: 7861
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 442 times
Been thanked: 1227 times
Contact:

Re: Petitboot using Serial Console

Post by tobetter »

Richard Schaefer wrote:
Fri Jun 04, 2021 4:19 am
When you boot with SPI ... you have 10 seconds to get into the graphical PetitBoot config before it starts booting (i.e. from eMMC)
I do not want it to boot ... I want to upgrade the eMMC.
You cannot stop autobooting from UART console, technically you can but it depends how fast you complete the command in 10 seconds. UART console does not require to login so once you have a prompt run ums /dev/mmcblk0, this will connect your eMMC to PC and OS booting from eMMC will stop.

Do you have any other OS installed to other memory cards?

Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: Petitboot using Serial Console

Post by Richard Schaefer »

No other bootable partitions ... so that should work. I will try ... but for me to type that without mistakes in 10s ... thats a challenge ;)

Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: Petitboot using Serial Console

Post by Richard Schaefer »

Tried starting ums ... did not work . Gets a wake-on-lan signal after 10s than continues the boot process.

User avatar
tobetter
Posts: 7861
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 442 times
Been thanked: 1227 times
Contact:

Re: Petitboot using Serial Console

Post by tobetter »

Richard Schaefer wrote:
Fri Jun 04, 2021 9:07 am
Tried starting ums ... did not work . Gets a wake-on-lan signal after 10s than continues the boot process.
What error do you have after ums /dev/mmcblk0?
How do you know if wake-on-lan signal is triggered?

Richard Schaefer
Posts: 59
Joined: Wed Oct 11, 2017 9:40 am
languages_spoken: english
ODROIDs: C1, C2, HC1, XU4, N2
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: (Solved) Petitboot using Serial Console

Post by Richard Schaefer »

No error from ums command.
The wake-on-lan is displayed in the console ... after 10 seconds ... then it boots from the eMMC partition.

I did find a solution.
On the console, before the 10s timeout I type:
petitboot-nc
This brings up the curses based client-server user interface to petitboot. So now there are two user interfaces running (One on graphical screen and one on console). I can exit to the shell from there ... and it does not timeout in 10 seconds.

User avatar
tobetter
Posts: 7861
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 442 times
Been thanked: 1227 times
Contact:

Re: (Solved) Petitboot using Serial Console

Post by tobetter »

Richard Schaefer wrote:
Fri Jun 04, 2021 9:57 am
No error from ums command.
The wake-on-lan is displayed in the console ... after 10 seconds ... then it boots from the eMMC partition.
Maybe UMS has been disconnected?
I believe ums command unmount the storage before connecting to PC and the Petitboot does not proceed the booting from it.
That would be another logging before auto boot up...
I did find a solution.
On the console, before the 10s timeout I type:
petitboot-nc
This brings up the curses based client-server user interface to petitboot. So now there are two user interfaces running (One on graphical screen and one on console). I can exit to the shell from there ... and it does not timeout in 10 seconds.
Well...actually it would work but...then screen is messy in the serial terminal. Good idea to run two Petitboot instances for workaround. :)
Alternatively, you would be able to click Hardkernel's IR remote, if you have, to move the menu entries in the Petitboot if you don't connect HDMI display.
These users thanked the author tobetter for the post:
Richard Schaefer (Sat Jun 05, 2021 2:16 am)

User avatar
mad_ady
Posts: 9471
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 604 times
Been thanked: 679 times
Contact:

Re: Petitboot using Serial Console

Post by mad_ady »

Richard Schaefer wrote:When you boot with SPI ... you have 10 seconds to get into the graphical PetitBoot config before it starts booting (i.e. from eMMC)
I do not want it to boot ... I want to upgrade the eMMC.
I managed to do this last year. Over serial you need to kill the petitboot gui process (I forgot its name, but you can find it with ps). Something like kill -9 `pidof petitboot-nc`. Then you're free to turn on ums mode.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest