Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1312981
  • 博文数量: 107
  • 博客积分: 10155
  • 博客等级: 上将
  • 技术积分: 2166
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-25 16:57
文章分类

全部博文(107)

文章存档

2010年(1)

2009年(1)

2008年(105)

分类: LINUX

2008-09-02 17:55:23

我是无名小卒,希望转载的朋友注明出处,谢谢。因为升级安装4.4QT,导致原来硬盘空间不足了,未能完成安装,所以想另加一块硬盘因为扩展虚拟硬盘的容量太复杂不如添加一块虚拟硬盘来的快,结果添加过程中不能添加ide硬盘,只能是默认的scsi硬盘,但是据说linux的scsi的大小只能限定在1G,这个容量是不能接受的,所以起初认为是vmware的版本太低导致的,升级到了6.02和6.04,导致重装了vmware tools,导致以前的fstab被改写了,找不到以前挂载的硬盘了,我这是第三块添加的了,可能有点多的样子,总算版本停留在了6.04,总算把vmware tools重装完了,又挂载了前二个硬盘,启动也完成了,再新添加硬盘,问题仍旧,后来试了一下在新添加硬盘时只能选择scsi的情况下选择independent(独立)及persistant(永久性),才能命名为不是0:0的号,因为scsi:0:0与原来的系统ide:0:0冲突导致不能起动,所以我选择以上操作,如果不执行上面的修改0:0号为其他号例如1:3,我的虚拟机就崩溃了,如果修改其他号不修改independent(上面的),就无法保存新修改的号码。我试了多遍总结而来的,按理说这些都做完了,应该系统正常启动,却发现启动虚拟机时出现了:Unable to allocate PCI Ethernet controller. Too many PCI devices already configured. 这种错误,查网上没有答案。然后自己打开虚拟机的文件也就是*。vmx文件,用记事本打开,看到最后有很多添加新的scsi过程的代码:
 
config.version = "8"
virtualHW.version = "4"
scsi0.present = "TRUE"
memsize = "256"
MemAllowAutoScaleDown = "FALSE"
ide0:0.present = "TRUE"
ide0:0.fileName = "Other Linux 2.6.x kernel-000004.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "C:\Program Files\VMware\VMware Workstation\linux.iso"
ide1:0.deviceType = "cdrom-image"
floppy0.present = "FALSE"
ethernet0.present = "TRUE"
usb.present = "TRUE"
sound.present = "TRUE"
sound.virtualDev = "es1371"
sound.fileName = "-1"
sound.autodetect = "TRUE"
displayName = "centos5"
guestOS = "other26xlinux"
nvram = "Other Linux 2.6.x kernel.nvram"
ide0:0.redo = ""
ethernet0.addressType = "generated"
uuid.location = "56 4d f7 e6 02 8b 0b 76-24 65 17 45 8a d4 7d 46"
uuid.bios = "56 4d f7 e6 02 8b 0b 76-24 65 17 45 8a d4 7d 46"
tools.remindInstall = "FALSE"
ethernet0.generatedAddress = "00:0c:29:d4:7d:46"
ethernet0.generatedAddressOffset = "0"
ethernet0.connectionType = "custom"
ethernet0.vnet = "VMnet0"
ethernet1.present = "TRUE"
ethernet1.connectionType = "custom"
ethernet1.vnet = "VMnet2"
ide1:0.startConnected = "FALSE"
ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:d4:7d:50"
ethernet1.generatedAddressOffset = "10"
isolation.tools.hgfs.disable = "FALSE"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "manual"
extendedConfigFile = "Other Linux 2.6.x kernel.vmxf"
sharedFolder.option = "alwaysEnabled"
sharedFolder.maxNum = "1"
tools.syncTime = "FALSE"
sharedFolder0.present = "TRUE"
sharedFolder0.enabled = "TRUE"
sharedFolder0.readAccess = "TRUE"
sharedFolder0.writeAccess = "TRUE"
sharedFolder0.hostPath = "E:\linux\arm"
sharedFolder0.guestName = "shared"
sharedFolder0.expiration = "never"
ide0:1.present = "TRUE"
ide0:1.fileName = "Other Linux 2.6.x kernel-2-000004.vmdk"
ide0:1.redo = ""
checkpoint.vmState = ""
ide1:1.present = "TRUE"
ide1:1.fileName = "Other Linux 2.6.x kernel-0-000004.vmdk"
ide1:1.redo = ""
checkpoint.vmState.readOnly = "FALSE"

 
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1:2.present = "FALSE"
scsi1:2.fileName = "D:\qt\qt.vmdk"
scsi1:2.mode = "undoable"
scsi0:2.present = "FALSE"
scsi0:2.fileName = "D:\qt\qt.vmdk"
scsi0:2.mode = "undoable"
scsi0:0.present = "FALSE"
scsi0:0.fileName = "D:\qt\qt.vmdk"
scsi0:0.mode = "persistent"
scsi3.present = "TRUE"
scsi3.virtualDev = "lsilogic"
scsi3:11.present = "FALSE"
scsi3:11.fileName = "D:\qt\qt.vmdk"
scsi3:11.mode = "undoable"
scsi3:11.redo = ""
scsi2.present = "TRUE"
scsi2.virtualDev = "lsilogic"
scsi2:0.present = "FALSE"
scsi2:0.fileName = "D:\qt\qt.vmdk"
scsi2:0.mode = "independent-persistent"
scsi3:0.present = "FALSE"
scsi3:0.fileName = "D:\qt\qt.vmdk"
scsi3:0.mode = "undoable"
scsi1:3.present = "FALSE"
scsi1:3.fileName = "D:\qt\qt.vmdk"
scsi1:3.mode = "independent-persistent"
scsi1:3.redo = ""
scsi2:0.redo = ""
 
