LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-14-2024, 12:36 AM   #1
ZapDragon
LQ Newbie
 
Registered: Feb 2024
Posts: 5

Rep: Reputation: 0
Debian Serial Console Issue


Hello!

I have a unique setup here and I've spent easily 6 months trying to figure out where my problem is.

I Have a QNAP TS-h973AX and I have setup Debian 12.0, with kernel 6.1.0-17 back in July.
It was days of trying to get the serial console to work.

The issue is that serial console works perfectly till I boot Debian.
This is regardless of if its the installer or my currently running environment.

At very random and frequent times, the serial console will completely freeze.
It stops accepting any input, and does not ever refresh.

Some times if I run 'beep' command over SSH, it wakes the serial console up.
Or if I connect my Dell D3100, it also wakes the serial console back up.
I do not understand why this works. It was the latter that allowed me to inch through setup to get Debian installed.

I am at a loss as to why this happens.
I have had it happen as early as the moment the kernel is loaded, or as late as 10 minutes after logging into the shell, with the serial console.

The serial console is at 115200 baud. This device has a AMD Ryzen Embedded V1500B CPU.
This system does not have any HDMI/VGA/DVI/DP Output. I only have this UART interface.

If anyone has any insight, or needs any additional info, please let me know. Thanks!
 
Old 02-14-2024, 08:12 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ZapDragon View Post
Hello!
I have a unique setup here and I've spent easily 6 months trying to figure out where my problem is.

I Have a QNAP TS-h973AX and I have setup Debian 12.0, with kernel 6.1.0-17 back in July. It was days of trying to get the serial console to work. The issue is that serial console works perfectly till I boot Debian. This is regardless of if its the installer or my currently running environment.

At very random and frequent times, the serial console will completely freeze. It stops accepting any input, and does not ever refresh. Some times if I run 'beep' command over SSH, it wakes the serial console up. Or if I connect my Dell D3100, it also wakes the serial console back up. I do not understand why this works. It was the latter that allowed me to inch through setup to get Debian installed.

I am at a loss as to why this happens. I have had it happen as early as the moment the kernel is loaded, or as late as 10 minutes after logging into the shell, with the serial console. The serial console is at 115200 baud. This device has a AMD Ryzen Embedded V1500B CPU. This system does not have any HDMI/VGA/DVI/DP Output. I only have this UART interface.

If anyone has any insight, or needs any additional info, please let me know. Thanks!
There is only so much you can do with an appliance-type device to start with. Also, nowhere on the device specs does it say it actually has a serial port at all. Beyond that...since you can get in through SSH, why do you even NEED serial port access?? How did you load Debian on this, when it comes with an OS loaded in firmware??
 
Old 02-14-2024, 09:09 AM   #3
ZapDragon
LQ Newbie
 
