How to create a bootable usb to install Windows X

Firstly, insert your USB  (WARNING: the following steps will erase ALL DATA on selected USB!!).

Open a cmd prompt and type “diskpart” to start the partitioning program:

[bash]list disk # <– to list the disks on the system

# Disk ### Status Size Free Dyn Gpt
# ——– ————- ——- ——- — —
# Disk 0 Online 931 GB 3072 KB
# Disk 1 Online 1944 MB 0 B
# Disk 2 Online 7498 MB 0 B <– this will be our selected disk

select disk 2

# Disk 2 is now the selected disk.

clean

# DiskPart succeeded in cleaning the disk.

create primary partition

# DiskPart succeeded in creating the specified partition.

select partition 1

# Partition 1 is now the selected partition.

active # <– make the partition active

# DiskPart marked the current partition as active.

format fs=ntfs quick

assign # <– assign a letter to the drive

# DiskPart successfully assigned the drive letter or mount point.[/bash]

Your drive is now ready to copy a loaded iso DVD of your version of Windows.

 

How to expand, shrink or do other disk operations in VMware from cmd

In most cases to utilise your vm-disk it needs to be dynamic. So if you have preallocated space for your disk then convert it to a dynamic one.

[bash]# make the vm-disk from pre-alloc. to dynamic (-t 0 = dynam. single file)
vmware-vdiskmanager -r sourceDisk.vmdk -t 0 targetDisk.vmdk

# expand the size of a vm-disk
vmware-vdiskmanager -x 40GB myDisk.vmdk

# shrink a vm-disk
vmware-vdiskmanager -k myDisk.vmdk

#You can also rename a vm-disk once you have removed from VMware library
vmware-vdiskmanager -n myDisk.vmdk myNewDisk.vmdk[/bash]

In some cases you might not be able to shrink it, then it is best to use VMware Converter which does the job fine by selecting the partition/volume holding the system and ommit the secondary “larger” partition wich you should have previously repartitioned i.e. PartitionMagic and left only the useful part of the drive.

Useful Linux/Dos Commands

Navigation:
[bash]cd /usr/local/i-net\ crystal-clear #use \ (backslash) to replace space in path

ls #list dirs/files of current path, normal column-view
dir #dos
dir /q /a:r|h|s #to list dirs and files with attributes and owners
dir /-n #to list dirs and files with their short 8.3 names
dir /x #to list dirs and files with short 8.3 names and long names

ls -x #to list dirs/files wide-view
dir /w #dos

history #lists the recently executed commands by logged in user
!! #executes the last command that was executed
!985 #executes the command numbered 985
!ls #executes the command stringed ‘ls’

find . -name data*.xml #find all matches within current dir and below

cp /source/file /dest/path/ #copy source file to dest-path
copy c:\source\file c:\dest\path #dos

cp -r #copy source to destination, including directories
copy /r #dos

cp -rT /source/path  /dest/new-path
#copy source to newly destination (create) including contents

rm -Rf * #delete all in current dir (R = recursive, f = force)[/bash]

Network:
[bash]./ifconfig #command to display interface devices info
ipconfig #dos
/sbin/ifconfig #RedHat or CENTOS command

./ifconfig eth0 192.168.0.10  #command to set eth0 with new ip address

wget ftp://url_Link #url file retriever, i.e. non-interactive download from ftp link[/bash]

Executable/Archive:
[bash]rpm -ivh ./nameOfFile.rpm #executes an executable file, i=install, v=verbose, h=show descriptions while install

cpio -idv < nameOfArchive.cpio #extract a cpio archive file into current dir
ls | cpio -ov > nameOfArchive.cpio #pack listed files into a cpio archive

unzip ./source.zip -d ./destDir #extract the file source.zip from current dir to the destDir in current dir

tar -zxvf ./source.tar.gz #will do in current dir
tar -C /myfolder -zxvf source.tar #will extract to myfolder dir

java -jar setup.jar #execute a jar file using java

lsof -wni tcp:9000 #show the process using port 9000[/bash]

System:
[bash]uname -a #outputs the ‘system info’
ps -A #show all processes running on system
kill -9 22017 #kill a process with PID=22017[/bash]

Multi-Commands:
Send a command to the background: add ” &” to end of each/the command
Send a command to the background, but wait for previous to complete: add ” &&” to end of each/the command
Separate command sequences: add ” ;” between the commands