How Do You Troubleshoot The Linux Error “/sbin/mount.vboxsf: mounting failed with the error: Protocol error”?

Problem scenario:  You are trying to share files between your Windows desktop host of Oracle VirtualBox and a Linux guest virtual server.  You run this command:

mount -t vboxsf contint /mnt/windows-share

but you get this error:

"/sbin/mount.vboxsf: mounting failed with the error: Protocol error"

Solution
For the example command above that reproduces the error, the "contint" needs to match the "Name" value in what was configured in the Oracle VirtualBox Devices -> Shared Folders -> Shared Folder Settings window.

Here is where you look to properly construct the mount command:

there is an option in the "Name" column for the argument that is "contint" as an example in this command:

mount -t vboxsf contint /mnt/windows-share

Once the spelling for the argument in the mount command is correct (as seen in the above example), the command should work with no "Protocol error."  To create an option in the folders list, follow step #1b in these directions (closely or loosely depending on your preference).

How To Install CentOS Linux 7

Question:  How do you install CentOS Linux 7?

Solution
1.  Create a bootable .iso. 
2.  Insert the bootable media and boot to it.  If the media is a USB stick, boot the server to it.  For some BIOS you may need to press F12 during the splash screen after turning on the server/workstation.  When you in the boot menu, choose the device that has the bootable media.
3.  Choose the option at the top "Install CentOS Linux 7"
4.  Choose English and click "Continue" in the lower right hand corner.
5.  Click icons that have the triangle with an exclamation point near it.  It will probably just be the "Installation Destination."  In the "Local standard disks" section click the hard drive you want to install to.  Then click "Done" in the upper left hand corner.
6.  Click "Begin Installation"
7.  When it is finished, click the "Reboot" button the lower right hand corner.

How Do You Determine the Repo ID When For The “reposync” Command?

Problem scenario:  Synchronizing yum repositories has a number of benefits.  In a secure environment, CentOS/RedHat/Fedora servers have no access to the Internet.  There are numerous valuable yum repos on the Internet.  Your network administrator may grant you temporary access to such an Internet repository.  You may go to the directory on a server on your network that you want to mirror a copy or house a non-updating copy of the repo locally. 

You want to use the reposync command.  You know that "reposync -r continualintegration" (where "continualintegration" is the repo ID) will synchronize a repository with a source of an Internet repo with the destination being the server you run this command from.  You run "reposync -r continualintegration" and nothing happens.  There is no error, but the directory you were in when you ran the command did not get any files.  You want to ensure that the repo ID itself is valid.  How do you determine the if repo ID itself is valid for the reposync command? 

Solution:  Go to /etc/yum.repos.d/.  In this directory look at content of the *.repo files.  In these files there may a string encapsulated in square brackets like this:  [continualintegration]

Repo IDs are found in *.repo files in /etc/yum.repos.d/ on a CentOS/RedHat/Fedora server.  The repo ID itself will have no square brackets but appear within square brackets [likethis].  In this "continualintegration" example the repository (or repo) ID is "continualintegration" with no quotes.  So to use reposync with "continualintegration," you would enter the command like this:  "reposync -r continualintegration" with no quotes.  Case sensitivity of the repo ID matters when you use the reposync command.  Look at the .repo files carefully for the word or words in brackets "[likeThis]."  For the repo ID you were trying, If there is no string matching in the *.repo files in the /etc/yum.repos.d/ directory, then you do not have a valid repo ID.

How Can Linux Mint Prompt For A Username With Every Desktop Login?

Problem Scenario:  When logging into Linux Mint, the first and only field for text is a password prompt.  The corresponding username is not shown.  You do not understand this.  How do you get Linux Mint to prompt for a username?

Solution
Log in with the password of the user who just logged in.  Go to Menu -> Administration -> Login Window.  Uncheck "Automatically select the last logged in user."  (When this setting is checked, the username is implied to be the most recent user who logged into the system.)  Next time someone tries to log in, he/she will get a prompt to enter a username.

How Do You Use Putty To Connect To A CentOS Server (A Guest VM running on Oracle VirtualBox on a Windows Host)?

Problem scenario:  You have a Windows 7 host with Oracle VirtualBox.  You have a guest CentOS Linux virtual server.  How do you connect to a CentOS VM using networking?

Miscellaneous:  If you are looking for directions on how to give a Linux guest access to the Internet, these directions will work (assuming the host is running Windows).

Solution
#1  In Oracle VirtualBox go to Devices -> Network -> Network Settings.  For Adapter1 have the "Attached to" drop down be configured for "NAT."  Go to "Advanced" and check the box for "Cable Connected."  Click "Ok."

#2  Go to the Linux CentOS server.  Enter this command:

ip addr show | grep inet | grep -v inet6 | grep -v 127.0.0.1 | awk '{print$2}'

Make a mental note of the IP address you find (e.g., 10.0.2.14), but you can ignore the CIDR (e.g., /24).

