2017年9月13日星期三

raspberry pi stuck when booting, after serial console print "EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)",solution is fsck ur cf/sd card file system

Directly power up/down(have not execute shutdown -h -P now in shell), my raspberry pi cannot startup finally... serial console info print like below, after that, the serial console have no responsed.
[ 5.546612] bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated [ 5.681943] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80) [ 6.846068] bcm2708-i2s bcm2708-i2s.0: Failed to create debugfs directory [ 7.866923] usbcore: registered new interface driver rtl8192cu [ 10.152477] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
google tell me a solution: fsck file system on cf/sd card. http://raspberrypi.stackexchange.com/questions/24592/rpi-freezes-after-booting Alright, unplug cf/sd card and insert to a USB card reader, then mount it under my ubuntu 14.04 OS pc, then execute fsck, all done.
[ 5.546612] bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated [ 5.681943] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80) [ 6.846068] bcm2708-i2s bcm2708-i2s.0: Failed to create debugfs directory [ 7.866923] usbcore: registered new interface driver rtl8192cu [ 10.152477] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

Mapping remote ESXi VM serial port to local serial port via ethernet

Topology:
 VM(Linux with Serial Port /dev/ttyS0)---------Ethernet----------Login remote VM with Local Serial Port(PC with SerialPort /dev/ttyUSB0)

1. First of all, if the requirement is telnet to remote VM's serial port, the only thing you need to do is set esxi serial port as below, the use telnet ip 10001 to login, NOT need following all step next.

2. If the requirement is use remote serial port as same as local serial port, then download https://elifulkerson.com/projects/downloads/tsb-release/tsb-client.py script document is here: https://elifulkerson.com/projects/telnet-serial-bridge.php

3. Install python libary:pip install pyserial
Insert #!/usr/bin/python2.7  to tsc-client.py first line.
set file format to unix by vi/vim, :set ff=unix or :%s/^M//g (https://stackoverflow.com/questions/82726/convert-dos-line-endings-to-linux-line-endings-in-vim(https://stackoverflow.com/questions/82726/convert-dos-line-endings-to-linux-line-endings-in-vim)
sudo ./tsb-client.py -p '/dev/ttyS0' -r 57600 -b 1 -c 10001 -i [VM's esxi host ip]