Publish time 2014-1-18 11:39:09

[2014.01.31] Using VMware Workstation to Install Linux System in Windows Platform and Repair the Files by Par2 (Update)

VMawre workstation (VW) is a very good softeware to simulate most kinds of operate system, but  building the ubuntu with the new version kernel by the new version VW still has some problems.
So, I suggest people install the old version VW(9) and install the old version ubntu linux (10.04) to avoid the compatibility problem.
These are two quistion we need to solve, one is the memory question, if we use VM's shared folder function to execute/deal with  the local windows files, the memory(cache) will consume very fast.
So, I suggest guys want to do any runtime operate the local files 150GB need have more than 12GB memory in your physical local computer.  
Why will you need deal with 150GB files? That is because the volume of most of the item I use to create rapair file by par2 is about 100~150GB, and before the repaire action start to work it must scan all the item files and repair blocks, people need prepare enough memory.

Or, I suggest people can build a ftp server inlocal machine na install a ftp client to linux, then people can copy the files from windows to the vm.
I had tested this for a few days. It really can decreae the memory consume and decrease the risk.
Because the resource is shared by local os and vm, the effectivity of par2 working is not good, if something wrong is happened like the resource is lower ( memory is not enough), the vm may broke down.
So, if people can copy file in the vm first, we will easy to deal the resource problem at least. I suggest guys copy the file in vmm then we do another step to repair the damaged file.

Step 1 : Download the VMware Workstation 9
Because of the VMware official hompage doesn't provide the old version (9) VW, people can get the software form this blog, the blog provide the refer serial number, too.

**** Hidden Message *****

It is easy to download and install the software, I ignore to describe these detail steps.
If the blog file is dead, download it by below link, if any complaint from offcial, I will take off this link.

(VMware-workstation-full-9.0.0)
https://mega.co.nz/#!aoBCGAYQ!geQK6useY0BmObXz-_gheA1olQbbXZiKTmKtv_qRh8I

Step 2 : Download Ubuntu 10.4 Server
I prepare the x64 version iso file, if people need the x86 version, please find it in the official download link.
Although we download the server version, we still install the desktop environment.
Why I installing the server version, it is just because my habit and I don't need like search the ternminal to key command to do the port mapping(Step4).
If you don't want to prepare the  dektop environment(step ) , you can install the ubuntu desktop 10.04, plese see the step6

Step 3 : Install the Linux System
Press the below buttom to install the os
http://blessing.bdmv.info/tutorial/vmware003.png

I ignore to show the detail by pictures, too.But I provide the key word and some key points to everyone.T

New Virtual Machine --> Custom(Advanced) --> Workstation 9.0 --> Installer disc image file (iso)(You can select server iso or desktop iso file to install os)
--> Fill the login information for VW --> Select the installing location of the vm and the name --> The number of processor (select 1)-->
Memory size ( large than 1024MB) --> Network type is NAT --> I/O Type is LSI Logic --> Create a new virtual disk --> Virtual disk type is SCSI
-->Disk size = 150GB(refer the below explanation of the key points). The selection of allocating all disk space now is good, but it take much time.
And, select the store  virtual disk as a single file --> XXXXXX.vmdk(Next) --> Finish

The memory size need large than 1GB and pay attention that the runtime repair the files consume more than 8GB memory and it is not limited by the VW setting.
If the memory size is not large enough, the vm will dead after no any cache can use to process the copy and repair files.
And I suggest only using single processor is stable.
The network tyte select NAT, we can connect the vm by doing port mapping to another host(windows) port .
The disk size is the most important key point, bigger the better.
I hope guys can accept to reapir files after copying files to vm, and the hard disk size need more than 150GB volume
If you want to do the runtime repair, you can allocate only 20GB hard disk.

http://blessing.bdmv.info/tutorial/vmware004.png

Step 4 : Port Mapping

