Friday, November 17, 2023

Offline Windows Repair via DISM and SFC

 Background

This is an option that would come in handy when you end up with a broken Windows installation that wouldn't boot and you are left with no backups or retore points. This article revolves around a personal experience of repairing a Windows Server 2012 R2 instance in the year of 2023 and the given steps would ideally work for any proceeding Windows versions.

VMware P2V Converted VM

I was tasked with restoring a VM that was converted from Physical to Virtual using VMware's P2V Converter, which did not opt-in to include the VMware Tools during the conversion.

State of the Machine

While the actual reasons for the outcome of the P2V conversion is unclear to me, investigating revealed the following as the state of the VM. 

  • The windows Boot Log indicated that the BasicDisplay.sys driver (Windows default display driver) failed to load in compatible with the VMware virtual machine hardware version, which was on version 19.

  • The windows Operating System was corrupted. I realized this after, I managed to inject the VMware Tools Display driver into the Operating System VMDK and boot up the VM. The boot sequence ends with a System File Checker failing to repair the System Drive. More details on manually adding VMware drivers into an offline windows installation can be found on this article Manually Adding VMware Tools Drivers into a Offline Windows Installation.

Offline Windows Repair

Booting into Windows PE

Boot the VM into Windows Advanced Boot Options as shown below. During system boot, hit F8 and then select the Repair Your Computer option.



Mount a windows DVD/ISO (if Physical/VM respectively) on to the machine, that has the same flavor of windows as per the operating system you are trying to recover from. In my case, it would be a Windows Server 2012 R2 ISO file mounted as a DVD drive within the VM. Select Troubleshoot and then select Command Prompt.

 

Select the Account you want to use to assume the command prompt as. In my case, it would be Administrator and enter the credentials.

 


Understanding the Disk Layout

Now you are on a command prompt with within the Windows Recovery Environment. Now we need to understand the disk layout for the environment.

type in  DISKPART  and then  LIST VOL  to show the current drives mounted.


Take note of the DVD/ISO drive you mounted and the original C:\ drive of the operating system you need to repair. This would usually be the drive that contains the C:\Windows folder. In my case, the ISO is mounted on the E:\ drive and the the offline operating system is on the D:\ drive.

Now, I will be using DISM to perform a Offline Repair of the Operating System. Essentially what will be happening is, DISM will assess the operating system and identify problems. It will then use the mounted DVD/ISO as the source for repairing.

Using DISM to Repair a Offline Windows Image

 DISM  /Image:D:  /Cleanup-Image  /RestoreHealth  /Source:wim:E:\sources\install.wim:2  /LimitAccess 

The above command can be broken down

/Image - Defines the Windows Image that requires to be repaired.

/Cleanup-Image and /RestoreHealth in combine -  Targets the operating system and performs a cleanup and recovery options on the mounted operating system.

/Source:wim - Defines the source to be used for the repair and specifies that it needs to use a WIM file. Notice the ":1" at the end of the "install.wim". This is the index for the operating system versions on the DVD/ISO. The ISO I loaded comes with Windows Server 2012 R2
  • Standard Core
  • Standard (GUI)
  • Datacenter Core
  • Datacenter (GUI)
This can be verified by running the following command.
 DISM /Get-ImageInfo /ImageFile:E:\sources\install.wim 

The command will show an output as below. Accordingly, the index for my operating system that I'm running the repair against would be Index:2



 /LimitAccess - This tells DISM not to connect to the Internet.

More details on the DISM commands and capabilities can be found on this Microsoft article DISM Command-Line Options.

Note that running this command would take approximately 15 to 30 mins and may depend on your system. Do note, that the progress usually goes upto 20% and stays there for some time. On completion, you will see the below output.

 


Using SFC (System File Checker) to Verify the Integrity of a Offline Windows Image


Next I would run a SFC scan to verify the integrity of Windows as well. The command I use would be

 SFC /SCANNOW /OFFBOOTDIR=D:\ /OFFWINDIR=D:\Windows 

While the usual SFC uses SFC /SCANNOW when executed within a live windows environment, since we are executing the command offline, we need to specify the Offline Boot Directory and the Offline Windows Directory.

