varazir / mkesxiaio

Automatically exported from code.google.com/p/mkesxiaio
1 stars 0 forks source link

number of sectors can not be calculated correctly in func_dd_end() #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Copy mkesxiaio_4.1.sh and my ISO file 
(VMWARE.VSPHERE.V4.1-MAGNiTUDE-DISK1.iso) and oem.tar.gz into a same directory

2.  Run the script 

3.  After skipping some downloadable content (ssh/sftp/wget etc),  a failure 
happened:

+ cd /mnt/hgfs/share/esx-build/
+ dd_file=(*.bz2)
+ func_text_green 'bunzip2 *.bz2 '
+ printf '\e[01;32mbunzip2 *.bz2 \e[00m'
bunzip2 *.bz2 + bunzip2 '*.bz2'
bunzip2: Can't open input file *.bz2: No such file or directory.

It seems some bzip files haven't been generated as expected.

4. Then the script runs into function func_dd_end(), another issue happened and 
finally lead to the recycling step (Removing working folders (esx-*) )

+ func_dd_end
+ [[ 4.1 == \4\.\1 ]]
+ cd /mnt/hgfs/share/esx-build/
+ dd_file=(*dd)
+ local sector
+ local number
++ awk -v pat=bytes '$0 ~ pat {print $9}'
++ fdisk -ul '*dd'
+ sector=  
+ [[ -z '' ]]
+ sector=512
++ awk '/dd5/ {print $2}'
++ fdisk -ul '*dd'
+ number=
+ func_text_green 'Mounting *dd to /mnt/hgfs/share/esx-5'
+ printf '\e[01;32mMounting *dd to /mnt/hgfs/share/esx-5\e[00m'
Mounting *dd to /mnt/hgfs/share/esx-5./mkesxiaio_4.1.sh: line 1388: 512*: 
语法出错:此处需要运算符 (error token is "*")

The problem is the 'number' is not calculated correctly.

I am not sure the two issues are connected.

What is the expected output? What do you see instead?

I expect the script to work on my env (Ubuntu 10.04)

What version of the product are you using? On what operating system?
ESX Server 4.1
The script is run under Ubuntu 10.04

Please provide any additional information below.
I run the script in debug mode and get some output, hope it's clear enough to 
clarify the problem. Please refer to the attachment. Thanks.

Original issue reported on code.google.com by Streamin...@gmail.com on 31 Jan 2011 at 3:43

Attachments:

GoogleCodeExporter commented 9 years ago
i can confirm exactly the same problem with the same image. also tried with the 
ESXi 4.1u and i have the same line 1388: 512*.

Original comment by nocountr...@gmail.com on 14 Mar 2011 at 9:31

GoogleCodeExporter commented 9 years ago
OS i use is fedora 14 32 bit

Original comment by nocountr...@gmail.com on 14 Mar 2011 at 9:47

GoogleCodeExporter commented 9 years ago
Solution to that is on to change 

On line 1377 change -ul to -u -l
same on line 1383

There is a new version if you like to test it 
http://code.google.com/p/mkesxiaio/source/browse/new/mkesxiaio.sh

Original comment by daniel.s...@gmail.com on 23 Mar 2011 at 4:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Solution us the 4.1 update image from VMware page. I do not support any other 
iso 

Original comment by daniel.s...@gmail.com on 2 Apr 2011 at 12:13

GoogleCodeExporter commented 9 years ago
I'm having this same problem running mkesxiaio_4.2sh

./mkesxiaio_4.2.sh: line 1394: 512*: syntax error: operand expected (error 
token is "*")

I'm running centOS 5.2

tried using both 
VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso
VMware-VMvisor-Installer-4.1.0-260247.x86_64.iso 

Both downloaded direct from VMWare

Original comment by mkoza...@gmail.com on 7 Apr 2011 at 6:37

GoogleCodeExporter commented 9 years ago
same problem CentoS 5 and 
VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso

Original comment by lotohov....@gmail.com on 5 May 2011 at 3:33

GoogleCodeExporter commented 9 years ago
Langue of OS ? 

Original comment by daniel.s...@gmail.com on 5 May 2011 at 3:37

GoogleCodeExporter commented 9 years ago
greets daniel. i have a centos with english locale
now i downloading fresh VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso
if u need additional info im gladly help you.

Original comment by lotohov....@gmail.com on 5 May 2011 at 5:11

GoogleCodeExporter commented 9 years ago
Som times I hate Linux, I guess the flags fdisk -u -l doesn't work the same as 
in ubuntu and fedora. 

Problem is that you need to extract the dd image and run fdisk -u -l 

Original comment by daniel.s...@gmail.com on 5 May 2011 at 5:48

GoogleCodeExporter commented 9 years ago
im so bad looked again and see utf8-ru my charset .. my fault :(
but problem still here Can't open input file *.bz2: No such file or directory.
i try export LANG=US but than not helps .. 

Original comment by lotohov....@gmail.com on 5 May 2011 at 9:14

GoogleCodeExporter commented 9 years ago
I just tried CentOS 5.6 live CD English 
VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso worked 

Original comment by daniel.s...@gmail.com on 6 May 2011 at 8:54

GoogleCodeExporter commented 9 years ago

Original comment by daniel.s...@gmail.com on 9 May 2011 at 9:16

GoogleCodeExporter commented 9 years ago
i forgot to say thank you very mach ) all done english solves my problem )

Original comment by lotohov....@gmail.com on 15 May 2011 at 8:25