Recent Posts

Pages: [1] 2 3 ... 8
1
Linux and BSD / [How-To] - Enable Serial Com Port in CentOS 7
« Last post by kek on November 29, 2017, 11:19:37 PM »
[How-To] - Enable Serial Com Port in CentOS 7

In this post I want to share how you enable the serial console to work at boot and have the server send the login screen both to the regular monitor and to the serial com connection in CentOS 7. If you need to know more about what it is or why you should use a serial connection for your servers see my other post: What is a Serial Console, and why would we use it?, but in short is goes something like this:

you connect to your headless server using SSH or WebGUI over IP \ DNS but you messed up some configurations and you are no longer able to access your server over the network, and now you have to find a keyboard and monitor to access it and restore it. and that in it self can be a hassle and if you had serial connection enabled on a rs-232 com port you would only need to connect a console cable to it and do the troubleshooting needed, not to say most of the networking gear like routers and switches you see in business and enterprise environment need to be configured over console connection before they are deployed and you can use SSH or WebGUI over IP \ DNS.

Before I begin the configurations I will make two assumptions:
1. You have a clean and fresh install of CentOS 7 using LVM partitioning.
2. That your server have a working RS-232 Console Port installed and are recognized by the kernel and the drivers are installed.

To make the serial console available at boot we need to adjust the boot loader of the system to send the output to both the console port and the monitor, and to do this you need to login to the system whit a user that has sudo or root access.[/size]

Hardware Information:
Now that you are logged in to your system you want to first check that your Serial Comport is installed, to do this type the command: sudo dmesg | grep tty

Output should look like this example:
Code: [Select]

   [kek@centos7 ~]# sudo dmesg | grep tty
    [    0.000000] console [tty1] enabled
    [    0.000000] console [ttyS0] enabled
    [    1.891572] 00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A


In this example I have one input \ output (I\O) console hardware port in the server and that is ttyS0 whit the full path of /dev/ttyS0, note this down as we need it later in the configuration

Now we need to check what LVM labels where given to the system if you used the easy installer option, in most cases it uses the hostname as labels, but since it can break the system if we do not get this part correct we better check as we do not want to do any unnessecary work or troubleshooting, to check LVM labels of your partitions run the command: sudo lvscan

Output should look similar to this:
Code: [Select]

   [kek@centos7 ~]# sudo lvscan
    ACTIVE      '/dev/cl_centos7/swap' [  2.00 GiB] inherit
    ACTIVE      '/dev/cl_centos7/root'  [<17.00 GiB] inherit


What we need to note from this command is the cl_centos7/root and cl_centos7/swap labeles as we need this later to get the device mapper string to point to the correct hard drive partitions for booting.

System Configuration:
Now that we have all the needed hardware information we are ready to configure the serial console and the boot loader, to do this you need to edit the following configuration file: /etc/sysconfig/grub to do this use your favourite text editor like vim or nano (not installed by default), command is: sudo vi /etc/sysconfig/grub

The file should look similar to this before editing:
Code: [Select]

GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos7/root rd.lvm.lv=centos7/swap crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"


You would need to make some changes to this file, as you can see it contains no information about the serial connection or the terminal settings to use, in my setup I use the following configuration:

Code: [Select]

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl_centos7/root rd.lvm.lv=cl_centos7/swap rhgb quiet"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"


The settings in here should be self explainatory and should be generic egnouh to cover 90% of all serial adapters, but the general descripton of them are:
GRUB_TERMINAL is set to both Console and Serial enabling it for both on screen monitor and serial output.
GRUB_SERIAL_COMMAND sets the value of what speed it should run and how it should communicate whit the remote device these settings needs to match at both sides to make a connection.
GRUB_CMDLINE_LINUX specifies where the swap and root partition is stored for the LVM so the system can boot, this is why we looked up the disk information.
GRUB_CMDLINE_LINUX_DEFAULT tells the boot loader to where it should send the information where tty1 is the monitor and ttyS0 is the Serial port.