Once completed, exit the Windows PE and reboot into Windows normally which should now allow you to boot up into your environment.

I my case, I still had to boot into Advanced Boot Options and select Disable Driver Signature Enforcement in order to accommodate the VMware display driver that I had to manually inject into the operating system as mentioned initially. After successfully login in, I installed VMware Tools by running the installation files from VMware and rebooted the environment, which brought the system into normal boot/operational status.

Manually Adding VMware Tools Drivers into a Offline Windows Installation

Background

This is an option that would come in handy when you are in a situation, where you are unable to load a Windows VM in VMware due to the lack of drivers. I ran into a similar situation with a Windows box that was converted from Physical to Virtual without enabling VMware Tools installation on the destination, during conversation. This resulted with the converted Windows box on VMware booting up to the Windows Splash screen and then resulting with a black screen. The boot log indicated that Windows could not load the Display driver.

Preparation

Turn down the VM and copy the VMDK that contains the Operating System to a separate temporary folder. Spin up a new Windows VM or you could use an existing VM for this purpose. Attach the copied VMDK as an existing hard drive to the new VM and load into Windows.

I used a fresh temporary VM (without VMware Tools installed) for this purpose, so it allowed me to directly attached the VMware Tools ISO into the VM from the vCenter Console. You could chose the best option that suites you to get the VMware Tools install sources loaded up into your VM.

In my case, I'm after the VMware Display driver. In your case, you could go after the driver you intend to, and the process will still be the same, except for the driver I chose to copy from.

Extract the VMware drivers to a local folder, which should look like below, after extraction. To extract the drivers, follow this guide from VMware, Extracting the drivers from VMware Tools bundled with VMware Workstation (2032184)

The drivers you seek will be in the directory [extracted_folder]\VMware\VMware Tools\VMware\Drivers.



Since I'm after the display driver, I copied the video_wddm folder into a folder I created under C:\vmdrivers\.



Make sure the VMDK containing the Operating System of the problematic VM is successfully mounted within this environment. In my case, it would be the F:\ drive as shown.






Using DISM to Inject Drivers into an Offline Windows Installation

You would need to first identify the following information.

  • Image: In my case, this would be the VMDK attached to this environment as an existing disk. Value for the command would be F:.

  • Driver: This will be the driver you want to inject into the image. You need to point DISM towards the INF file in the driver directory. DISM will then inflate the driver as needed using the applicable components within the folder. In my case, this would be C:\vmdrivers\video_wddm\Vista\vm3d.inf.

Accordingly, the command to be executed would be as below. Make sure this is executed using an elevated command prompt.

 DISM /Image:F: /Add-Driver /Driver:C:\vmdrivers\video_wddm\Vista\vm3d.inf 

Verify the driver got successfully injected into the image, by running the below command. All drivers loaded within the image will be listed. To make my life easy, I piped the output to a text file and did a search for VMware.

 DISM /Image:F: /Get-Drivers 

 

Documentation on the further use of DISM and Drivers can be found in this Microsoft Article Add and Remove Driver packages to an offline Windows Image.

Finally I shutdown the VM and re-attached the VMDK to it's original VM and booted it up with the successful loading of the display driver.

Wednesday, October 12, 2011

Auto Discovery Fails for All Users with the Error Code 0x80072F0C

Clients usually experience this problem due to the deference of how Client Certificates and SSL Server Certificates work.
  • SSL Certificates provide the functionality of Encryption and Security
  • Client Certificates provide the functionality of Authentication

Though the two technologies both use certificates, they are not related directly. WINHTTP is the mechanism that's used to connect to the web through SSL. When running in NATIVE MODE, the client attempts to ignore the SSL Certificate and use the Client Certificate, which results in a failing connection to webpage that requires SSL.

This problem could be resolved through the following

  1. Expand the "autodiscovery" hive on the IIS Management Console
  2. In the middle pane select "SSL Settings" for the autodiscovery virtual directory.
  3. Under "Client Certificates" make sure the option "Ignore" is selected instead of "Accept" or "Require"

This should resolve any Auto Discovery related problems with clients if you have configured the Autodiscovery on the Exchange Server Error free..



