I am using baltos ir 2110 and creating a custom image for it. I was able to access it via ssh with the standard bolts Debian image. But with my custom image, it is not coming in the network ( in conclusion it is not booting ). I want to access the bootloader cli and check kernel logs to find the error but I don't know how to access it.
I have tried to connect the RS 232 serial port to my computer but no logs are available on that port. Is there any other debug port that I can access to see the serial console on baltos?
There is a serial console to baltos ir 2110. You can access it using a tty-USB cable which will give you access to u boot terminal.
Related
I got a linux VM in Azure and from the screenshot via the Boot Diagnostics menu, I can see that it gives the following message :
"you are in emergency mode.....press Enter for maintenance or Press CTRL D to continue"
I tried to access the VM using the serial console and it connects to the console and I see a message as below :
"Connected to the serial port of the VM
If no loginprompt is displayed press ENTER"
But.....despite pressing Enter nothing happens! Ive tried rebooting, restarting etc but still stuck
For the error you are in emergency mode.....press Enter for maintenance or Press CTRL D to continue
The emergency mode sometimes means either your file system is corrupted or you created a new partition or edited existing partition.
Please perform a file system check using below command :
fsck.ext4 /dev/sda3
where sda3 can be your partition and if you are using ext3 file system, change the command as follows:
fsck.ext3 /dev/sda3
Cycle through the SDAs by changing the last number in the sda to see which file system has problems.
Ex: sda1, sda2, sda3, sda4, and so on
For the error Connected to the serial port of the VM If no loginprompt is displayed press ENTER
This issue occurs when the serial console connection is successfully made to the virtual machine, but the virtual machine is not configured for input/output on the serial port.
To ensure your Linux virtual machine works with Azure serial console, please follow the guidance: Create and upload an Ubuntu Linux VHD in Azure - https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-ubuntu for the distribution you are using. Specifically you will need to perform these steps from the preceding link:
Modify the kernel boot line in GRUB or GRUB2 to include the following parameters. This will also ensure all console messages are sent to the first serial port, which can assist Azure support with debugging issues:
console=ttyS0,115200 earlyprintk=ttyS0,115200 rootdelay=300
In addition to the above, it is recommended to remove the following parameters if they exist:
rhgb quiet crashkernel=auto
Graphical and quiet boot are not useful in a cloud environment where we want all the logs to be sent to the serial port. The crashkernel option may be left configured if desired, but note that this parameter will reduce the amount of available memory in the VM by 128MB or more, which may be problematic on the smaller VM sizes.
Reference :
https://unix.stackexchange.com/questions/347808/ubuntu-gives-message-welcome-to-emergency-mode
https://github.com/Microsoft/azserialconsole/blob/master/Known_Issues/Hitting_enter_does_nothing.md
I am maintaining a Virtual Machine on a Cloud Service with Linux (SLES) operating system. At some point, someone logged in, did some major things (e.g. chmod 777 on ALL files, etc) and, with some other things that he did, messed up the system.
It would be no surprise if he actually hacked it, but...
The vm is hosted inside a VPN (unreachable from outside the VPN), and last root command specifies a user connected through tty1 (!!!), with no IP address, while all my connections, root and user are pts/X.
My thoughts (not like I am an expert) are concluding on one thing, this user must have physical (?) access to cloud service, since tty is reachable locally.
Which means, that if that is true, the "attacker" must be someone from inside the Cloud-Service hosting company.
Question:
Is there ANY way you can connect remotely to a server/cloud service virtual machine using ttyX?
Correct me at any point you see wrong; as I mentioned I am not an expert but I am more than willing to learn.
Depending on the hypevisor, it provides a remote console, so, it is kind of local console connected from a remote place. Also, there is a ipmi protocol that can connected to the hypervisor and use the sol (serial-over-lan) command.
Other than that, the user might be connecting using a VNC, that would also be shown as a tty connection
IPMI SOL: http://www.alleft.com/sysadmin/ipmi-sol-inexpensive-remote-console/
Remote qemu guest console: How to switch to qemu monitor console when running with "-curses"
VNC on guests: https://askubuntu.com/questions/262700/qemu-kvm-vnc-support
I'm trying to write a linux driver to a device that i have the windows driver of (Similar to the case described Here, but a different device)
I'm using Libusb for the communication on the linux side, and SourceUSB as my USB sniffer (on the windows machine). Now I think I've replicated the controls and bulks properly, but I can't really test the linux log against the windows one. I'm running Ubuntu 12.04 on a VM.
So my questions are:
Is there a multiplatform logger? That could really simplify the log compare process.
When I attach the USB device to the VM - I get the VM driver in Windows. Sniffing this device gives me exactly what the device sees, right? I mean - Is this where I want to sniff?
EDIT:
I've compiled my application on windows (libusb is cross platform - A big thanks to libusb developers who did such a good job) and my application worked properly.
When sniffing the VM driver while running my application on linux, I see the requests to the USB as VENDOR_DEVICE instead of CONTROL_TRANSFER and BULK_OR_INTERRUPT. This seems to be the problem if I understand correctly, since this is what the device "sees".
So I guess my problem now is why does Linux sends my requests as vendor.
ANOTHER EDIT: Problem solved:
Listening to the VM driver gave me the wrong requests (I was listening to the VM driver traffic, not, as i wanted, the traffic of the my USB linux driver
Libusb is perfectly multiplatform. It took me a few minutes to get my code to compile under windows, and from there it was pretty easy to debug and compare logs
You can use Wireshark to capture USB traffic. This page explain how to do it for Linux and Windows : CaptureSetup/USB
I am new to Linux and I have my application running on windows for a while and for file Transfer stuff we use third party sftp and it has been running well both on Active and Passive mode.
Now i am migrating my app to support Linux OS, and i'm facing problem in FTP Active mode, where i can transfer files in Passive mode.
I tried through FTP command where i can transfer files in both mode and when it comes implementations it gives me the following error:
500 Invalid PORT Command.
and the before this error the ftp command looks like :
PORT 0,0,0,0,234,96
where for passive it works fine.
Do it need to enable any firewall settings in linux, Please help me out.
PORT 0,0,0,0,234,96
The first four octets represent the IP address, which in this case, seems like is absent. So you either missed out declaring the client's IP address in the application or may be there is some other issue with the IP addresses. Try this link for more info: FTP
Also check if its getting connected when you turn off the Linux firewall.
/etc/init.d/iptables stop
Currently I need to develop some program that will communicate with cisco devices over serial line. I want to build testing environment on my development linux machine. So, I found dynamips cisco emulator. This emulator can provide interface via serial line with '-U /dev/ttyS0' option. Well, this causes dynamips to open hardware serial port and communicate via it. I'm able to connect to this hardware serial port from another linux machine with serial client like minicom.
However, since i'm using virtualbox for both linux machines, I link serial ports via virtualbox ability to forward serial port to named pipe. This scheme seems to be working, but very redunant. I'm looking for a method to run dynamips and minicom on a single linux machine.
I found that pseudo-terminals could be useful in my case. But I've tried to run dynamips with '-U /dev/ptmx' and then connect with minicom to created /dev/pts/... port and vice versa. In both cases I've got input/output error on both sides.
Unfortunately, modern pseudo-terminals aren't that easy. After opening the master with posix_openpt() or open("/dev/ptmx"), you must call grantpt() and unlockpt() on the master FD before it and its corresponding slave device are usable. (The openpty() etc. utility functions simplify this.)
As a workaround, the ever handy socat may be of use.
# terminal 1
socat pty:link=$PWD/pts unix-l:$PWD/ptm-pipe &
dynamips -U $PWD/pts
# terminal 2
socat unix:$PWD/ptm-pipe -