If you finish to install the ubuntu server, you can see the terminal and you can login the linux by vaware ui.
http://blessing.bdmv.info/tutorial/vmware005.png

But that is'nt good enough to me, because of I install this virtual machine in remote server and people can through putty to set commanline.
Thorugh putty can only consume a few resoure, people don't need to be must type command in vmware ui by RDP/teaviewer(GUI).

So, after I build the virtual machine, I need to set the NAT port mappinmg from linux ssh port to windows another specified port, then I can type commandline in local computer.
If people build the virtual machine at local computer and you don't like type command by putty, you can skip the port mapping steps and go to step6.
But, if you don't do this port mapping, the outside internet can't connect your vm. please know it.

First, enter the vm and check the class c of internal ip.
http://blessing.bdmv.info/tutorial/vmware006.png

And you can double confirmed that the virtual network name in tab edit - > virtual network editor.
http://blessing.bdmv.info/tutorial/vmware007.png

Second, edit the NAT Setting and add a new rule to do port mapping and double click the ok button.
http://blessing.bdmv.info/tutorial/vmware008.png

Not yet, go to the Windows Firewall ( in Control Pannel) to open the specified port or you still can access the virtual machine.
http://blessing.bdmv.info/tutorial/vmware009.png

http://blessing.bdmv.info/tutorial/vmware010.png

Step 5 : Install the ssh ( putty connent liunx by ssh)
People need enable the ssh service, type the command in vmware ui to checkps aux | grep sshIf the sshd doesn't active, people need to install sshd by yourselfsudo apt-get update
sudo apt-get - y install openssh-server
sudo /etc/init.d/ssh restart
http://blessing.bdmv.info/tutorial/vmware011.png
Of course, you can restart the virtual machine is better and  people can use putty to set commandline at local computer.sudo shudown -r now

People can download the putty in this hompage. If you want to get more information about putty, please search it by google.

Step 6 : Install the vm-tools

If you install the ubuntu 10.04 server, the vm-tools may install automatically.
Actually, we may not need the vm-tools. The vm-tools can let usr communicate with the host(windows) files by
The virtual machine --> settings --> options --> shared folders
http://blessing.bdmv.info/tutorial/vmware017.png

Installing the vm-tools can let the shared folders directly show in the /mnt/hgfs location, but all the linux procedure deal with the shared folder will consume much memory.

Because of I suggest people do anything after downloading the files from host, the vm-tools seems not important
But, if you want to do the runtime repair of the damaged files by par2, you need install the vm-tools.
After install the vm-tools and select the shared folder, you must see the folder in your linux  system /mnt/hgfs/.
if you don't see anything, you may make the mistakes of installing vm-tools or forget share the folder to your vm (see above).

How to install the vm-tool and munt the shared partition/folders into your vm, please see below steps.
First, go to tab VM -> Reinstall VMware Tools... then Vmawre will provide a Help file to help you install some software into your virtual linux system.
http://blessing.bdmv.info/tutorial/vmware013.png
http://blessing.bdmv.info/tutorial/vmware014.png
http://blessing.bdmv.info/tutorial/vmware015.png

Second, open the putty, below steps will be done by commandline, so people should not to be connect to RDP or teamviewer,
(Pay attention, if you install the uubntu desktop, the vm-tool maybe change the location to /media/VMware Tools and you need change the location to copy files )

of course, if you build the virtual machine in local computer, that is no different speed of using vmware ui or putty to set the commandline.

Standard steps:
sudo mkdir /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
mkdir ~/temp
sudo cp -a VMwareTools-*r.gz ~/temp/
cd ~/temp
tar xzvf VMware*.gz
cd vmware* && ls
ubuntu desktop(?):
cd /media/'VMware Tools'
mkdir ~/temp
sudo cp -a VMwareTools-*r.gz ~/temp/
cd ~/temp
tar xzvf VMware*.gz
cd vmware* && lsBTW,Below link is the ubuntu 10.04 desktop, if anyone need it, you can download what you want to download.
(ubuntu-10.04.4-desktop-amd64)
https://mega.co.nz/#!SlJWSDqT!6kKZYCVO1KX_OehfeCeUY9AUFpqZPgftmfeLgV9ETv0

