# How to debug linux boot process

**URL:** <https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252>\
**Category:** Uncategorized\
**Created:** [October 19, 2016, 6:17am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252 "2016-10-19T06:17:44Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arek](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/arek/32/97_2.png) [@Arek](https://mangoh.discourse.group/u/Arek)\
**Post date:** [October 19, 2016, 6:17am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/1 "2016-10-19T06:17:44Z")

</div>

Hi,

I’m experimenting with different yocto built images.  
Sometimes Linux not booting, and I want to know why.

How can I examine boot messages?  
I tried to connect to DB9 connector, with different baud settings, no output was visible.

Regards  
Arek

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [October 19, 2016, 4:22pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/2 "2016-10-19T16:22:47Z")

</div>

You should connect to the DB9 connector with 115200 8N1.

---

<div class="post-metadata">

**Author:** ![Arek](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/arek/32/97_2.png) [@Arek](https://mangoh.discourse.group/u/Arek)\
**Post date:** [October 20, 2016, 11:34am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/3 "2016-10-20T11:34:00Z")

</div>

Thank you for your reply dfrey,

Unfortunately still nothing is visible on the terminal.

Here are some facts:

- RS232 cable was checked, and working properly.
- Linux flashed on WP85 is working. I can ssh into.
- I’m able to flash the device using swiflash utility.
- I’m able to flash the device using fastboot. But for some reason, Linux is not starting this way.

Regards  
Arek

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [October 21, 2016, 4:06am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/4 "2016-10-21T04:06:54Z")

</div>

Please try to download latest firmware here:  
[http://source.sierrawireless.com/resources/legato/wpfirmwarerelease/](http://source.sierrawireless.com/resources/legato/wpfirmwarerelease/)

It’s a simple one click tool.  
Let’s see if that makes any difference

---

<div class="post-metadata">

**Author:** ![Arek](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/arek/32/97_2.png) [@Arek](https://mangoh.discourse.group/u/Arek)\
**Post date:** [October 21, 2016, 12:26pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/5 "2016-10-21T12:26:40Z")

</div>

Thank for your reply asyal,

I downloaded newest generic-firmware, boot-yocto, legato and MCU packages.  
Flashed using swiflash. Utility reported success for all operations.

Unfortunately that did not help. Still no output on DB9.

I’m suspecting hardware problem.

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [October 21, 2016, 1:30pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/6 "2016-10-21T13:30:21Z")

</div>

Yes, could be.  
Can you ssh via USB?

---

<div class="post-metadata">

**Author:** ![Arek](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/arek/32/97_2.png) [@Arek](https://mangoh.discourse.group/u/Arek)\
**Post date:** [October 24, 2016, 9:29am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/7 "2016-10-24T09:29:07Z")

</div>

Yes, I can ssh.  
I’m working on Ubuntu 16.04.  
After connecting Mango0h to USB port, new ethernet device is visible and working.

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [October 24, 2016, 11:43am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/8 "2016-10-24T11:43:10Z")

</div>

Hi,  
you may try to change the uart as Linux console using AT command. It may work.  
Here is the steps:

ssh to device

microcom -E /dev/ttyAT

AT!MAPUART=16,2 (uart 2 as Linux Console )  
AT!MAPUART=16,1 (uart 1 as Linux Console )

then restart

Thanks

---

<div class="post-metadata">

**Author:** ![Arek](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/arek/32/97_2.png) [@Arek](https://mangoh.discourse.group/u/Arek)\
**Post date:** [October 26, 2016, 5:16am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/9 "2016-10-26T05:16:46Z")

</div>

Thank you all for your help.  
Finally, I solved my problem.

First, I replaced WP8548 chip. I’ve got a new one, which works. Finally I saw some data produced by serial port.

Second, my cheap RS232/USB converter fails on 115200 baud. All I saw on terminal was white spaces.  
Decent converter based on FTDI chip works much better.

Thanks

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [October 26, 2016, 2:21pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/10 "2016-10-26T14:21:16Z")

</div>

Thx for letting us know

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [October 26, 2016, 2:53pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/11 "2016-10-26T14:53:39Z")

</div>

> my cheap RS232/USB converter fails on 115200 baud

If you know the make and model or chipset of the non-working RS232 adapter, then please post it to help others diagnose this problem in the future.

---

<div class="post-metadata">

**Author:** ![Arek](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/arek/32/97_2.png) [@Arek](https://mangoh.discourse.group/u/Arek)\
**Post date:** [October 27, 2016, 6:35am UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/12 "2016-10-27T06:35:24Z")

</div>

I’ve tried two “cheap” converters.

The black one, recognized by system as:  
Bus 001 Device 010: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

Sometimes received data are corrupted (random characters). Converter is unable to send valid data.

## ![](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/9d85b757cc1e9f0bb02ecf89293e96df03dcedb9.jpg)

* * *

The blue one, recognized by system as:  
Bus 001 Device 009: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

This one is unusable. Receives random sequence of spaces, tabs, and line feed characters.

 ![](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/1d49e9a2c2960a4cf9462fd282bb47256751e8c0.jpg)

* * *

Both converters works fine using 9600 baud.

---

<div class="post-metadata">

**Author:** ![Kas.Lewis](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@Kas.Lewis](https://mangoh.discourse.group/u/Kas.Lewis)\
**Post date:** [January 17, 2017, 8:10pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/13 "2017-01-17T20:10:34Z")

</div>

I have two that look like your second one. One wont work at all and teh other comes up as a prolific. Unfortunately the Windows driver has frozen it out presumably because it is not a genuine chip inside. Using an older version of the driver works fine though.

Kas

---

<div class="post-metadata">

**Author:** ![Wavefront\_yk](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/wavefront_yk/32/176_2.png) [@Wavefront\_yk](https://mangoh.discourse.group/u/Wavefront_yk)\
**Post date:** [April 28, 2017, 11:44pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/14 "2017-04-28T23:44:43Z")

</div>

I am using the blue one (PL2303-Prolific) as well and from what I found from the net, there is issue with driver. I am not able to make it work on windows. However it works well on Ubuntu 16.04, here are the instructions:

1. connect the serial adaptor to usb port of the Ubuntu machine.
2. install minicom in linux machine:

> sudo apt-get install minicom

1. find the usb port that serial connect to:

> dmesg | grep pl2303

1. the output of step3 would indicate which usb port

> [6.804403] usb 1-1.3: pl2303 converter now attached to **ttyUSB0**

1. change file permission to allow minicom to save config using ttyUSB0 as an example

> sudo chmod 755 /dev/ttyUSB0  
> 6.run minicom  
> mnicom -s

1. from the config menu, select “Serial port setup”.
2. press “A”; update A-Serial Device: to what you see in step4. It would look like  
A-Serial Device: /dev/ttyUSB0
3. hit “enter” and then press “E” to select “E-bps/par/Bits: 115200 8N1”
4. hit “enter” and select “save setup as dfl” and select “Exit”

If everything goes well, you will see  
“Welcome to minicom 2.7  
Port /dev/ttyUSB1”

type your user name and password to login to your mangOH board.

---

<div class="post-metadata">

**Author:** ![CoRfr](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@CoRfr](https://mangoh.discourse.group/u/CoRfr)\
**Post date:** [May 2, 2017, 1:27pm UTC](https://mangoh.discourse.group/t/how-to-debug-linux-boot-process/252/15 "2017-05-02T13:27:58Z")

</div>

For the UART converters, most of the cheap one are very unreliable and will waste your time (fake Prolific chips, …)

I’ve been using the Trendnet TU-S9 for about 10 years and never had any issue with them, cf [https://www.trendnet.com/products/proddetail?prod=150\_TU-S9](https://www.trendnet.com/products/proddetail?prod=150_TU-S9) . They cost about 15 bucks, so about 3 times the price of something that works a third of the time … 😛