红色部分就是出错的原因,把红色部分删除,恢复原状,可惜没有解决增加新硬盘的问题,有朋友说另建一个虚拟机建立一个新的ide硬盘,然后挂载过来,我试了,可是问题是我的原来虚拟机是从5.5版本升级过来的,6.04不让挂载,能想的都想了,能办的都办了,问题虽然没有解决,但是总结一个结论:总是需要时方恨当初的选择错误,呵呵,当初要是多设立硬盘大一些就不会出这样的问题了。我是无名小卒,希望转载的朋友注明出处。世上没有后悔药,接着再试,还是用原来的方法添加硬盘不能修改为ide就使用默认的scsi,然后在添加过程中一定要选择independent(独立)及persistant(永久性),并在advance中修改为scsi:2:0或其他不是0:0的号,然后保存,再次重启系统成功启动了,回忆一下上面的错误原因,估计是我在试验scsi硬盘过程中导致了重复错误,现在删除了配置文件中的错误代码,问题骤解,所以能够顺利添加成功并启动顺利,系统启动后下面操作
 
 
 

[root@localhost6 ~]# fdisk -l
Disk /dev/hda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         993     7976241   83  Linux
/dev/hda2             994        1044      409657+  82  Linux swap / Solaris
Disk /dev/hdb: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       17753     8388261   83  Linux
Disk /dev/hdd: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1       17753     8388261   83  Linux
Disk /dev/sda: 8589 MB, 8589934592 bytes  哈哈,终于看到linux找到这个scsi硬盘了
255 heads, 63 sectors/track, 1044 cylinders  原来网上说只支持1个G的是不正确的
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda doesn't contain a valid partition table
[root@localhost6 ~]# fdisk /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 默认直接回车了
Using default value 1044
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1044     8385898+  83  Linux
Command (m for help):
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost6 ~]# mkfs.ext3 /dev/sda1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1048576 inodes, 2096474 blocks
104823 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@localhost6 /]# mkdir /abe
[root@localhost6 /]# mount /dev/sda1 /abe
[root@localhost6 /]# df -k              看到下边已经添加成功了
文件系统               1K-块        已用     可用 已用% 挂载点
/dev/hda1              7726312   6648120    679380  91% /
tmpfs                   127852         0    127852   0% /dev/shm
.host:/               35840980  31546196   4294784  89% /mnt/hgfs
/dev/hdb1              8256604   6885088    952104  88% /abc
/dev/hdd1              8256604   7118552    718640  91% /abd
/dev/sda1              8254240    149628   7685320   2% /abe
[root@localhost6 /]# gedit /etc/fstab    在最后一行添加下面一句
 
/dev/sda1               /abe                    ext3    defaults        1 4
 
 
重启系统,开机成功。

阅读(3880) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-06-14 18:51:13

disocuntMBT Shoes on sale! Welcome to our online store! www.my-cheapshoes.com. MBT Shoes stands for Masai Barefoot Technology. The uniquely-designed, multi-layered, cured sole is designed to simulate walking in sand. If you love MBT Shoes, please come to our store. We offer Wome