Tag Archives: windows

How to mount remote windows partition / windows share under Linux ?

NAME

mount.cifs – mount using the Common Internet File System (CIFS)

SYNOPSIS

mount.cifs {service} {mount-point} [-ooptions]

DESCRIPTION

This tool is part of the samba(7) suite.

mount.cifs  mounts  a Linux CIFS filesystem. It is usually invoked indirectly by the mount(8) command when using the “-t cifs” option.

This command only works in Linux, and the kernel must support the cifs filesystem. The CIFS protocol is the successor to the SMB  pro-tocol and is supported by most Windows servers and many other commercial servers and Network Attached Storage appliances as well as by the popular Open Source server Samba.

The mount.cifs utility attaches the UNC name (exported network resource) to the local directory mount-point. It is possible to set the mode for mount.cifs to setuid root to allow non-root users to mount shares to directories for which they have write permission.

Options  to  mount.cifs  are  specified  as a comma-separated list of key=value pairs. It is possible to send options other than those listed here, assuming that the cifs filesystem kernel module (cifs.ko) supports them. Unrecognized cifs mount options  passed  to  the cifs vfs kernel code will be logged to the kernel log.

mount.cifs causes the cifs vfs to launch a thread named cifsd. After mounting it keeps running until the mounted resource is unmounted (usually via the umount utility).

Usage :

# mount -t cifs //10.xx.5x.1xx/ABC  /win-mount -o user=sgd.shd,domain=sfgmain

Password:

 

1) Make sure you have following information:
==> Windows username and password to access share name
==> Sharename (such as //server/share) or IP address
==> root level access on Linux

2) Login to Linux as a root user (or use su command)

3) Create the required mount point:
# mkdir -p /win-mount
4) Use the mount command as follows:
# mount -t cifs //Windows-server/download -o username=sdff,password=myPassword /win-mount

Use following command if you are using Old version such as RHEL <=4 or Debian <= 3:
# mount -t smbfs -o username=sdff,password=dscfews //Windows-server/download /win-mount

5) Access Windows 2003/2000/NT share using cd and ls command:
# cd /win-mount; ls -l

Where,

  • -t smbfs : File system type to be mount (outdated, use cifs)
  • -t cifs : File system type to be mount
  • -o : are options passed to mount command, in this example I had passed two options. First argument is password (sdff) and second argument is password to connect remote windows box
  • //Windows-server/download : Windows 2000/NT share name
  • /win-mount Linux mount point (to access share after mounting)

Windows: How to Change Internet Explorer View Source Editor (i.e. Notepad)

Whenever you open the source of any webpage in Internet Explorer, it opens the source code with Notepad but format is not viewed in notepad. So, I will let you know how to do it:-
1. Copy and paste the following code in Notepad:-

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerView Source EditorEditor Name]
@=”wordpad.exe”

2. Replace “wordpad.exe” in the code to the location of your editor with double slashes.
3. In notepad click on File-> Save as… and save the file with any name and the extension .REG. eg. “test.reg”
4. Now double-click on the file you have saved and click on Yes.

Note: Your default source editor in Internet Explorer will be changed to wordpad.

Windows 2003 GPT disk layout

Microsoft Windows 2003 introduced a new type of disk layout called GUID Partition Table (GPT) disks. This layout is designed to overcome some problems and deficiencies associated with the traditional master boot record (MBR) style disks. The advantages of GPT disks include:

  • Partition size that can be up to 18 exabytes.
  • A GPT disk can contain up to 128 partitions.
  • Integrity of primary and backup partition tables that allows redundancy.
  • Partition format that is well defined, fully self-identifying and accommodates future expansion with version number and size fields.
  • Unique ID for each partition that prevents partition identifier collision.

Initially, only the IA64 (Itanium) version of Windows 2003 supported GPT disks. An IA64 system cannot boot unless the boot disk is a GPT disk. With Service Pack 1, support was added to 32-bit versions of Windows 2003, but a GPT disk is still not supported as the boot disk.

Note: The next version of Windows (currently called Longhorn or Vista) is planned to have boot-from-GPT support for 32-bit processors.

The only way to create a basic GPT disk is to convert an existing empty MBR disk. There can be no partitions or data on the disk. The Microsoft tools to convert the disk will not function if there are existing partitions.
Once you have created a GPT disk, the layout is as follows: