×


Blog


Welcome to Emergency mode in Linux - Fix this boot error now

This article covers how to fix boot error, Welcome to Emergency mode in Linux. This issue happens after an emergency power outage on a server, a system crash, or similar situations.


The Emergency Mode sometime means that your file system may be corrupted.

In such cases, you will be left out with a prompt to go nowhere.

All you have to do is perform a file system check using,

fsck.ext4 /dev/sda3

where sda3 can be your partition and if you are using ext3 file system, change the command as follows:

fsck.ext3 /dev/sda3

About the partition number, Linux shows you the partition before arriving at the prompt.

This should solve the problem.


To fix  Emergency Mode On Ubuntu:

1. use Ubuntu Live USB to boot, and open terminal:

$ sudo fsck.ext4 /dev/sda3

2. Adding sudo because it needs root permission.

(Replace ext4 with ext3 if applicable to you)

3. Cycle through the SDAs by changing the last number in the sda to see which file system has problems.

Ex: sda1, sda2, sda3, sda4, and so on

4. As I encountered, the problem might be with the 'home' directory.

5. Once you run the above command, you'll be prompted to fix the issue right inside the terminal itself.

6. Keep hitting y (for yes) until the end of the fix.

(or you can use -fy for automatically response yes to all.)

7. Navigate to the home folder of your sda using your files explorer.

(This will be mounted from the HDD since you are working with a Live USB)

8. Check inside 'home' if you can see all your files. If yes, then you're ready to reboot to your system (remove the Live USB).


Your system requires smb2 or higher Windows error - Fix it now

This article covers how to fix the Windows error 'Your system requires smb2 or higher'. SMB1 protocol is vulnerable and your system will give you a warning message saying that it requires SMB2. 

Most Windows 10 users reported Your system requires SMB2 or higher error message on their PC. 

SMB stands for Server Message Block, and it's a protocol for sharing files. The protocol has two versions, the SMB1, and the SMB2, and while both can be used, the latter is the more secure one.


To enable SMB2 on Windows 10:

Check if your system can install SMB2

1. Start PowerShell as administrator. Press the Windows Key+ X and select PowerShell (Admin).

2.Type Get-SmbServerConfiguration | Select EnableSMB2Protocol in the command prompt of the Window PowerShell and press Enter.

3. If your system can run SMB2 protocol, type windows features in the Search box and select Turn Windows features on or off.

4. Once the Windows Features window opens, check SMB1/CIFS File Sharing Support option and hit OK.

5. Restart your PC and check if the problem with SMB2 is resolved.


To enable SMB2 on Windows 10 using Powershell:

1. Start PowerShell as administrator. We already showed you how to do that in our previous solution.

2. Enter Set-SmbServerConfiguration –EnableSMB2Protocol $true and press Enter.

3. Press Y to confirm.


Map Network Drives or Shared Folders with Group Policy - How to do it

This article covers how to map network drives or shared folders with Group Policy.

Mapping network drives using Group Policy preferences is flexible, provides easy control over who receives the drive mappings, and has easy-to-use user interfaces, all of which are in stark contrast with the complexities associated with scripts.


To Set up drive mappings with Group Policy preferences:

1. Group Policy preferences are a set of extensions that increase the functionality of Group Policy Objects (GPOs). 

2. Administrators can use them to deploy and manage applications on client computers with configurations targeted to specific users. 

3. The Drive Maps policy in Group Policy preferences allows an administrator to manage drive letter mappings to network shares.


To Deploy item-level targeting with Group Policy preferences:

Item-level targeting (ILT) is a feature of Group Policy preferences that allows preference settings to be applied to individual users and/or computers dynamically. ILT allows an administrator to specify a list of conditions that must be met in order for a preference setting to be applied or removed to a user or computer object.

You can configure drive mapping, only users in the Product Managers group would receive the mapping. 

1. Under the Common tab of the mapped drive properties, check the Item-level targeting option, and then click Targeting….

2. In the Targeting Editor window, click New Item and select Security Group.

3. Click the … button, and type in the name of the security group.

4. Click OK to close the Targeting Editor once you're finished adding items to the list. 


resolvconf error resolv conf must be a symlink - Fix it Now

This article covers how to fix resolv.conf error which happens when we try to restart the BIND 9 server under Ubuntu Linux.


To fix Resolvconf error "resolvconf: Error: /etc/resolv.conf must be a symlink":

Open a terminal and run the following commands:

$ sudo rm /etc/resolv.conf

$ sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf

$ sudo resolvconf -u


As of Ubuntu 12.04 resolvconf is part of the base system.

You can recreate the needed symlink by running:

$ dpkg-reconfigure resolvconf

or by doing the following in a terminal.

$ sudo ln -nsf ../run/resolvconf/resolv.conf /etc/resolv.conf

Note that as of Ubuntu 12.10 resolvconf no longer aborts if /etc/resolv.conf is not a symlink. It does print a warning message, but this can be silenced by putting the line:

REPORT_ABSENT_SYMLINK=no

in /etc/default/resolvconf.


Segmentation fault in Nagios - Fix it Now

This article covers how to fix the Segmentation fault in Nagios.

A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core .

Segfaults are caused by a program trying to read or write an illegal memory location.


What does segmentation fault mean in Linux?

A segmentation fault is when your program attempts to access memory it has either not been assigned by the operating system, or is otherwise not allowed to access. "segmentation" is the concept of each process on your computer having its own distinct virtual address space.


Typical causes of a segmentation fault:

1. Attempting to access a nonexistent memory address (outside process's address space)

2. Attempting to access memory the program does not have rights to (such as kernel 3. structures in process context)

4. Attempting to write read-only memory (such as code segment)


To fix Segmentation Fault (“Core dumped”) in Ubuntu:

1. Remove the lock files present at different locations.

2. Remove repository cache.

3. Update and upgrade your repository cache.

4. Now upgrade your distribution, it will update your packages.

5. Find the broken packages and delete them forcefully.


ERROR: PleskDBException: Unable to connect to database - Fix it now

This article covers methods to resolve error: pleskdbexception: unable to connect to database which triggers as a result of various reasons that include InnoDB engine corruption, disk space full, data directory not completely restored or recovered, and so on. 

The reason of this error is due to disk full and you need to delete extra file from my linux Server.

fslint is a Linux utility to remove unwanted and problematic cruft in files and file names and thus keeps the computer clean. A large volume of unnecessary and unwanted files are called lint. fslint remove such unwanted lint from files and file names.


To Clear RAM Memory Cache, Buffer and Swap Space on Linux:

1. Clear PageCache only. # sync; echo 1 > /proc/sys/vm/drop_caches.

2. Clear dentries and inodes. # sync; echo 2 > /proc/sys/vm/drop_caches.

3. Clear PageCache, dentries and inodes. # sync; echo 3 > /proc/sys/vm/drop_caches.

4. Sync will flush the file system buffer. Command Separated by “;” run sequentially.


To find largest files including directories in Linux is as follows:

1. Open the terminal application.

2. Login as root user using the sudo -i command.

3. Type du -a /dir/ | sort -n -r | head -n 20.

4. du will estimate file space usage.

5. sort will sort out the output of du command.


To uninstall an RPM package:

1. Execute the following command to discover the name of the installed package: rpm -qa | grep Micro_Focus. This returns PackageName , the RPM name of your Micro Focus product which is used to identify the install package.

2. Execute the following command to uninstall the product: rpm -e [ PackageName ]