Registered: Feb 2024
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
There is only so much you can do with an appliance-type device to start with. Also, nowhere on the device specs does it say it actually has a serial port at all. Beyond that...since you can get in through SSH, why do you even NEED serial port access?? How did you load Debian on this, when it comes with an OS loaded in firmware??
Yes, this is a NAS Appliance device, and it does come with QTS (QNAP's Operating system)

Qnap has been kind enough to allow the undeclared feature of letting users put an alternate Operating system on their products.
Some models that do not have traditional video output, aren't officially supported by Qnap, which is probably why the UART interface isn't even documented.

The 'firmware' that you're referring to, is in the simplest terms, a /boot partition on a USB module attached to a USB header on the main board.
I have removed it in favor of running my own environments, and to prevent accidental erasure of it.

I got Debian on it by connecting a bootable Debian Installer USB to it, and with the UART connected to a USB Adapter to my desktop.
I would like to resolve this issue for when I need to install something else, or nuke and rebuild.

Honestly, I would like to understand why the UART Randomly locks up in the way that it does, and why random unrelated actions seem to sometimes wake it back up.
 
Old 02-14-2024, 09:22 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ZapDragon View Post
Yes, this is a NAS Appliance device, and it does come with QTS (QNAP's Operating system) Qnap has been kind enough to allow the undeclared feature of letting users put an alternate Operating system on their products. Some models that do not have traditional video output, aren't officially supported by Qnap, which is probably why the UART interface isn't even documented. The 'firmware' that you're referring to, is in the simplest terms, a /boot partition on a USB module attached to a USB header on the main board. I have removed it in favor of running my own environments, and to prevent accidental erasure of it.
So essentially you removed the chip/device (i.e. "firmware") to load your own system with...
Quote:
I got Debian on it by connecting a bootable Debian Installer USB to it, and with the UART connected to a USB Adapter to my desktop. I would like to resolve this issue for when I need to install something else, or nuke and rebuild.
...this. And depending on the USB to serial interface, that could very well be the issue, since some of the cheap ones aren't known to be reliable. Most likely due to an XOFF and/or timeout issue.
Quote:
Honestly, I would like to understand why the UART Randomly locks up in the way that it does, and why random unrelated actions seem to sometimes wake it back up.
Again: why can't you just SSH into it, since it's working??? What, exactly, do you need the serial port FOR?? What's it talking to?? Unlikely you'd need it for UPS interface, since most of them use USB these days. And running a headless server without video/X is certainly not new, nor do they need a serial device.

Last edited by TB0ne; 02-14-2024 at 09:23 AM.
 
Old 02-15-2024, 09:29 PM   #5
ZapDragon
LQ Newbie
 
Registered: Feb 2024
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
So essentially you removed the chip/device (i.e. "firmware") to load your own system with...
Yes, I Removed the USB Module that contains the native QNAP Operating system, so I can boot my own setup, and so I don't accidently wipe it in case I decide to use QTS again.

Quote:
Originally Posted by TB0ne
...this. And depending on the USB to serial interface, that could very well be the issue, since some of the cheap ones aren't known to be reliable. Most likely due to an XOFF and/or timeout issue.
This is a fair point, and I will look into trying another UART to USB Device. If you have any recommendations, I'd appreciate it.
However, If the problem was only the freezing, I'd have probably tried other USB-UART adapters already, but since this works perfectly in the bios menu, up until I boot something, along with the fact that I can unfreeze it by doing 'beep' or plugging in a random USB device once Debian has booted, is strange, and leads me to think this could be some bizarre low-level hardware/kernel issue. This is entirely conjecture however. I don't have a clue what's happening here.

Quote:
Originally Posted by TB0ne
Again: why can't you just SSH into it, since it's working??? What, exactly, do you need the serial port FOR?? What's it talking to?? Unlikely you'd need it for UPS interface, since most of them use USB these days. And running a headless server without video/X is certainly not new, nor do they need a serial device.
I need to do a wipe and re-install, and I may need it for troubleshooting, if it ever comes up.
I obviously cannot SSH to the console to perform a reinstallation, and if SSH/Networking breaks, I need a reliable backup option.

Thanks for your help.
 
Old 02-16-2024, 08:58 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ZapDragon View Post
Yes, I Removed the USB Module that contains the native QNAP Operating system, so I can boot my own setup, and so I don't accidently wipe it in case I decide to use QTS again.

This is a fair point, and I will look into trying another UART to USB Device. If you have any recommendations, I'd appreciate it.
However, If the problem was only the freezing, I'd have probably tried other USB-UART adapters already, but since this works perfectly in the bios menu, up until I boot something, along with the fact that I can unfreeze it by doing 'beep' or plugging in a random USB device once Debian has booted, is strange, and leads me to think this could be some bizarre low-level hardware/kernel issue. This is entirely conjecture however. I don't have a clue what's happening here.

I need to do a wipe and re-install, and I may need it for troubleshooting, if it ever comes up.
I obviously cannot SSH to the console to perform a reinstallation, and if SSH/Networking breaks, I need a reliable backup option.

Thanks for your help.
And you still haven't said WHY you need/want a serial console. More than likely you're doing something the device wasn't intended to do, either through BIOS or some other piece of hardware in the device, and you're seeing problems.
 
Old 02-16-2024, 09:22 PM   #7
ZapDragon
LQ Newbie
 
Registered: Feb 2024
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
And you still haven't said WHY you need/want a serial console.
Actually, I have.

Quote:
Originally Posted by ZapDragon View Post
This system does not have any HDMI/VGA/DVI/DP Output. I only have this UART interface.
Quote:
Originally Posted by ZapDragon View Post
I need to do a wipe and re-install
This is the Console. "tty0" If you will.
This is where all output goes, when I boot into any cli-driven OS.
More specifically, it's where the installation interface is for a Linux distro of any flavor. Debian for example.

There will not be an SSH Server to connect to when I shut down, and boot a Debian installer flash drive.
 
Old 02-17-2024, 09:53 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ZapDragon View Post
Actually, I have.
This is the Console. "tty0" If you will. This is where all output goes, when I boot into any cli-driven OS. More specifically, it's where the installation interface is for a Linux distro of any flavor. Debian for example. There will not be an SSH Server to connect to when I shut down, and boot a Debian installer flash drive.
Ah; the way I read it was that Debian booted and RAN, at which point you lost the tty. In which case, the answer is simple: perform a full installation to your USB device from a computer where you boot from a second Debian installer USB drive, using the second as the 'hard drive' to install to.

Should be able to unplug it and have it on the other device. But I'd not trust this in any way, since (if you're using a standard USB stick), the read/write cycles are going to wear it down pretty quick. Just not meant for 'daily driving'.
 
Old 02-24-2024, 12:43 AM   #9
ZapDragon
LQ Newbie
 
Registered: Feb 2024
Posts: 5

Original Poster
Rep: Reputation: 0
Apologies, this week was nuts. I did 16 hours shifts all week an only had time for sleep.

Quote:
Originally Posted by TB0ne View Post
Debian booted and RAN, at which point you lost the tty.
That is what is happening, and it isn't just "lost"
Most of the time, I can get Linux to boot, and even logged in and run a command or two.
The UART suddenly dies, often in the middle of a command, where the command output partially prints.
Yes, if it is enabled, I can SSH into it after UART dies
However, my issue is getting a new Debian install, where the issue will manifest during the text installer, and SSH isn't an option.

Quote:
Originally Posted by TB0ne
perform a full installation to your USB device from a computer where you boot from a second Debian installer USB drive, using the second as the 'hard drive' to install to.

Should be able to unplug it and have it on the other device. But I'd not trust this in any way, since (if you're using a standard USB stick), the read/write cycles are going to wear it down pretty quick. Just not meant for 'daily driving'.
I actually had originally done this, using a PC that wasnt mine.
And yes, I will not install the / partition to the USB drive, but instead to 4 2TB SSDs in RAID10, and using the USB as /boot. Should help a lot with keeping wear down.
Problem is now, I cannot use another computer to do this install, as I do not have one that will allow me to connect 4 SATA Drives to perform the install.
This is ultimately why I want to resolve this issue.

I did take your advice and bought another USB UART adapter. It is faster than the ESP8266 I was using, but the random drops, and overall behavior is identical.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Serial as console and normal serial communication hardikgohil1988 Linux - Embedded & Single-board computer 4 12-01-2015 04:57 AM
[SOLVED] Serial console on Debian 8 SRSUser Linux - Software 4 10-24-2015 03:30 PM
Separate output to serial console and screen console systemlordanubis Linux - Server 1 11-21-2014 03:27 AM
serial console +plx tech console server card pankajd Linux - Hardware 1 10-14-2009 01:45 PM
zoom external serial with usb to serial adapter foustware Linux - Hardware 1 12-07-2003 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration