Grub2 is a very frustrating bootloader esp. when it fails. Here are some of things I have tried that have worked in the past related to Grub2 errors.
Symptom – System starts into Grub2 prompt or simply does not start.
This happened to me recently when yum package update broke something in Grub. The system was booting into Grub2 prompt. This happened on my system because of bad grub.cfg file. Assuming you still have a valid backup of this file available, you can follow the steps below:
1. Type commands
2. The root directory should be automatically set to your EFI partition and Prefix should be set to the EFI folder. Then find out a valid backup file for grub.cfg in /efi/centos. For me it was, grub.cfg.1509824788.rpmsave
3. Issue command
4. You should now be able to see the Grub2 boot menu. Just select a valid entry and system should boot normally
5. Once in, overwrite the grub.cfg file with the backup file you used to boot. Reboot and hopefully you should be booting normally
Alternatively, if you have Centos7 Live USB, you can skip Steps 1-4. Boot into rescue mode. Then chroot into your root partition (chroot /mnt/sysimage). Once done simply replace grub.cfg file with a backup file (Step 5) above.
These errors are from Docker logs for the WordPress container. Due to these errors, the container won’t start. Fix is simple, when you mount the volume at run time, specify “Z” option to inherit SELinux settings. Below is what worked for me:
Last week I built a print server at home. I already have a home server called Jarvis which does media sharing through Plex and runs this blog but it’s situated in the basement. The printer I wanted to use is a USB label printer therefore it wasn’t feasible for me to use Jarvis as a print server as it would have required a very long USB cable from basement to second floor where my home office is. So I decided to build a new server which I could keep in the home office. I knew that this server does not need to be a very high end server with respect to configuration since all it will do is printer sharing. Therefore, I decided to build it using low end components. I already had a spare computer case, a stick of 4GB Laptop DDR3L RAM, a spare 120GB SSD and a mini PCIe Wireless card pulled from a laptop I used to own. All I needed was a PSU, motherboard (that could take laptop RAM and mini PCIe card), CPU and antenna for Wireless card. My total budget was around $80; comparable wifi printers were running over $100.
I began my search for a motherboard and CPU by looking for an embedded solution, i.e., a motherboard that comes with an onboard CPU. I had heard of AMD AM1 motherboards with onboard Kabini CPUs and also of Intel boards with Celeron. I was also interested to see if I can buy a board that had onboard DC jack. That would eliminate using an internal PSU. However, I eventually decided against a motherboard with onboard DC jack as those motherboards were expensive and they still required external AC Adapter which were running around $20. Searching on Newegg.com I finally found a suitable motherboard called ECS BAT-I, a mini-ITX board with onboard J1800 Intel Celeron processor; small and powerful enough that has a slot for laptop RAM and a mini PCIe slot for wireless card. Cost $40.
For PSU, I decided to buy Corsair CX430 PSU from Newegg.com for $40 but had a $20 Mail-in-rebate. I had used CX430 before and I knew it’s an excellent PSU for the price. Although, a bit too much power for the CPU and Motherboard but nevertheless I thought it’s the best value for money. Cost $20 (with Mail-in-rebate).
Finally, I needed antenna for the mini PCIe Wireless Card. I found one on Amazon.com for $10 which seemed to have good reviews.
With all the components in my possession, I assembled the computer. Then I installed CentOS 7 on it as the operating system. I chose CentOS because I was already using the same for Jarvis and it’s a fantastic OS for a server. I finally named my new server “Jasmine”.
The overall cost for Jasmine came out to be $50 which I spent only for CPU/Motherboard, PSU and wireless antenna. Of course, I was lucky to have the other essential components such as a Case, SSD, RAM and Wireless card already handy. However, if I didn’t, it would have been a challenge to contain the cost to $80. More than likely then I would have chosen Raspberry Pi.
I recently built a print server at home where I have attached the Brother QL-700 label printer. That printer does not have Wireless printing feature and I wanted to have all computers in the house be able to use it over the network. I thought of buying a new label printer that comes with Wireless connectivity but I couldn’t find any brand new label printer less than $100. Then I had an idea. Why don’t I build a print server? So using a few spare computer components and purchasing a few new components, I built a print server. But that’s not what I want to discuss in this post… (maybe a dedicated post for that – finally one here). What I really want to discuss is how I configured my printer to work on CentOS and be able to print through Windows.
You have the printer plugged into the CentOS computer using USB port
The computer has CentOS 7 (might work for earlier versions as well)
The computer has network connectivity (either Wireless or Wired)
“CUPS” is installed and accessible via http://<server host>:631
Samba is installed and running on the Server
Step 1: Download and install the printer driver
Brother’s website actually has printer drivers available for CentOS.
After that, Add the network printer by going to: Control Panel\Hardware and Sound\Devices and Printers
In the “Add a device” wizard, select “The printer that I want isn’t listed”
In the next screen, select “Select a shared printer by name” and then in the input box, type the http address for the CUPS site for the printer. It should be something like “http://<serverhost>:631/printers/QL-700”
When I asked for Driver, select “Brother” as manufacturer and “Brother QL-700” as printer
Hit OK and complete the set up
After that the QL-700 printer should show up under “Printers”
Next, you need to create a Custom Layout in “P-touch Editor”. This step was required for me because I wanted to print small address labels but the printer was erroring out not recognizing the layout (Hint: red flashing light)
In the “P-touch Editor”, open the “Small Address Label” (2.4″ x 1.1″) layout, and then set the Length from 1.1″ to “Auto”
Save the layout as “Custom_Small_Address” or any other name (File -> Save As)
Then import the layout in “P-touch Address Book” software. This is the software I use most frequently to print address labels (Layout -> Import Layout). The custom layout should appear under “My Templates”
At this point, you are all set. Try printing the label using the custom layout and hopefully it will print
Let me know if you are facing issues. It took me several hours to find out what was wrong but finally I was able to configure the printer. It may be same for you. I can try to help you if I could. Most of the issues were related to driver install, SELinux and media size, so be sure to follow each and every step above.
Start Bitvise Client Key Manager, and click “Generate New”
Select Algorithm “RSA” and Size 4096 (or any other)
Set a Passphrase if required. Enter some comments, and click Generate.
After Key is generated, select it, and click on “Export”. In the Export options, make sure you select “Export public key” and underneath it “OpenSSH format”. Click on Export and save the file somewhere.
On the CentOS Server
Upload the file to your CentOS server, then execute following commands:
Ensure correct SELinux settings
Set correct file permissions
Delete the uploaded file from the server
After this, log off and log on back using Bitvise SSH Client with “Initial method” as “publickey” and select the appropriate Key from the “Client Key” dropdown . If Key was recognized you will be asked for passphrase. If no passphrase was set, you should see the terminal open.
Here’s a snippet of PHP code to help you send emails from Windows machine when a torrent has downloaded through uTorrent.
I am using Outlook.com to send and receive email but you can easily use GMail or any other internet mail service.