At this point you are nearly done, just a few commands left to run as the majority of the configuration is the get the grub config correct, now we just need to enable our Serial connection using the command:
 stty -F /dev/ttyS0 ispeed 115200

You may get an error saying it could not run all of the settings, but do not worry about that for now, next up would be to generate a new bootloader file for grub whit the settings we just saved in
/etc/sysconfig/grub we do that by running the following command: grub2-mkconfig -o /boot/grub2/grub.cfg

Now you are ready to connect the serial console cable and connect from your workstation or laptop using something like screen or putty depending on OS you are using, the console will at this point connect to a black screen as it has not active console running at the moment, and if you are at a blank window whit no errors then you can run the command: sudo /sbin/reboot on your CentOS 7 server and you should see the grub and boot process both on the monitor and the serial terminal window.

Thanks
KEK
2
Hardware / What is a Serial Console, and why would we use it?
« Last post by kek on November 29, 2017, 05:22:29 PM »
What is a Serial Console, and why would we use it?

In this post I would like to take the time to tell you a little about Serial Consoles and COM ports, and why we still uses it

What is Serial Console?
The serial console is a connection over the RS-232 or serial port connection that allows a person access to a computer or network device console. Typically, a console is accessed over an SSH connection. However, with software, hardware, or other access problems, it may only be possible to access the machine or device (e.g. routers and switches) over a serial connection. Older computers and headless computer (computers or devices without monitors) also use the serial console as the main way to access the console.

The system console, computer console, root console, operator's console, or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the init system and from the system logger. It is a physical device consisting of a keyboard and a screen, and traditionally is a text terminal, but may also be a graphical terminal. System consoles are generalized to computer terminals, which are abstracted respectively by virtual consoles and terminal emulators. Today communication with system consoles is generally done abstractly, via the standard streams (stdin, stdout, and stderr), but there may be system-specific interfaces, for example those used by the system kernel.

The console is the text output device for system administration messages. These messages come from the kernel, from the init system and from the system logger. On modern small computers the console is usually the computer's attached monitor and keyboard. On many older computers the console is an RS-232 link to a terminal such as a DEC VT100. This terminal is in a locked room and is continually observed by the minicomputer's operators. Large systems from Sun, Hewlett-Packard and IBM still use serial consoles. It is usually possible to login from the console. A login session from the console is treated by many parts of the operating system as being more trustworthy than a login session from other sources. Logging in as the root super-user from the console is the Command Line of Last Resort when faced with a misbehaving system.


Why should we use a serial console?
For the average user a serial console has no advantage over a console offered by a directly attached keyboard and screen. Serial consoles are much slower, taking up to a second to fill a 80 column by 24 line screen. Serial consoles generally only support non-proportional ASCII text, with limited support for languages other than English. A new terminal can be more expensive than an old PC.

There are some scenarios where serial consoles are useful. These are:

 - Systems administration of remote computers
 - High density racks of computers
 - Recording console messages
 - Embedded software development

Systems administration of remote computers
Linux is a good operating system for deployment at unstaffed sites. Linux is also good for hosting critical network infrastructure such as DNS and DHCP services. These services are generally installed at every site of an organisation including sites which may be too small or too remote to have information technology staff. System administration of these remote computers is usually done using SSH, but there are times when access to the console is the only way to diagnose and correct software failures. Major upgrades to the installed distribution may also require console access. In these cases the serial console is attached to a modem. Access to the console is gained from a remote computer by dialing into the modem. This allows the console to be reached from any telephone socket.

