查看“Wubi”的源代码
来自Ubuntu中文
←
Wubi
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
=== 引言 === [[Image:Wubi_logo.png]] ==== Wubi 是什么? ==== Wubi 是一个官方支持的 Ubuntu 安装工具,为 Windows 用户提供了一个如同安装其他 Windows 应用程序般简单而安全的安装途径。 === 安装 === ==== 如何安装 Ubuntu? ==== 运行 wubi,输入新帐户的密码,然后点击“安装”。之后的操作均为自动执行。安装文件(700MB)将被下载到硬盘并执行校验,完成后程序会要求您重启计算机。重新启动后在启动选单中选择 Ubuntu。安装操作将继续执行 10-15 分钟并再次重启计算机。至此安装完毕,您可以在启动选单中选择 Ubuntu 并开始使用。<br /><br /> [[Image:Wubi-123_zh.png]]<br /> <br />标准安装的默认设置可以满足大部分用户的使用要求。 ==== 如何选择运行 Windows 或 Ubuntu? ==== 重启后,您可以在启动选单选择运行 Windows 或 Ubuntu。<br /><br /> [[Image:Boot-screen.jpg]] ==== 如何在没有网络连接的计算机上安装? ==== 无需网络,Ubuntu Live CD中自带wubi.exe,用解压工具取出便是。 ==== 何时需要下载安装 Ubuntu AMD64 版? ==== 如果您拥有一台 64 位的计算机;AMD64 版安装程序适用于 AMD 及 Intel 平台的 64 位计算机。 ==== 如何强制 Wubi 下载并安装 32 位版的 Ubuntu? ==== 您可以预先手动下载适合的 32 位版本 ISO,并将它放置在 Wubi.exe 的相同目录;或着使用“--32bit”参数启动 Wubi。 ==== 如何强制 Wubi 安装在内存 <= 256MB 的计算机上? ==== 您可以使用“--skipmemorycheck”参数运行 Wubi。在此情况下安装工具可能无效。 ==== 如何强制 Wubi 安装在空闲磁盘空间 < 5GB 的计算机上? ==== 您可以使用“--skipspacecheck”参数运行 Wubi。安装最少要求 3GB 磁盘空间(加上存放 ISO 的空间),不要在更小的空间上尝试... ==== 如何强制 Wubi 跳过 md5 校验? ==== 您可以使用“--skipmd5check”参数运行 Wubi。 ==== 支持哪些操作系统? ==== Wubi 能够在 Windows Vista,XP 及 2000 操作系统上正常工作。Windows 98 应当也能支持,但没有深入测试。Windows ME 不被支持。Linux 操作系统可以使用 Lubi http://lubi.sourceforge.net/。 ==== 安装被中断后如何处理? ==== 您应当在 Windows 中重新运行 Wubi(程序可能要求您先卸载 Wubi)。 === 卸载 === ==== 如何卸载 Wubi? ==== 在“添加删除程序”(Vista 为“程序和功能”)里运行卸载工具。或使用 C:\ubuntu\uninstall.exe(如果安装在其他分区,请将 C: 替换成相应盘符)。<br /><br /> [[Image:wubi-uninstall.png|500px]]<br /><br /> ==== 如何手动卸载 Wubi? ==== 删除 C:\ubuntu(7.04 版为 C:\wubi,如安装在其他分区,请删除相应分区内的文件)及 C:\wubildr*(包括 C:\wubildr 及 C:\wubildr.mbr)。<br /><br /> 对于 Windows XP,您需要编辑 C:\boot.ini 并删除包含 Ubuntu/Wubi 的行。对于 Vista,您可以使用 EasyBCD 编辑启动菜单。或者可以通过 控制面板 > 系统 > 高级 > 启动和故障恢复 点击“编辑”修改启动菜单(仅限 XP)。对于 Windows 98,您需要编辑 C:\config.sys,并删除 Wubi 的区段。<br /><br /> 删除以下注册表键:HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wubi,即可将 Wubi 从添加删除列表中移除。 ==== 如何重装 Wubi? ==== 再次运行 Wubi.exe。Wubi 将检测现有的安装,并显示卸载的选项。您应当备份安装文件(ISO 镜像),以免重新下载的麻烦。请注意重装后,虚拟磁盘(root.disk)将被复位。 ==== 无法读取光碟 ==== 此问题常发生在以下情况:使用了 DVD 盘片或驱动器,光盘已磨损,盘片质量低劣,CD/DVD 不是最终发布版本。Wubi 不一定要使用物理光盘,您可以从 http://wubi-installer.org 下载 wubi,并在光驱无盘的情况下运行。如果您已下载 ISO 文件,请将它放置在 Wubi.exe 的相同目录。 ==== 不能启动 Ubuntu ==== 如果 Windows 没有正常关机,Ubuntu 可能不能启动。遇到这种情况,您应当在 Windows 中检查文件系统(目前 Linux 还没有与 chkdsk 相应的工具)。如果 Wubi 启动失败,请启动 windows,在安装 Ubuntu 的分区运行 chkdsk /r,正常关闭计算机并再次尝试启动 Ubuntu。<br /><br /> 请注意 Windows 有时会将文件移动至一个隐藏文件夹 c:\found.000。您需要有 c:\ubuntu\disks\root.disk 及 c:\ubuntu\disks\boot 才能启动。如果这些文件不在该位置,请到 found.000 中寻找。您需要首先设置 windows explorer 以便显示隐藏文件,然后将文件从 found.000 移动回原来的路径。<br /><br /> 请确认您没有在磁盘阵列或加密磁盘中安装。并且没有使用 Alternate 或 DVD ISO 安装。 ==== 其它引导或视频问题 ==== 某些硬件不完全兼容以及 Wubi 将会在引导(ACPI)时冻结,或者你可能会遇到视频的问题。那些不是 Wubi 类的问题。通常需要一些特殊的参数来让这些硬件工作。如果你在选择“Ubuntu”后启动的过程中按 ESC,你将会看到更多的引导选项。如果 the workarounds do the trick,we encourage you to notify the developers, so that a long-term solution can be investigated. For more boot options, once in the grub4dos menu, hit 'e' to edit the first line. Next select the second line and hit 'e' again. Input 'irqpoll' towards the end of the bootline. Then hit 'enter' and then 'b' to boot. Another option that might help is 'all_generic_ide'. ==== 格式化 swap 文件时安装错误 ==== 如果安装在格式化 swap 虚拟磁盘时失败,表明您的磁盘充满了磁盘碎片。请卸载安装,使用 jkdefrag 在目标分区清理磁盘碎片,然后重新使用 wubi 安装。 ==== 我怎样把 Ubuntu 作为默认引导选项?==== Ubuntu 未安装为默认的引导选项,你必须在 Windows 引导菜单中选择。要更改这个,在 Windows XP 中转到 控制面板 > 系统 > 高级 > 启动和恢复 并编辑“默认操作系统”,你还可以更改等待时间。 ==== Can I back up the installation files? ==== Yes just copy C:\ubuntu\disks\root.disk somewhere else (in 7.04 the relevant files are called C:\wubi\disks\*.virtual.disk). Old installation files can be mounted within Ubuntu and any relevant data can be copied over the new installation. ==== How do I install multiple distros? ==== You can install your favorite distro from within Wubi (see the advanced settings) and then once you are in Ubuntu, you can install the other desktop environments as normal packages. Each desktop environment is available as a single package (e.g. kubuntu-desktop). You will not have to reboot to change the desktop, simply log-off and choose the desktop environment in the options at login. ==== Improving disk performance ==== Poor disk performance is usually due to a fragmented drive or to low memory (frequent swapping). You can use jkdefrag to defragment from within windows. <ol><li>download jkdefrag http://www.kessels.com/JkDefrag/ </li><li>unzip </li><li>run: jkdefrag c:\ubuntu (or c:\wubi in 7.04)</li></ol> ==== How big should the the virtual disks be? ==== The default size is calculated automatically based on your free space, you can change that in the settings. The space is not actually fully used, a barebone installation take less than 3GB including all the preinstalled software (office suite, games, graphics applications, etc...), but if the virtual disks were of 2-3GB you would soon run out of space once you start installing extra software. 8GB should be enough in most cases. Remember that on FAT filesystems the virtual disks cannot be larger than 4GB (Wubi will split larger allocations over several virtual disks). Remember also that Wubi requires a larger free space than the one required by the virtual disk themselves, that is because it has to grab an ISO (700MB) plus some headroom. So Wubi will not install if you have less than 5GB free. ==== 我怎样才能移植到一个真实的分区,甚至完全摆脱 Windows? ==== 已有的 Wubi/Lubi 安装可以通过 LVPM 升级到一个在专用分区上的安装。LVPM 的主站在 http://lubi.sourceforge.net/lvpm.html 而指南和支持论坛在 http://ubuntuforums.org/showthread.php?t=438591。 另外,下列脚本也可以用于 Wubi 8.04. 下载[[UbuntuWiki:attachment:wubi-move-to-partition|attachment:wubi-move-to-partition]] 打开一个终端并运行: <pre><nowiki> sudo sh wubi-move-to-partition /dev/sda9 /dev/sda10 </nowiki></pre> 替换其中的 /dev/sda9 为你希望移植 Wubi 安装到的分区,而 /dev/sda10 是适当的 swap 分区(你完全可以省略第二个参数,在这种情况下,没有 swap 会被设置)。两个分区必须已经存在,并且为空白(你可以使用任何分区工具,譬如 gparted 来预先创建它们)。注意,脚本将会安装 grub 作为主要的 bootloader 来替换已有的 bootloader,并且比较难以撤销更改(如果事情不如你所愿的发展,你将必须从 Live CD 引导并手动替换/编辑 bootloader)。另外还要注意,如果你有多个硬盘,磁盘的顺序可能需要手动调整。 ==== How do I resize the virtual disks? ==== You can use LVPM, at http://lubi.sourceforge.net/lvpm.html As an alternative, you can use the following script to move /home or /usr to a dedicated virtual disk. Download [[UbuntuWiki:attachment:wubi-add-virtual-disk|attachment:wubi-add-virtual-disk]], open a terminal and run: <pre><nowiki> sudo sh wubi-add-virtual-disk /home 15000 </nowiki></pre> Where the first argument is the directory to move to a new dedicated disk, and the second argument is the size in MB. The 2 directories you are most likely to migrate are /home (if you have a lot of user data) and /usr (if you installed a lot of software). You should now reboot. If you are happy with the result, you can now remove /home.backup. To undo the changes remove /home, copy rename /home.backup to /home and remove the /home line in /etc/fstab. ==== How do I create a virtual disk in Ubuntu? ==== Open a terminal (Applications -> Accessories -> Teminal), and enter these commands (this will create a 10 GB extra.virtual.disk, adjust line 2 to change these): <pre><nowiki> cd /host/ubuntu/disks sudo dd if=/dev/zero of=extra.disk bs=1MB count=1 seek=10000 sudo mkfs.ext3 -F extra.disk</nowiki></pre> ==== How do I create a virtual disk in Windows? ==== You can use qemu-img for that. Another dirty trick (but working) is to copy any other file of the desired size to c:\wubi\disks and rename it "root.disk", "home.disk", "swap.disk" or "extra.disk". That's the wubi equivalent of buying (and installing) a new hard disk ;) If you are running Windows XP (may work in Windows 2000 and Vista as well) you can create a file by using the fsutil that is included with Windows. The command format is <code><nowiki>fsutil file createnew filename filesize</nowiki></code> where filename is the file you wish to create and filesize is the size of the file to be created in bytes. ==== How do I access the Windows drives? ==== The Windows partition where you installed Wubi is available as /host within Ubuntu All the other partitions will be available under /media/ If you are using Wubi-7.04 (7.10 and 8.04 users can skip this), write support for ntfs is disabled by default, to enable it: <ol><li>Make sure you have internet access (see the network icon on the top right) </li><li>Open the "Applications" menu and select "Add/Remove..." </li><li>In the listbox on the right select: "Show All Available Applications" </li><li>Search for "NTFS" and select "NTFS Configuration Tool". Click OK to install it </li><li>Run the configuration tool under Applications > System Tools > NTFS Configuration Tool </li><li>Select "Enable write support for internal device". Click OK to set it up.</li></ol> ==== How can I access the Wubi files from Windows? ==== There are a few Windows applications that can mount ext2-based file systems. See for instance: * http://www.chrysocome.net/explore2fs * http://www.fs-driver.org/ The relevant Wubi files you need to access are located under C:\ubuntu\disks\ ==== How can I access my Wubi install and repair my install if it won't boot? ==== Boot the Ubuntu Desktop CD, or another [[UbuntuWiki:LiveCD|LiveCD]], then mount the windows partition: <pre><nowiki> sudo mkdir /win sudo mount /dev/sda1 /win </nowiki></pre> Replace sda1 with the appropriate device (a == disk, 1 == partition number), then mount the virtual disk therein <pre><nowiki> sudo mkdir /vdisk sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk </nowiki></pre> Now the content of the virtual disk will be visible under /vdisk. 7.04 users will have to install ntfs-3g first and specify it as fstype to gain r/w access. To check the filesystem you can use: <pre><nowiki> sudo fsck /win/ubuntu/disks/root.disk </nowiki></pre> ==== How to reboot cleanly even when the keyboard/mouse are frozen ==== There are normally several ways to reboot cleanly using key combinations such as: * CTRL + ALT+ F2 (get to a terminal, you can then run top/kill/pkill to discover and kill the offending process) * ALT+ SYSRQ + R then CTRL + ALT+ F2 (as above, but first try to regain control of the keyboard) * CTRL + ALT + Backspace (kills the graphic session and goes to a console, all graphical applications are terminated too) * ALT+ SYSRQ + R then ALT + Backspace (as above, but first try to regain control of the keyboard) * CTRL + ALT + DEL (reboot) * ALT+ SYSRQ + R then CTRL + ALT + DEL (as above, but first try to regain control of the keyboard) * ALT+ SYSRQ + R + S + U + B (forces a clean reboot even when the keyboard is not responding) The last one is the most effective, but you could try the other commands first. [[Category:安装系统]]
该页面使用的模板:
模板:系统安装导航
(
查看源代码
)
返回
Wubi
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息