Wednesday, August 31, 2011

How to Logoff Users on a Remote Server from the CLI

This is some thing that can only be achieved through privileged access to the server you login to perform the task.

To Query for users on the Server

>QUSER [username | sessionname | sessionid] [/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]

  • username: Identifies the session with user username.
  • sessionname: Identifies the session named sessionname.
  • sessionid: Identifies the session with ID sessionid.
  • /SERVER:servername: The server to be queried (default: current).
  • /MODE: Display current line settings.
  • /FLOW: Display current flow control settings.
  • /CONNECT: Display current connect settings.
  • /COUNTER: Display current TSs counters information.

This command will work for almost all the new Windows distributions. For windows XP, an Enviromental Variable needs to be added. However the path could be temporarily set by the below, before executing the above command.

>SET PATH = C:\Windows\System32\DLLCache

To Logoff a user from the server

>LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

  • sessionname: The name of the session.
  • sessionid: The ID of the session.
  • /SERVER:servername: Specifies the TS (default is current).
  • /V: Displays info about the actions performed.

How to mount Exchange 2000/2003 database when E00.log is missing

You may get the below Error message when trying to mount the mail store: "An internal processing error has occurred. Try restarting the Exchange System Manager or the Microsoft Exchange Information Store service, or both. ID no: c1041724". Also you may note the Event IDs 9518 & 455 in your Application logs.

Solution

  1. Stop all Exchange related services on your server.
  2. Backup your log files that are usually located on x:\Program Files\exchsrvr\MDBDATA\Exxxxxxx.Log to a temporary folder.
  3. Delete all *.log files in the x:\Program Files\exchsrvr\MDBDATA except for e00.chk, res1.log and res2.log
  4. Start all exchange related services.
  5. Mount the mail store.
If the above does not work, it could be due to a corrupted database. You could probably find a solution for it through the below link

http://www.msexchange.org/tutorials/exchange-isinteg-eseutil.html

Monday, March 15, 2010

Important Switches for Outlook

Many of us do a reinstall of MS Office when ever we encounter a problem in outlook. But have you ever thought of any possible fixes for the problems you face. I hope this post will help you a lot through making your life easier with Outlook. Below I have stated some of the most important switches that could be used for outlook in order to fix problems.

All commands could be typed on a run prompt, which could be opened by Start --> Run

1. "outlook.exe /cleanclientrules" ~ This command will start Outlook, but will deleted any rules you've made. This is very useful if you are having trouble with any rules you’ve already created.
2. "outlook.exe /cleanprofile" ~ This is a very handy command when you have corrupted profiles. This command removes invalid profile keys and creates default registry values as needed.
3. "outlook.exe /cleanpst" ~ This command will start outlook with a clean PST file.
4. "outlook.exe /cleanrules" ~ This command is similar as "/cleanclientrules", but the difference is this commands clean all client and server rules.
5. "outlook.exe /firstrun" ~ This command will start Outlook as if it was started for the first time on your computer.
6. "outlook.exe /noextensions" This command will start Outlook with no Extensions (Add-ins). But how ever it could be listed in the Add-in-Manager.
7. "outlook.exe" ~ This command will resets all folder names to their defaults. Ex-You could rename your "Inbox" to some other name. This could be reversed.
8. "outlook.exe /resetfolders" ~ This command will restore missing folders for the default delivery location.
9. "outlook.exe /resetnavpane" ~ This command will remove and recreate the entire navigation pane for the current profile.
10. "outlook.exe /safe" ~ This command will start Outlook in Safe Mode. It will run without 1) Extensions 2) Reading Pane 3) Toolbar customization.
11. "outlook.exe /safe:1" ~ Starts outlook with the reading pane off.
12. "outlook.exe /safe:2" ~ Starts outlook without checking email at startup.
13. "outlook.exe /safe:3" ~ Starts outlook with extension turned off.
14. "outlook.exe /safe:4" ~ Starts outlook without loading customized toolbars.
How ever for further details and more commands you could visit Microsoft Command-Line-Switches . Please feel free to leave your comments regarding this post. Wish you Good Luck with Microsoft Outlook.

