Posts Tagged ‘OS’

Error “WindowsUpdate_80244019” or “WindowsUpdate_dt000” during update your Windows.

The problem in majority of the cases is related to the wrong DNS loading. The problem itself very often happens when you are behind several routers (like one from internet connection vendor and one your WiFi router) and until you don’t flush your current DNS configuration you can try anything but you won’t be successful.
What’s really funny that’s so easy – just run the command prompt with admin rights, then run the following command:

ipconfig /flushdns

make a coffee and get back to the WU heaven 🙂
All other applications are able to deal with that – WU not. From my point of view this is a bug and I am just surprised it’s nowhere documented.

You could also register the DNS in command prompt with:

ipconfig /registerdns

and check your current DNS settings with:

ipconfig /displaydns

Hope this helps!


How to stop/start and disable/enable firewall on Oracle Linux 7.

2015-10-16 2 comments

Fedora 18 introduced firewalld as a replacement for the previous iptables service. Since RHEL7 and Oracle Linux 7 are based on Fedora 19, the switch from iptables service to firewalld is now part of the Enterprise Linux distributions.
The firewall on Oracle Linux 7 system is enabled by default. Normally there should not be a need to disable firewall but it may be quite handy for testing purposes etc. The firewall runs as firewalld daemon. Bellow command can be used to check the firewall status:

[root@orclprod ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Fri 2015-10-16 14:54:37 CEST; 18s ago
 Main PID: 2481 (firewalld)
   CGroup: /system.slice/firewalld.service
           L¦2481 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Oct 16 14:54:37 orclprod systemd[1]: Started firewalld - dynamic firewall d...n.
Hint: Some lines were ellipsized, use -l to show in full.

From the above output we can see that the firewall is enabled, which means it will start automatically after reboot and that is also current active. Furthermore, you can even check all currently applied rules with:

[root@orclprod ~]# iptables-save

You need to distinguish between the iptables service and the iptables command. Although firewalld is a replacement for the firewall management provided by iptables service, it still uses the iptables command for dynamic communication with the kernel packet filter (netfilter). So it is only the iptables service that is replaced, not the iptables command. That can be a confusing distinction at first.
The firewall on Oracle Linux 7 system can be stopped by a following command:

[root@orclprod ~]# service firewalld stop
Redirecting to /bin/systemctl stop  firewalld.service

Stopped firewall will start again after system’s reboot. To start firewall use the following command:

[root@orclprod ~]# service firewalld start
Redirecting to /bin/systemctl start  firewalld.service

In order to completely disable OL7 firewall, so it would not start after reboot, run:

[root@orclprod ~]# systemctl disable firewalld
rm '/etc/systemd/system/'
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'

Now the firewall would not start after system’s reboot. To enable the firewall again run:

[root@orclprod ~]# systemctl enable firewalld
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/'
Categories: Oracle Linux, OS Tags: , ,

How to disable SELinux on Oracle Linux 7.

Security-Enhanced Linux (SELinux) is an implementation of security policies for operating systems that provides a mechanism to support and help control access in the linux kernel. On Red Hat Enterprise Linux 7 (RHEL 7), CentOS 7 and Oracle Linux 7 (OL7), SELinux services were installed by default. The following tutorial will show you the basic steps to permanently disable SELinux on OL7 – should works also on RHEL 7 and CentOS 7.
You can check the SELinux status with the following command:

[root@orclprod ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

To disable SELinux you have to change the “SELINUX=enforcing” to “SELINUX=disabled” in the /etc/sysconfig/selinux configuration file:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.

Then reboot the server to take effect and check the SELinux status once again just to make sure:

[root@orclprod ~]# sestatus
SELinux status:                 disabled
Categories: Oracle Linux, OS Tags: , ,

How to turn on the network connection during Oracle Linux 7 startup.

First of all check the network interface configuration file located in the /etc/sysconfig/network-scripts folder (in my case it’s the ifcfg-enp0s8 file):

[root@orclprod ~]# more /etc/sysconfig/network-scripts/ifcfg-enp0s8

Be sure that ONBOOT setting is set on yes – this should do the trick.
Be aware that while configuring the network on command line, the GUI could not catching up with the updates you made. It will be synchronised by rebooting the server (network interface restart should also fix this issue).

Categories: Oracle Linux, OS Tags: , ,

How to turn on the NetworkManager on Oracle Linux 7.

NetworkManager is a dynamic network control and configuration system that attempts to keep network devices and connections up and active when they are available. NetworkManager consists of a core daemon, a GNOME Notification Area applet that provides network status information, and graphical configuration tools that can create, edit and remove connections and interfaces. NetworkManager can be used to configure the following types of connections: Ethernet, wireless, mobile broadband (such as cellular 3G), and DSL and PPPoE (Point-to-Point over Ethernet). In addition, NetworkManager allows for the configuration of network aliases, static routes, DNS information and VPN connections, as well as many connection-specific parameters. Finally, NetworkManager provides a rich API via D-Bus which allows applications to query and control network configuration and state.
The NetworkManager daemon runs with root privileges and is usually configured to start up at boot time. You can determine whether the NetworkManager daemon is running by entering the following command:

[root@orclprod ~]# service NetworkManager status
Redirecting to /bin/systemctl status  NetworkManager.service
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
   Active: inactive (dead)

The service command will report NetworkManager is stopped if the NetworkManager service is not running. To start it for the current session use the following command:

[root@orclprod ~]# service NetworkManager start
Redirecting to /bin/systemctl start  NetworkManager.service

Run the chkconfig command to ensure that NetworkManager starts up every time the system boots:

[root@orclprod ~]# chkconfig NetworkManager on
Note: Forwarding request to 'systemctl enable NetworkManager.service'.
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/'
ln -s '/usr/lib/systemd/system/NetworkManager-dispatcher.service' '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service'

How to shrink your dynamically expanding VirtualBox image (handle the VBOX_E_FILE_ERROR 0x80BB0004).

Sometimes bigger isn’t always better. If your dynamically expanding virtual machine images are growing out of control, then here’s how to trim them back.
I’m a big fan of VirtualBox and use separate virtual machines (VMs) for the various separate bits and pieces I’ve got on the go (as I invariably end up messing something up, and can just trash the image and start again, without taking down whatever else it is I’m playing with at the time).
All my VMs use a dynamically expanding image for their hard drive, where you set the maximum size of the disk, but the system will only grow to fill that space if required. By setting this nice and high, I can be sure that the hard drive space is there if I need it, without taking space away unnecessarily from the rest of the system.
Unfortunately, whilst VirtualBox will dynamically expand the hard drive as it’s required, it won’t dynamically shrink it again if you free up space in the VM. This can be a problem, especially if, like me, the sum total of all those theoretical maximums exceeds the actual maximum capacity of the hard drive hosting all these VMs.
The good news is that you can shrink those images back down again. The bad news – it can be awkward process. I hope, this note will go through the steps to shrink your Virtualbox image.

1. Free up space in the client machine.
It’s a bit of an obvious first step but you can only shrink down the client VM by the size of the available free space therein, so delete the files and uninstall the programs that you no longer need but are hogging your resources. Don’t forget to empty recycle/trash bins 🙂

2. Perform a hard disk defragmentation.
Again, it’s rather obvious step in Windows guests. For Linux guests – here is a nice try.

3. Clean the garbage.
After defragmentation, the data is nicely aligned but we still got all those unused blocks that contain garbage (the contents of the files that used to live there). Therefore we need a tool that can find these blocks and overwrite them with zeros.
Windows does not come with such a compact tool but it’s (sdelete) available for download from Microsoft.
Open a command prompt and move to the sdelete directory. Type in the following command (this will add zeroes to all the free space in your C drive):

sdelete -z c:

For Linux guests you need to use zerofree but it is (as always) more complicated – here you can find more details.

4. Shrinking the VM.
Now that we are done with clearing up the VM and zero out all the free space, it’s time to shrink the file size using the VboxManage command. First of all you need to shutdown your VM 🙂
Quite a lot of the online guides say that you’ll have to clone the hard drive image to shrink it, as VirtualBox 2.2 and above dropped support for compacting the image. This isn’t true (certainly not for version 4.3.6 – the version I used to wrote this note) and you can shrink the image in-place with the following command:

VBoxManage modifyhd my_image_name.vdi –compact

where you replace my_image_name.vdi with the name of the image drive you’d like to shrink (for more information on this command, see the VirtualBox manual).

And that’s all – you’ll now have plenty of disk space to fill with equally useless shit 🙂

Unfortunately, life is sometimes not so simple and during shrinking your VM image, you can get the VBOX_E_FILE_ERROR 0x80BB0004 error. How to handle it? In my case, I’ve got the following error:

VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium
VBoxManage.exe: error: Context: "int __cdecl handleModifyHardDisk(struct HandlerArg *)" at line 582 of file VBoxManageDisk.cpp

First, I try to check disk to verify if there are no errors. I used CHKDSK tool in Windows. On Linux you could use FSCK command. There were no disk errors in my case.
Therefore, I decided to use CloneVDI – a nice tool with GUI which solved my problem. Here you can find more details and download it.

Enable multiple RDP connections per user in Windows Server 2012.

By default, Windows 2012 servers allow a single Remote Desktop session (exactly the same way as it was in Windows 2008).
If only one session is available and you take over another person’s live session, you may choose to enable multiple RDP sessions.

Below, you can find steps for enabling multiple sessions:
1. Open the start screen (press the Windows key) and type gpedit.msc and open it.
2. Go to Computer Configuration => Administrative Templates => Windows Components => Remote Desktop Services => Remote Desktop Session Host => Connections.
3. Set Restrict Remote Desktop Services user to a single Remote Desktop Services session to Disabled.
4. Double click Limit number of connections and set the RD Maximum Connections allowed to 999999 (maximum allowed).


Categories: MS Windows, OS Tags: , , ,