High density racks of computers
Clusters of personal computers can outperform mainframe computers and form competitive supercomputers for some applications. See the Cluster-HOWTO for more information on clustering. These clusters are typically assembled into 19 inch telecommunications equipment racks and the system unit of each computer is typically one rack unit (or 1.75 inches) tall. It is not desirable to put a keyboard and monitor on each computer, as a small cathode ray tube monitor would consume the space used by sixteen rack units. A first glance it seems that a monitor and keyboard switch is the best solution. However the VGA signal to the monitor is small, so even with the switch the monitor cannot be placed very far away from the rack of computers. It is desirable to allow the consoles to be monitored in the operators' room of the computer center, rather than in the very expensive space of the machine room. Although monitor switches with remote control and fiber optical extensions are available, this solution can be expensive. A standard RS-232 cable can be 15 meters in length. Longer distances are easily possible. The cabling is cheap. Terminal servers can be used to allow one terminal to access up to 90 serial consoles.

Recording console messages
This is useful in two very different cases.

Kernel programmers are often faced with a kernel error message that is displayed a split second before the computer reboots. A serial console can be used to record that message. Another Linux machine can be used as the serial terminal. Some secure installations require all security events to be unalterably logged. One way to meet this requirement is to print all console messages. Connecting the serial console to a serial printer can achieve this.

Embedded software development
Linux is increasingly being used as an operating system for embedded applications. These computers do not have keyboards or screens. A serial port is a cheap way to allow software developers to directly access the embedded computer. This is invaluable for debugging. Most chip sets designed for embedded computers have a serial port precisely for this purpose. The shipping product need not present the RS-232 port on an external connector. Alternatively the RS-232 port is often used for downloading software updates.

3
News from the Admin team / Deleted accounts during maintinace
« Last post by kek on November 29, 2017, 04:21:34 PM »
Hello folks, there as been a few inactive accounts on this forum that was never registered online and as activated accounts, these was today (2017-11-29) deleted from the system if some of these where real and active accounts, please contact one of our admin or moderators staff and we will be looking at restoring your profile back

thanks,
KEK
4
Hardware / IT-Monkey Lab Hardware - end of 2017
« Last post by noman on November 25, 2017, 11:54:37 AM »
I decided to create this topic about what hardware we use in our test lab her at IT-Monkey, after quite a few comments from people we have been in contact whit that they have no access to brand new hardware and that hardware is so expensive that they can not afford systems and lab equipment like what we have here. This is why I decided to share this list of what our lab hardware is and what our servers are made out of, and to showcase that you do not need the lates and greatest in a home-lab or test-lab at least not when you are starting out and want to learn as it was the goal for my home-lab when I first started out in 2010.


Physical Servers:
At this point in time we at IT-Monkey have 3 different DIY server in our lab-rack, these are:

1. Storage server, running FreeNAS 9.10.2-U6 This system was purpose build as a central storage server for my home office, home-lab and business, it is the only system that I have bought everything brand new from the retailer that sits in my server-rack.
2. Lab1-Server, hypervisor running VMWare ESXi 5.5
3. Lab2-Server, currently have no storage and OS, going to be used as a hypervisor standalone or cluster depending on software and pricing..
these are just generic names and not the actual names of the servers, for security reasons,

FreeNAS-Server Hardware:
Code: [Select]
Chenbro RM23212 2U rackmount whit rails, 12-hotswap hdd bays
Motherboard: Supermicro X11SSL-F (MicroATX, Socket 1151. C232 Chipset and DDR4)
Processor: Intel Xenon E3-1245v5 4 Cores at 3.5Ghz
Memory: Crucial DDR4 ECC unreg 64Gb 2133Mhz KIT
Powersupply: SeaSonic 400w 80-Plus Bronze
CPU Cooler: Noctua NH-L9x56
Raid Controller: LSI MegaRAID 9211-8 (Flashed to IT 20 Firmware)
NIC: Intel PRO 1000 PT (EXPI9404PT) 4-port
OS Drive: SanDisk Cruszer 32Gb
HDD 01: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 02: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 03: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 04: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 05: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 06: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 07: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 08: Seagate Ironwolf ST4000VN008 64MB 4TB
HDD 09: Western Digital Red WD40EFRX 64MB 4TB
HDD 10: Western Digital Red WD40EFRX 64MB 4TB
HDD 11: Western Digital Red WD40EFRX 64MB 4TB
HDD 12: Western Digital Red WD40EFRX 64MB 4TB
Fan 1: GELID Silent PRO 8 PWM
Fan 2: GELID Silent PRO 8 PWM
Fan 3: GELID Silent PRO 8 PWM