Thursday, December 3, 2009

PROLINK H9601 Modem Driver Installation on Ubuntu

The reason for this post is, many folks who own a PROLINK H9601 modem has problems on getting to the internet through UBUNTU. My never ending search came to an end, the day I came across a post on a linux forum. Stated below is the extraction from it, which worked really fine and got me on the internet. The reason for me to put this extraction on this blog is to increase popularity of the resolution. The original POST could be found at this link

The linux driver for prolink h9601 is eciadsl(google it)
install it and the download the synch.bin achive which is also there and extract it to /etc/eciadsl/synch
use the following parameters to configure
using eciadsl-config-text command as root

VID1=0915
PID1=8102
VID2=0915
PID2=8102
MODE=LLC_SNAP_RFC1483_BRIDGED_ETH_NO_FCS
VCI=35
VPI=8
FIRMWARE=/etc/eciadsl/firmware00.bin
SYNCH=gs7470_synch20.bin
PPPD_USER=(username)
PPPD_PASSWD=
USE_DHCP=no
USE_STATICIP=no
STATICIP=
GATEWAY=
MODEM=Other
MODEM_CHIPSET=GS7470
SYNCH_ALTIFACE=0
PPPOECI_ALTIFACE=0
PROVIDER=Other
DNS1=203.115.0.46
DNS2=203.115.0.47

then to connect enter these commands as root eciadsl-start.keep entering this command until an error comes telling that a process called eciadsl-pppoeci is already running.

then type ifconfig and you must see something like this(without any rx packets):

tap0
Link encap:Ethernet HWaddr d6:ab:d9:99:f5:2e
inet6 addr: fe80::d4ab:d9ff:fe99:f52e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18395 errors:0 dropped:0 overruns:0 frame:0
TX packets:19493 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:17577091 (17.5 MB) TX bytes:2835186 (2.8 MB)

if you dont see something like this then try eciadsl-start again until you see it.
then after tap0 appears
enter the command pppoeconf tap0

then it will scan some stuff and press enter for all those stuff enter you username and password when asked.after you are done ,

connect by typing pppoe-start

happy surfing

Please Note
The text in BOLD are unique to every ISP. Please contact your ISP to find the details relevant to you.

Thursday, October 15, 2009

The Bootup Sequence of Windows XP Consist of 5 Major Steps

1) Pre-boot. This phase is started when the computer is first power on. The computer runs a power-on-self-test, which it will be probing for Plug and Play Hardware devices. After this process, the Basic Input/Output System (BIOS) will locates the Master Boot Record (MBR), which it uses to locate and start the Operating System.

2) Boot. In this phase the NTLDR is used to initialize the system and change the microprocessor from real mode to 32-bit flat memory mode. Next the following files are used to locate and load the Operating System

NTLDR
Ntdetect.com
Boot.ini

3) Kernel Load. During this phase the NTLDR loads the Ntoskrnl.exe file, but does not initialize it. It also loads the HAL and HKEY_LOCAL_MACHINE Registry key during this phase. This registry key is used to load the device drivers and some of the low level services, which are critical for a successful logon. The information that is created at this phase is called the control set. After this only the NTLDR initializes and passes over the control to the Ntoskrnl.exe (NT Kernel).

4) Kernel Initialization. Upto this point the screen was in text mode. From here onwards the screen changes and the Windows logo appear. During this phase 4 tasks are accomplished.

(a) The Hardware key is created using the data found on the Ntdetect.com file.

(b) The clone control set is created, which is a copy of the control set which was created at the kernel load phase.

(c) The kernel initializes the low-level device drivers that were loaded in the kernel load phase and loads and initializes the higher-level device drivers that are dependent upon the low-level device drivers.

(d) Finally the Session Manger loads all of the Higher-Level Services, including the Win32 sub-system, which is controls the graphical user interface, video display and all I/O devices. Also the WinLogon process is started.

5) Logon. In this stage the winlogon.exe starts the Local Security Authority (LSA), which provide a logon screen.

After a successful logon the System copies the Clone Control Set to the Last Known Good Configuration (LKG) Control Set. This will not be changed until the next successful logon.