#3  In Oracle VirtualBox go back to Devices -> Network -> Network Settings.  For Adapter1 go to "Advanced" and click the button for "Port Forwarding."  If you find everything has been preconfigured, make a mental note of the Guest IP address and go to step #4.  Otherwise click the icon of the green diamond with a green plus sign to add a rule.  Make sure the rule, under any name, has the following settings:

Protocol: TCP
Host IP: 127.0.1.1
Host port: 22
Guest IP: 10.0.2.14
Guest port: 22

"10.0.2.14" is just an example of a guest IP address.  The Guest IP you should use should be the IP address found in step #2 above.  Similarly, "127.0.1.1" is just an example of a Host IP address.  If you have two or more guest machines, you may want to use "127.0.2.1" for one of the servers.  This way you could connect to each of them with Putty.

Click "OK" and click "OK" again.

#4  Open Putty on the Windows host.  Connect to the guest IP address -- in the example above for one server, it would be 127.0.1.1.

How Do You Download a File With PowerShell When You Get the Error “Not enough space on disk”?

Problem scenario
You are using PowerShell 3.0 on Windows 7 and you try to run the PowerShell command start-bitstransfer to download a large file.  Running start-bitstransfer results in an error that says "Not Enough space on disk." 

Solution
Verify the size of the file.  See if the destination directory/drive has sufficient space.  If this error happens despite there being ample space available in the destination drive and destination directory compared to the size of the source media,  see if the destination is using a FAT32 file system.  Go to "My Computer."  Right click the drive (e.g., H:) that is the destination of the download and go to Properties.  On the "General" tab there is a section that says "File System."  If it is FAT32, the file will not be downloaded if it is 4 GB or larger because that is too big for FAT32

To change the file system type from FAT32, you can convert the file system to NTFS with this link.

Oracle VirtualBox Client (or VM or virtual Linux server) Has No Internet Access

Problem scenario:  You are running Linux 7.x in Oracle VirtualBox on a Windows Professional 7 laptop.  In the Linux server, you try to ping an IP address.  You get "connect: Network is unreachable."

Solution

1.  In the Oracle VirtualBox window of the server, go to Devices -> Network Settings -> Adapter 1

     a) Go to Attached To: and choose "NAT"

b) Check the box for "Cable Connected"

2.  On the client, modify this file /etc/sysconfig/network-scripts/ifcfg-enp0s3

a) Add these two lines, with no spaces, above the "ONBOOT" stanza without deleting other lines:

     DNS1=8.8.8.8
     DNS2=8.8.4.4

     b) Change the "ONBOOT" stanza to be yes, like this (with no spaces):

     ONBOOT=yes  

c) Save the changes.

3.  Reboot the client

4. If you are still having problems, you may want to see this posting.

How Do You Create Bootable Media with an .iso File That Is over 7 GB?

Problem scenario:  You want to install Linux on a laptop or workstation.  You need to create bootable media with an .iso file that is over 7 GB.  CDs and DVDs cannot support 7 GB.  What do you create a bootable USB stick?

Solution
This assumes you have downloaded the installation media (the .iso file) to your computer.  For .iso files that are over 8 GB, you may need a USB stick that is greater than 8 GB.  Assuming you have a large enough USB stick, use the portable version of Rufus.  Then follow these steps:

1.  Open Rufus (the portable version). 
2.  For the device that will be bootable, all of its data will be destroyed.  Back up the data now.  
3.  The "Device" drop down menu at the top of Rufus is the destination of the bootable media.  Change this to the drive letter that will become bootable.   
4.  In the Format Options, there is an option for "Create a bootable disk using ..." section.  Click the icon of the CD to select the correct source of the .iso file.  
5.  The rest of the default settings for Rufus (the portable version) can remain the same.  Click "Start."
6.  You may get a pop up window for "ISOHybrid image detected."  Keep the  "Write in ISO Image mode" selected.  Click "Ok."  If you do not get the pop up prompt, go to step #7.
7.  You will get a prompt about deleting all the data on the destination drive you chose in step #3.  Click "Ok" to proceed.  Or click cancel if you forgot to back up some of the data.  For a 16 GB USB stick, it may take 25 to 50 minutes.  Warning: when Rufus is finished, there will be no messages.  You will see the Rufus application that will look very similar to the way it looked when you started.

How Do You Convert A Windows File System On One Drive To Be NTFS?

Problem scenario:  You have a drive "H:" that is using FAT32.  You want to conver it to NTFS.  You open PowerShell as Administrator.  You delete the files on drive H:.   You run this command:

convert h: /fs:ntfs

You see this message "File and folder verification is complete."  It hangs and never completes.

Solution
Do not use PowerShell.  Follow these three steps:
     #1  Open a regular (non-PowerShell) command prompt.  
     #2  Run this command:  chkdsk /F h:
     #3  Run this command:  convert h: /fs:ntfs