Note; This system was purpose build as a central storage server for my home office, home-lab and business, it is the only system that I have bought everything brand new from the retailer that sits in my server-rack.

Lab1-Server Hardware:
Code: [Select]
Case: X-Case X255F 2U rackmount whit rails
Motherboard: MSI Z77A-G45 LGA1155
Processor: Intel i7-3770 4-cors 3.40 GHz
Memory: Corsair Vengeance DDR3 1600mhz 32Gb KIT
Powersupply: Corsair CX500M, 500w 80-Plus Bronze
CPU Cooler: Noctua NH-L9x56
Raid Controller: LSI MegaRAID 9211-8 (Flashed to IT 20 Firmware)
NIC: Intel PRO 1000 PT (EXPI9404PT) 4-port
OS Drive: SanDisk Cruszer Fit 8Gb
Internal HDD 1: Intel 335 240Gb
Internal HDD 2: Intel 335 240Gb
Internal HDD 3: Western Digital Red WD30EFRX 64MB 3TB
Internal HDD 4: --
Fan 1: GELID Silent PRO 8 PWM
Fan 2: GELID Silent PRO 8 PWM
Fan 3: GELID Silent PRO 8 PWM

Note; Currently running VMWare ESXi 5.5 and a Windows 2012r2 DC network, thinking about changing hypervisor to something else

Lab2-Server Hardware:
Code: [Select]
Case: X-Case X255F 2U rackmount whit rails
Motherboard: Gigabyte GA-Z68XP-UD3 LGA1155
Processor: Intel i7-3770 4-cors 3.40 GHz
Memory 1: Corsair Vengeance DDR3 1600mhz 16Gb KIT
Memory 2: Corsair Vengeance DDR3 1600mhz 8Gb KIT
Powersupply: Andersson Mission SG GGP 550w 80-Plus
CPU Cooler: Noctua NH-L9x56
Raid Controller: LSI MegaRAID 9211-8 (Flashed to IT 20 Firmware)
NIC: Intel PRO 1000 PT (EXPI9404PT) 4-port
OS Drive: SanDisk Cruszer Fit 8Gb
Internal HDD 1: --
Internal HDD 2: --
Internal HDD 3: --
Internal HDD 4: --
Fan 1: GELID Silent PRO 8 PWM
Fan 2: GELID Silent PRO 8 PWM
Fan 3: GELID Silent PRO 8 PWM

Note; Server has no storage, server is currently being used as a bench testing server, has support for mSATA SSD, thinking about a hypervisor cluster, not sure what OS to use

As you can see both Lab1 and Lab2 server is built out of old consumer grade hardware and have prior to us getting them been used as gaming machines, where we simply refurbished the motherboard and CPU's moved it to a rack-mount case and added appropriate sized coolers and some other spare parts that we had laying around and most of those are not needed to run a basic test-lab.

Network:
As for our network we do not have very much hardware at all and you really do not need much besides a good Managed Switch whit enough ports to connect it together

For our lab we currently have the following networking equipment:
1. ISP Modem
2. SG-4860 pfSense Firewall
3. Cisco SB SG200-26p Switch

As you know there is no internet connectivity whiteout the ISP and their Modem, then there is the pfSense SG-4860 appliance we use this to separate home network, lab network and office network, then it is the Cisco Switch not much to it plug it in and connect devices to it.

As I am writing this post I am about to redo some of my lab setup so if there is intrest for it I can make a post about setting up your own home-lab from scratch whit more detailed information on how everything is interconnected whit each other
5
Virtualization / bhyve
« Last post by melloa on September 21, 2017, 01:23:07 PM »
After iX burning the coral and problems with 11 upgrade, I've decided to move strait to FBD. Next logical step: bhyve.