Tuesday, October 6, 2009

Files Required to Boot Windows NT/2000/XP (x86 Platforms)

After the systems POST routine process was completely successful, then comes the process of booting up the Operating System. The Boot up process will fail if any of the following files are missing or corrupted.

NTLDR

Root directory of the startup disk

Boot.ini

Root directory of the startup disk

Bootsect.dos

Root directory of the startup disk

Ntdetect.com

Root directory of the startup disk

Ntbootdd.sys (for SCSI only)

Root directory of the startup disk

Ntoskrnl.exe

%SystemRoot%%\System32

Hal.dll

%SystemRoot%\System32

The\SYSTEM registry hive

%SystemRoot%\System32\Config

Device drivers

%SystemRoot%\System32\Drivers


The file "Bootsect.dos" is required only in multi-boot systems.

Also it is possible to boot linux and unix systems through the NT Loader.

Copy the first sector of your root linux into a file in the NT/2000 partition and name the file, for example, C:\Bootsect.inx (by analogy to C:\Bootsect.dos)

Then edit the boot.ini file as follows.
C:\BOOTSECT.LNX="Linux"

Wednesday, September 30, 2009

How To Remove Mahasona.exe

In this post my intention is to reviel the way I removed Mahasona.exe which I assume, is the easiest. Hope this will help the others as well.


1. Open Task Manager (Ctrl+Shift+Ecs)
2. Under the processes tab find explorar.exe not explorer.exe and 'End Task'
3. Run --> (type)C:\windows
4. Find a file named "autofrun.inf" and not "autorun.inf". It may be hidden. If so Tools-->Folder Options-->View--> (Check)"Show hidden files and folders" and also (Uncheck)"Hide protected Oparating system files"-->Apply-->OK. Now again look for "autofrun.inf" not "autorun.inf" and delete it.
5. Now go in to the "System32" folder in the same directory and find "explorar.exe" and not "explorer.exe" and delete it.

Now your PC is safe. If the above didn't work for you, boot the PC in safe mode(Keep hitting F8 when your PC start up and select safe mode.)

1. Run-->[type]cmd[ENTER]
2.type the following


cd/
cd windows
attrib -s -h -r -a autofrun.inf
del/f autofrun.inf
cd system32
attrib -s -h -r -a explorar.exe
del/f explorar.exe


then your done. If you are not sure with this also, just copy the above code and paste it on to a new notepad.





Save it as "mahasonaRemoval.bat" on your desktop.




Now just double click and it will fix the problem for you. Now reboot the PC as normal

To remove the virus prom your pen drive.
1. Hold the shift key when inserting the Pen drive to the PC
2. Then right click and Open OR Explore
3. Unhide all files mentioned as above and delete the autofrun.inf and any unknown *.exe
4. Now your pen drive is also safe.
Alternatively you could download third party S/W to help you through http://answers.yahoo.com/question/index?qid=20090726065303AApWPsI
Hope this post was informative to you.

Saturday, September 26, 2009

Allow PINGs through your Windows Vista Firewall

It is not possible to ping your windows vista computer from another computer while having your firewall enabled. Yes the most simplest and the most drastic solution is to disable the firewall. But there are better ways to get over it.

Enable ICMP Echo Request

Open an Administrative command prompt. This could be done by right clicking the cmd --> Run as Administrator OR in the search pain type cmd and Ctrl+Shift+Enter

Once you open it type the following to Enable ICMP Echo Request

netsh firewall set icmpsetting 8 enable

To disable ICMP Echo Request

netsh firewall set icmpsetting 8 disable

Hope this helped most of you out there wondering how to enable a ping request on your Windows Vista PC without having to disable the firewall

Thursday, September 10, 2009

Manually Reinstall Your Windows XP Operating System on DELL Computer

1. Back up all data needed from the old Installation.
The Windows XP Files & Settings Transfer Wizard could be used.

2. Remove all non-assential pheripharals
Except for the monitor, keyboard, and mouse, remove all external peripherals including:


