How to check for bad blocks

Scenario / Question: How do I check my hard drive for bad blocks and if any bad blocks are found add them to the bad block inode to prevent them from being allocated in the future. Solution / Answer: Run fsck and have it run bad blocks program. This allows fsck to fix any bad blocks that are [continue...]

Erase MBR

Scenario / Question: How do I remove a third party boot loader from the MBR Solution / Answer: Erase the first 512 bytes of the harddrive to remove the bootloader Erase MBR Using a linux boot cd: # dd if=/dev/zero of=/dev/hda1 bs=512 count=1 Windows dos boot disk: fdisk /mbr Windows XP recovery [continue...]

Moving and Renaming Directories and Files

Now that we know how to create directories and files we need to be able to rename them and move them. In Linux the command to move and rename is the same ! command to rename and move directories and files NAME mv – move (rename) files SYNOPSIS mv [OPTION]… [-T] SOURCE DEST mv [continue...]

Creating Directories and Files

Today we begin learning how to work with the file system. We will cover how to create directories and files. The command to create directories NAME mkdir – make directories SYNOPSIS mkdir [OPTION] DIRECTORY… Lets first change our working directory to the temporary directory /tmp: $ [continue...]

Deleting or Removing Directories and Files

Now that we know how to create directories and files, we need to learn how to delete them. There are two commands for deleting or removing directories in linux. The command “rmdir” and “rm”. The “rmdir” and “rm” commands are unforgiving and there [continue...]

Navigating the Linux File System

Now that we know how the Linux File system is structured, we need to be able to move around or navigate. Before we can begin navigating we need to be able to list the contents of directories so that we can see where we can go. The command to list a directories contents. NAME ls – list [continue...]

Linux File System Structure

While initially discussion on the file system structure isn’t the most exciting part of Linux. Knowing how the Linux file system is structured will help you understand Linux and be a better Linux user and administrator. The Linux File system is different in that it has One Tree and One [continue...]

How should I run fsck on a Linux file system

Scenario / Question: I need to check file system for errors using fsck. Can I run fsck on a mounted file system ? Solution / Answer: Running fsck on a mounted file system can result in data corruption. The two options are: 1) Change the running state of the system to single user mode and [continue...]

Linux LVM Extend on Software RAID Partition

Scenario / Question: How do I extend my LVM to include another RAID Array partition Solution / Answer: Create a new Physical Volume Extend the Volume Group Extend the Logical Volume Resize the File System to the new size Display the current Physical Volumes: # pvdisplay --- Physical volume [continue...]