Although bhyve still in development I was able to move all my VMs (I don't use windows, but created one just for the same of it) to bhyve. Found out a very good tool: vm-bhyve, that make the vm creation pretty easy.

I'd recommend you guys testing it.
6
Thank you so much, i helps me a lot sir TS :)  ;D ;D ;D
7
Off-Topic Therapy / Re: wallhack cs go pobierz
« Last post by noman on June 29, 2017, 08:55:34 AM »
We are not against talking about games here, but please use english
8
Off-Topic Therapy / wallhack cs go pobierz
« Last post by SandyFlani on June 29, 2017, 07:48:06 AM »
W poni?szym krótkim wpisie dowiesz si? jak w??czy? WH na botach. Komenda, któr? poznasz umo?liwi ci legaln? gr? na tzw. wallhack'u ze znajomymi czy te? na botach. Jest to ca?kowicie dozwolone, gdy? jest to tylko komenda, któr? mo?esz zabawi? si? na serwerze, który pozwala na u?ywanie komend sv_cheats. Najnowszy wallhack do cs go (w skrócie wh) stworzony przez niemieckich programistów (twórcy wielu ciekawych hacków do cs 1. sze?ciu teraz dost?pny dla cs go, posiadaj?cy rozbudowane mo?liwo?ci i co najwa?niejsze niewykrywalny podczas meczy turniejowych natomiast nie tylko. czit co chwila widnieje aktualizowany na bie??co przez co jest gwarantowana niewykrywalno??. czit jest updatowany 24/7 co gwarantuje jego nie wykrywalno??. link do pobrania wallhack'a. Ka?dy, kto mia? styczno?? z sieciowymi grami z kategorii FPS mia? dodatkowo styczno?? z u?ytkownikami robi?cymi nieuczciwie. Nie inaczej jest tak?e w bardzo popularnego tytu?u przypadku, jakim wydaje si? CS GO. Wszyscy w grach graj? uczciwie, i wyniki, jakie osi?gaj? owe skutek d?ugiego do?wiadczenia tudzie? treningów - to by?oby utopijny ?wiat ka?dego gracza. Jednak coraz cz??ciej niestety gracze korzystaj? z usprawnie? do gier. Jedn? z wi?kszych zmór popularnego tytu?u CS GO jest wh do cs go - czyli wallhack. Naj?wie?sza ods?ona tego cheata powsta?a na bazie dobrze znanego hacka z wersji 1. 6. Twórcy wallhacka do CS GO zapewniaj?, ?e jest on niewykrywalny podczas wojen turniejowych, a ponadto ma bardzo rozbudowane ustawienia. Pozwala na wykrycie nie tylko postaci przeciwników przez ?ciany, jednak równie? wy?wietla ich na radarze. Hack pozwala plus na wy?wietlanie dok?adnej wielko?ci hp przeciwników, wykrywanie teraz przez nich u?ywanej twierdzi, czy innych funkcji u?atwiaj?cych gr?. Mi?dzy innymi mo?na zgasi? efekt flash - czyli brak o?lepienia po afektu flasha.
9
Off-Topic Therapy / Re: minecraft do pobrania
« Last post by noman on June 29, 2017, 07:17:47 AM »
It is okay to discuss minecraft, games are a part of IT, but please follow the one single rule of using English on this forum
10
Off-Topic Therapy / Re: Porn
« Last post by noman on June 29, 2017, 07:13:13 AM »
If this was a porn site I would have done a better job keeping track as it would make me more money than this site does...

I do not want porn on this site, as this is for IT related stuff, unless the discussion is technical on how to setup a porn website or cdn I am not interested... please report all and any bad content you find and I will try cleaning up as much that I can
Pages: [1] 2 3 ... 8