After you type above commands, you can get some files and folders from cdrom into new making temp folderbin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.plIn HELP guide tell people should unmount the cdrom, because people don't add the mount command into initial script, I think you should not too care about the unmount step.

Before next step, I suggest people pre-install some important software like gcc...etcsudo apt-get install build-essential pkg-config libsigc++-2.0-dev libncurses5-dev lighttpd nano screen subversion libterm-readline-gnu-perl php5-cgi

Second, type a command to finish the steps installing all the tool in the linux.sudo ./vmware-install.plWhen linux run the script, it could ask some question, guys can always chick your keyboard enter.

Step 6.1 : Install Ubuntu 12.04 Server in VMware Workstation 10 and Install the vm-tools (People Can Skip This Step)
If you want to try the ubuntu 12.04 and install the vm-tools, you need change to install Vmware workstation 10 and the vm-tool can't work fine in linux 3.8 kernel
But, if you don't transfer files by the shared folder(pay attention, actually, copy the files from shared folder seems ok, but execute par2 to shared folder's files is not work fine) I think it is no problem to use 12.04 or later version.
If you hope install the vm-tools and copy files form host by vm-tool (consume much of your computer resource), please refer the below introduction.
Register a free account and download the workstation first, then install it in winddows platform.
http://blessing.bdmv.info/tutorial/vmware001.png

People can easy find the serial number of vmware workstation in internet, please use any SN what you like .

Go to ubuntu offical website download the file - "ubuntu-12.04.3-server-amd64.iso", then you can install the linux in your windows by vmware worlstaion.
http://blessing.bdmv.info/tutorial/vmware002.png

I also provide the iso files of VW10 and ubuntu12.04 iso, if any offical staff ask me to delete the files, I will remove the files asap.
(VMware-workstation-full-10.0.1-1379776)
https://mega.co.nz/#!qpQSzSAb!2_nwxRgKG-v5YqjmKF2onQO5XwPNKigVxQK4jzMa1f8
(ubuntu-12.04.3-server-amd64)
https://mega.co.nz/#!7hxyRaBI!fHp7bNJBOwEuwSTnPgNR7Gdq68CZLWyxVEUtbGPRRmI

I don't descript the installing process step and step, people can find many tutorials in internet, or you can build the virtual machine by vmware step by step by yourself. That is really very easy.

Skip the above steps to introduct how to  install the vm and most the steps of installing the vm-tools are the same as the step of installs the ubuntu 10.04
http://blessing.bdmv.info/tutorial/vmware013.png

sudo mkdir /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
mkdir ~/temp
sudo cp -a VMwareTools-*r.gz ~/temp/
cd ~/temp
tar xzvf VMware*.gz
cd vmware* && ls
cd /lib/modules/$(uname -r)/build/include/linux
sudo ln -s ../generated/uapi/linux/version.h

After you type above commands, you can get some files and folders from cdrom into new making temp folderbin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.plIn HELP guide tell people should unmount the cdrom, because people don't add the mount command into initial script, I think you should not too care about the unmount step.

Before next step, I suggest people pre-install some important software like gcc...etcsudo apt-get install build-essential pkg-config libsigc++-2.0-dev libncurses5-dev lighttpd nano screen subversion libterm-readline-gnu-perl php5-cgi

Second, type a command to finish the steps installing all the tool in the linux.sudo ./vmware-install.pl
http://blessing.bdmv.info/tutorial/vmware016.png

Thired, edit the shared folders into Virtual Machine Settings.
http://blessing.bdmv.info/tutorial/vmware017.png