Scanner
Printer
Modem or Network cables
Personal Digital Assistant (PDA)
USB flash drive or other external Hard Drive
Any other external devices (e.g., USB-attached devices)
Remove the computer from the docking station, if you are using one.

3. Prepare your computer for reinstallation.

The Dell Operating System Reinstallation CD/DVD,
The Dell™ Reinstallation CD for Microsoft® Windows® XP,
The Dell™ Reinstallation DVD for Windows® Vista,
The Dell Resource CD/DVD,
Any application install disks,
Any software and/or documentation for your Internet service connection,
Any install discs for any external devices (such as a printer) and internal devices added to the computer after it was shipped by Dell.

4. Reinstall the operating system from the OS Setup Disk.

5. Install Dell drivers and utilities.

The drivers for your Dell computer can be installed from the ResourceCD/DVD or from the Dell Drivers and Downloads page.

Actual system configurations may vary. The list below is an overview of the correct order to install drivers on Dell desktop and laptop systems. After reinstalling the operating system, follow the order listed when reinstalling drivers. It is recommended that you print this list for referral when installing drivers

NOTE - Some devices may not work if they are not installed in the proper order, please use the list below and install the drivers in the proper order.

NOTE - To select the correct drivers, you need to know what components are installed on your computer. To find out what components are installed on your computer, refer to the Dell Knowledge Base Article: "How to Determine Which Components are in Your Computer" Article ID: 324898.

1) Desktop System Software (DSS) or Notebook System Software (NSS) - A vital utility that provides critical updates and patches for the operating system. If you are reinstalling the operating system or updating all the computer’s drivers, it is imperative that this software be installed first. Currently, the DSS and NSS are not required for systems with Windows Vista installed. This is located under the System and Configuration Utilities Category on the Drivers and Downloads page

2) Chipset - Helps Windows control system board components and controllers. This is located under the Chipset Category on the Drivers and Downloads page.

3) Video Adapter - Enhances video performance. This is located under the Video Adapter Category on the Drivers and Downloads page.

4) Network Interface Card (NIC) - Enhances the network controller for Internet or network access. This is located under the Network Category on the Drivers and Downloads page.
5) Audio Adapter - Enables and enhances the audio controller. This is located under the Audio Category on the Drivers and Downloads page.

6) Modem - Allows dialup capability. This is located under the Communication Category on the Drivers and Downloads page.

7) Wireless Network Card - Enables and enhances the wireless network controller. This is located under the Network Category on the Drivers and Downloads page.

8) Touchpad, Pointer, Trackstick, Mice, and Keyboards - Enhances the pointing device features. This is located under the Mouse & Keyboards Category on the Drivers and Downloads page.

9) Other Devices

a) Bluetooth® ModuleThis is located under the Communication Category on the Drivers and Downloads page.

b) Dell Wireless Mobile Broadband Cards This is located under the Communication Category on the Drivers and Downloads page.

c) PCMCIA/Smartcard controllerThis is located under the Security Category on the Drivers and Downloads page.

6. Connect your computer to the internet or network.

7. Install critical and recommended Windows Updates.

8. Install your applications.

9. Install your third-party hardware and software drivers.

10. Restore your personal files and data from backups

How to Import Mails from MS Outlook to Windows Mail in Vista?

Windows Mail cannot import a *.pst file unless MS Outlook is installed on theVista computer.

You can install MS Outlook, copy the *.pst to the Vista computer, open the *.pst with MS Outlook, then you can import into Windows Mail.

Or,

If you have Outlook installed on an XP computer, import the *.pst data into MS Outlook Express, copy the *.dbx files and *.wab file to the Vista computer, and import into Windows Mail.

Vista Error 80080005 When trying to Update

For this there were 2 possible sollutions that I could come up with.

Sollution1

Run SFC/scannow and reregister WU.

System Files - SFC Command

type cmd in the start menu search bar and right click on it and click Run as Administrator to open up an elevated command prompt.

Type NET STOP WUASERV then enter
REGSVR32 %WINDIR%\SYSTEM32\WUPS2.DLL then enter
NET START WUASERV then enter

Reboot

Sollution2