Then, people can find the files in the windows partition can share to linux system (/mnt/hgfs/) and you can edit the files by linux, that is the result we want to see.
http://blessing.bdmv.info/tutorial/vmware018.png

Step 7 : Prepare the Desktop Environment in Ubuntu server

sudo apt-get update
sudo apt-get -y install ubuntu-dsktop
After install th desktop, you must build a ftp server in your host(windoews), I suggest you install the filezilla server. It is easy to build a standard ftp server
Guys can download the software form the official homepage.
After install the software, you just edit and add a few setting of filezilla ftp server, then your vm can download the specified item files from your host.

Add the login account information and the share the folder location
http://blessing.bdmv.info/tutorial/vmware020.png

Edit the ftp server port (default port number is 21)
http://blessing.bdmv.info/tutorial/vmware021.png

Because of host transfer the files to vm by the local area network, people can skip the above firewall setting of por mapping.
Install the ftp client in vm, then you can download files by host ftp server

About the installation of ftp client, we still install filezilla ftp client, you can download and install the software by ppa.
sudo add-apt-repository ppa:yofel/ppa
sudo apt-get update; sudo apt-get install filezillahttp://blessing.bdmv.info/tutorial/vmware022.png

http://blessing.bdmv.info/tutorial/vmware023.png

Step 8 : Install the x2go Server (Selection)
If your host is the remote server, I suggest you can install the x2go server, is is the same as putty, they car connect with linux by ssh, too.
Please refer another tutorial to install x2go server, please pay attention that the steps of installation of ubuntu 10.04 or 12.04 are different.

Final step, We Install the par2 and Tset This Packet in VM.
I select a test item - ImageProcess.H53.r5d1fin.rr3.200-End, the file name mean that this rar archived item is H53 and the par2 is created for the volume 200 to the volume End.
In this example the par2 files can repair 12 damaged block numbers and I delete one file (the volume 202) intentionally to let par2 scan these files.
Please refer the  below test result.

Because I don't allocate a signle physical hard disk to the virtual machine, the performance is not good enough.
The host and vm share the hd I/O in the same time, the performance is worse.
But that is not the most important point, if the files can be repaird by par2 successfully, it is was worthwhile to take a long time to repair the damage files.

Btw, maybe someone think par2 can work into windows, too. I try to fix file by quickpar or par2.exe by windows's cmd and I find the successful rate is very bad.
If anyone get files from the links I share, I hpoe  guys shoud prepare a linux environment to fix the damage files.
Most of item I upload had builded 5%~15% par2 files to let people to reapir the damaged volumes, so I hope everyone can install a virtual machine linux system for a useful backup os.

Istall the par2 apcket and repire the damaged files by par2
sudo apt-get install par2
cd ~/test
par2 r ImageProcess.H53.r5d1fin.rr3.200-End.par2After finish the repair, copy the healthy files to host by ftp, then people can decompress these correct volumes by rar or 7-zip.

http://blessing.bdmv.info/tutorial/vmware024.png

------------------------------reference------------------------------

http://nxlhero.blog.51cto.com/962631/742140
http://wayneifo.blogspot.tw/2010/12/ubuntu-linuxssh.html
http://stackoverflow.com/questions/18804819/installing-vmware-tools-location-of-gcc-binary
http://benohead.com/vmware-the-path-usrbingcc-is-not-valid-path-to-the-gcc-binary/
http://superuser.com/questions/192047/gcc-path-not-valid-when-installing-vmware-tools-from-vmware-workstation-7-1-1-bu
http://stackoverflow.com/questions/18805697/installing-vmware-tools-not-recognizing-path-to-3-8-0-19-generic-kernel-files
http://blog.csdn.net/cnclenovo/article/details/17300975
http://hi.baidu.com/ghostviper/item/cd9c96e57f61d3a7cf2d4fb9











Pages: [1]
View full version: [2014.01.31] Using VMware Workstation to Install Linux System in Windows Platform and Repair the Files by Par2 (Update)