It stems from corrupted dll files mainly WUAUCLT1.DLL, WUAUENG1.DLL, WUAUSERV.DLL, CDM.DLL, WUAPI.DLL,WUPS.DLL,WUCLTUI.DLL, AND IUENGINE.DLL

Try replacing them from a vista computer that works properly

Please don't forget to leave your feedback on this post.

Tuesday, July 28, 2009

Setting up a Network

Checking IP Address Details

#ifconfig

This will define the IP address of one interface. If the PC has two NICs, then it could have two IPs. The Networl configuration file could be found in

#cd /etc/sysconfig/network-scripts

In this there are several files. "ifcfg-eth0" contains the Network Card information. The file looks as follows.

DEVICE = eth0 [This is the first NIC interface]
BOOTPROTO = [dhcp OR static ---> If it is DHCP the card will listen to a DHCP Server]
HWADDR = 00:06:5B:22:FS:8E [MAC Address]
ONBOOT = yes [For the Network to load at boot-up]
TYPE = Ethernet

To add a IP Address change the file as

BOOTPROTO = static
and add
IPADDR = 192.168.190.1[The IP you wish to assign]

Optionally you could perform the same thing by

#netconfig

OR

#ifconfig 192.168.190.1/24

After completing the Network Services should be restarted.

#service network restart

Once again if you check out the IP address you may see

#ifconfig

'etho' will have an IP Address
'l0' is for the Loop Back IP


Now you Computer has been set up for the network. Try to 'ping' another PC on the WORKGROUP. It should work.

Good Luck....!

Saturday, July 18, 2009

Accessing NTFS Partitions from RHEL 4

By default RHEL 4 kernel supports READ and WRITE access for FAT partitions, while it does not does not support NTFS read or write access. So we have to upgrade the kernel by down loading and installing necessary kernel modules to the Linux System. It could be downloaded through http://www.linux-ntfs.org

For this you should first find the current Kernel version of your Linux Installation.
#uname -r [ENTER]

To see the Processor version
#uname -p [ENTER]

Now install the Downloaded package
#rpm -ihv kernel-ntfs-2.4.18-14.i686.rpm [ENTER]

Now you have to load the installed modules to the running kernel.
#modprobe ntfs [ENTER]

To create a mount point
# mkdir /media/Windows

Automatically mounting the Microsoft partitions when the System starts up.

To this you should edit a system file called 'fstab'. Find it and open it with 'vi'. In it we should and a new entry

/dev/hda1[tab][tab]/media/Windows[tab]ntfs[tab]defaults[tab]0[space]0

Save and EXIT.

Now mount the Partitions.
#mount /media/Windows

Wednesday, June 10, 2009

Purpose of Libraries in Linux

/bin
Binaries or executable files which are common Linux user commands.

/boot
Here you find potable files, boot loader and a compressed copy of the Linux Kernel.

/dev
This contains device drivers.

/etc
This contains administrative and system configuration files.

/home
This contains the home folder of normal Linux Users.

/initrd
The initial RPM drive location. Do not any data or delete this.

/lib
This contains all libraries, applications, extensions needed to run Linux executable.

/media
This contains mount points to access removable storage devices.

/opt
This contains optional S/W s. The location to install platform independent S/W s.

/proc

Running Linux Processors and current system information. When the system is shut down it automatically gets erased.

/root
The Privileged user's home folder
  • root - Super User
  • / - Top of the File System
  • /root - Super Users Home Folder
/sbin
This contains administrative commands and files related to services.

/usr
This contains platform dependent applications

/var
This contains dynamic data related to Linux applications. Automatic updates, without the knowledge of the user.

Set up RedHat Version 4 From Scratch


Partitioning The Hard Drive

To install Linux you should have a minimum of 2 partitions. But as an optional you could also have 3 or more partitions.
  • swap - Essential Partition This is like the Virtual Memory on Windows.
  • root ('/') - Essential Partition This is where all the other partitions will list. This the most top of the USER file system(Linux has an Universal File System, not like Windows).
  • boot ('/boot') - Optional Partition This will store the files which are needed for the OS to boot up in a separate partition.
Linux has an Universal Directory hierarchy and Windows has a Tree Directory hierarchy.