Wubi:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Bt4wang留言 | 贡献
 
(未显示10个用户的41个中间版本)
第1行: 第1行:
{{Translation}}
{{Template:系统安装导航}}
{{From|https://wiki.ubuntu.com/WubiGuide}}
{{Translator|bt4wang}}
{{Languages|UbuntuWiki:WubiGuide}}
 
=== 引言 ===
=== 引言 ===
[[Image:Wubi_logo.png‎]]
[[Image:Wubi_logo.png‎]]
==== Wubi 是什么? ====
Wubi 是一个官方支持的 Ubuntu 安装工具,为 Windows 用户提供了一个如同安装其他 Windows 应用程序般简单而安全的安装途径。 
==== 如何使用本指南 ====
请注意本指南仅针对使用 Wubi 安装的情况;如需常规的 Ubuntu 信息,请访问更合适的资源,如 [http://help.ubuntu.com/ Ubuntu 官方文档]、[http://www.ubuntuforums.org/forumdisplay.php?f=131 ubuntuforums] 或 [http://www.ubuntuguide.org ubuntuguide]。也可访问[http://wiki.ubuntu.org.cn/ Ubuntu 中文文档]或 [http://forum.ubuntu.com.cn/ Ubuntu 中文论坛]。<br />
<br />
您可登录 [http://wubi-installer.org Wubi 官方网站]获取 Wubi 的常规信息。或许您也会对 [http://www.ubuntuforums.org/forumdisplay.php?f=234 Wubi 论坛]的内容感兴趣。
=== 安装 ===
=== 安装 ===
==== 如何安装 Ubuntu? ====
完成后程序会要求您重启计算机。重新启动后在启动选单中选择 Ubuntu。安装操作将继续执行 10-15 分钟并再次重启计算机。至此安装完毕,您可以在启动选单中选择 Ubuntu 并开始使用。<br /><br />
运行 wubi,输入新帐户的密码,然后点击“安装”。之后的操作均为自动执行。安装文件(700MB)将被下载到硬盘并执行校验,完成后程序会要求您重启计算机。重新启动后在启动选单中选择 Ubuntu。安装操作将继续执行 10-15 分钟并再次重启计算机。至此安装完毕,您可以在启动选单中选择 Ubuntu 并开始使用。<br /><br />
[[Image:Wubi-123_zh.png‎]]<br />
[[Image:Wubi-123_zh.png‎]]<br />
<br />标准安装的默认设置可以满足大部分用户的使用要求。
<br />标准安装的默认设置可以满足大部分用户的使用要求。这个可以修吗?


==== 如何选择运行 Windows 或 Ubuntu? ====
==== 如何选择运行 Windows 或 Ubuntu? ====
重启后,您可以在启动选单选择运行 Windows 或 Ubuntu。<br /><br />
重启后,您可以在启动选单选择运行 Windows 或 Ubuntu。<br /><br />
[[Image:Boot-screen.jpg‎]]
[[Image:Boot-screen.jpg‎]]
==== 如何在没有网络连接的计算机上安装? ====
Wubi 可以使用 Ubuntu Desktop 8.04.1 Live CD 运行。Wubi.exe 已包含在该 CD 上。<br /><br />
如果您没有此 CD,请找一台能够连接 Internet 的机器,并下载 Wubi 及必需的 ISO:
* http://wubi-installer.org/latest.php
* http://releases.ubuntu.com/8.04.1
下载完毕后将文件复制到没有网络连接的计算机中,所有文件都必须放置在相同目录下。随后运行 Wubi 执行文件。如果您的需要安装 Ubuntu 的计算机可以访问网络,只需下载 Wubi(第一个链接),Wubi 将自动下载其他必需的文件。
==== 哪里可以找到旧版的 Wubi? ====
这里:http://sourceforge.net/project/showfiles.php?group_id=198355
==== 如何使用手动下载的 ISO? ====
您需要下载与 Wubi 版本适应的 ISO。将 ISO 文件放置在 Wubi-X.XX.X.exe 文件的相同目录。执行 Wubi 即可开始安装。
* Wubi 8.04.1 需要 8.04.1 DESKTOP ISO,可以在这里下载:http://releases.ubuntu.com/8.04.1/
* Wubi 8.04 需要 8.04 DESKTOP ISO,可以在这里下载:http://releases.ubuntu.com/8.04/
* Wubi 7.10 需要 7.10 DESKTOP ISO,可以在这里下载:http://releases.ubuntu.com/7.10/
* Wubi 7.04 需要 7.04 ALTERNATE ISO,可以在这里下载:http://releases.ubuntu.com/7.04/
请注意应当下载 CD ISO。DVD ISO 可能无法配合 Wubi 使用。
==== 何时需要下载安装 Ubuntu AMD64 版? ====
如果您拥有一台 64 位的计算机;AMD64 版安装程序适用于 AMD 及 Intel 平台的 64 位计算机。
==== 如何强制 Wubi 下载并安装 32 位版的 Ubuntu? ====
您可以预先手动下载适合的 32 位版本 ISO,并将它放置在 Wubi.exe 的相同目录;或着使用“--32bit”参数启动 Wubi。


==== 如何强制 Wubi 安装在内存 <= 256MB 的计算机上? ====
==== 如何强制 Wubi 安装在内存 <= 256MB 的计算机上? ====
第55行: 第19行:
==== 如何强制 Wubi 跳过 md5 校验? ====
==== 如何强制 Wubi 跳过 md5 校验? ====
您可以使用“--skipmd5check”参数运行 Wubi。
您可以使用“--skipmd5check”参数运行 Wubi。
==== 支持哪些操作系统? ====
Wubi 能够在 Windows Vista,XP 及 2000 操作系统上正常工作。Windows 98 应当也能支持,但没有深入测试。Windows ME 不被支持。Linux 操作系统可以使用 Lubi http://lubi.sourceforge.net/。


==== 安装被中断后如何处理? ====
==== 安装被中断后如何处理? ====
您应当在 Windows 中重新运行 Wubi(程序可能要求您先卸载 Wubi)。
您应当在 Windows 中重新运行 Wubi(程序可能要求您先卸载 Wubi)。
=== 升级 ===
不支持从 7.04 升级至 7.10,因为 7.04 与 7.10 有重大改变。最佳的方法是删除旧版的 Wubi 并安装 Wubi-8.04(您可以保留原先安装的 Ubuntu 文件,并在 Wubi-8.04 中访问它们)或 [http://lubi.sourceforge.net/lvpm.html 使用 LVPM 将 7.04 系统文件移动至 a dedicated partition],然后 [http://www.ubuntu.com/getubuntu/upgrading 使用标准的 upgrade-manager 工具完成升级]。<br /><br />
可能支持从 7.10 升级至 8.04,但没有经过测试。<br /><br />
完全支持从 8.04 升级至 8.10。


=== 卸载 ===
=== 卸载 ===
==== 如何卸载 Wubi? ====
==== 如何卸载 Wubi? ====
在“添加删除程序”(Vista 为“程序和功能”)里运行卸载工具。或使用 C:\ubuntu\uninstall.exe(如果安装在其他分区,请将 C: 替换成相应盘符)。<br /><br />
在“添加删除程序”(Vista 为“程序和功能”)里运行卸载工具。或使用 C:\ubuntu\uninstall.exe(如果安装在其他分区,请将 C: 替换成相应盘符)。<br /><br />
[[Image:wubi-uninstall.png]]<br /><br />
[[Image:wubi-uninstall.png|500px]]<br /><br />
如果卸载工具无效(Wubi rev 505),请尝试下载 [[Media:Uninstall-Ubuntu.zip]] 解压覆盖原文件并执行。


==== 如何手动卸载 Wubi? ====
==== 如何手动卸载 Wubi? ====
删除 C:\ubuntu(7.04 版为 C:\wubi,如安装在其他分区,请删除相应分区内的文件)及 C:\wubildr*(包括 C:\wubildr 及 C:\wubildr.mbr)。<br /><br />
删除 C:\ubuntu(7.04 版为 C:\wubi,如安装在其他分区,请删除相应分区内的文件)及 C:\wubildr*(包括 C:\wubildr 及 C:\wubildr.mbr)。<br /><br />
对于 Windows XP,您需要编辑 C:\boot.ini 并删除包含 Ubuntu/Wubi 的行。对于 Vista,您可以使用 EasyBCD 编辑启动菜单。或者可以通过 控制面板 > 系统 > 高级 > 启动和故障恢复 点击“编辑”修改启动菜单。对于 Windows 98,您需要编辑 C:\config.sys,并删除 Wubi 的区段。<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 从添加删除列表中移除。
删除以下注册表键:HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wubi,即可将 Wubi 从添加删除列表中移除。
==== 如何重装 Wubi? ====
==== 如何重装 Wubi? ====
再次运行 Wubi.exe。Wubi 将检测现有的安装,并显示卸载的选项。您应当备份安装文件(ISO 镜像),以免重新下载的麻烦。请注意重装后,虚拟磁盘(root.disk)将被复位。
再次运行 Wubi.exe。Wubi 将检测现有的安装,并显示卸载的选项。您应当备份安装文件(ISO 镜像),以免重新下载的麻烦。请注意重装后,虚拟磁盘(root.disk)将被复位。


=== 不支持的安装 ===
==== 不能启动 Ubuntu ====
==== 软件磁盘阵列 ====
如果 Windows 没有正常关机,Ubuntu 可能不能启动。遇到这种情况,您应当在 Windows 中检查文件系统(目前 Linux 还没有与 chkdsk 相应的工具)。如果 Wubi 启动失败,请启动 windows,在安装 Ubuntu 的分区运行 chkdsk /r,正常关闭计算机并再次尝试启动 Ubuntu。<br /><br />
软件磁盘阵列 raid 0 和 1 不被支持。它们将在 8.10 版中获得支持。请注意有些所谓“硬件磁盘阵列”,其实是软件的。
请注意 Windows 有时会将文件移动至一个隐藏文件夹 c:\found.000。您需要有 c:\ubuntu\disks\root.disk 及 c:\ubuntu\disks\boot 才能启动。如果这些文件不在该位置,请到 found.000 中寻找。您需要首先设置 windows explorer 以便显示隐藏文件,然后将文件从 found.000 移动回原来的路径。<br /><br />
请确认您没有在磁盘阵列或加密磁盘中安装。并且没有使用 Alternate 或 DVD ISO 安装。


==== 加密磁盘 ====
==== 格式化 swap 文件时安装错误 ====
加密磁盘不被支持。
如果安装在格式化 swap 虚拟磁盘时失败,表明您的磁盘充满了磁盘碎片。请卸载安装,使用 jkdefrag 在目标分区清理磁盘碎片,然后重新使用 wubi 安装。


==== Windows ME ====
==== 我怎样把 Ubuntu 作为默认引导选项?====
Windows ME 不被支持。
Ubuntu 未安装为默认的引导选项,你必须在 Windows 引导菜单中选择。要更改这个,在 Windows XP 中转到 控制面板 > 系统 > 高级 > 启动和恢复 并编辑“默认操作系统”,你还可以更改等待时间。


==== 代理服务器 ====
==== 我可以备份安装文件吗? ====
Wubi 不支持 http 代理,使用代理将导致下载失败。这种情况下您应按前述内容的指导手动下载 ISO 并将它放置到 Wubi.exe 的相同目录。
是的,只需复制 C:\ubuntu\disks\root.disk 到其他的地方即可(在 7.04 版本中该文件是 C:\wubi\disks\*.virtual.disk)。旧的安装文件可以挂载(mount)在 Ubuntu 中,所有相关数据都可以复制到新的安装。


==== DVD 及 Alternate ISO ====
==== 虚拟磁盘应该要多大? ====
DVD 及 Alternate ISO 或光盘不被支持。Wubi 8.04 使用的 ISO 必须是 8.04 CD Desktop ISO(最好让 Wubi 帮您自动下载)。对于 Wubi 8.04.1,则需要 8.04.1 Desktop ISO。Wubi 8.10 需要 8.10 CD Desktop ISO,以此类推。
默认大小是根据您的可用空间自动计算得出的,您可以在设置中更改它。实际上,空间不会被完全使用,一个标准的系统安装小于 3 GB,包括所有预安装的软件(office 套件、 游戏、 图形应用程序,等等),但您一旦开始安装额外的软件,2-3 GB 的虚拟磁盘会很快用完空间。大多数情况下 8 GB 应该足够了。请记住 FAT 文件系统上的虚拟磁盘不能大于 4 GB (Wubi 将把大于 4G 的空间拆分成多个虚拟磁盘)。另外,除了虚拟磁盘本身需要占用的空间外,记得 Wubi 需要额外的可用空间,这是因为它需要获取 ISO (700 MB) 文件,再加上一些辅助文件。所以如果您的可用空间少于 5 GB,Wubi 将不能安装。


=== Troubleshooting ===
==== 我怎样才能移植到一个真实的分区,甚至完全摆脱 Windows? ====
NOTE: Wubi 8.04.1 is now available here: http://wubi-installer.org this addresses most of the following issues that emerged after the 8.04 release. So if you have installation problems with 8.04 it is recommended to try 8.04.1 first. Note that it requires a new 8.04.1 desktop ISO available from http://releases.ubuntu.com/8.04.1/, you will not be able to reuse the 8.04 CD/ISO with 8.04.1.
已有的 Wubi/Lubi 安装可以通过 LVPM 升级到一个在专用分区上的安装。LVPM 的主站在 http://lubi.sourceforge.net/lvpm.html 而指南和支持论坛在 http://ubuntuforums.org/showthread.php?t=438591。
==== Cannot access the CD ====
另外,下列脚本也可以用于 Wubi 8.04.
This sometimes happens when a DVD media/drive is used and/or if the CD is corrupted and/or if the support is of poor quality and/or the CD/DVD is not finalized. Wubi does not require a physical CD, download wubi from http://wubi-installer.org and run it without the CD in the tray. If you have already downloaded the ISO file, place the ISO in the same directory as Wubi.exe.
下载[[UbuntuWiki:attachment:wubi-move-to-partition|attachment:wubi-move-to-partition]]
==== Cannot boot into Ubuntu ====
打开一个终端并运行:
Ubuntu cannot be booted if Windows has not been shut down cleanly, you have to clear the Windows filesystem  from Windows (there is no chkdsk equivalent for Linux yet). If Wubi fails to start, boot into windows, run chkdsk /r from windows on the same drive where you have installed Ubuntu, shutdown cleanly and then try to boot into Ubuntu again.
Make sure you did not install on a RAID array or in an encrypted disk. Also make sure you did not install using an Alternate or DVD ISO.
==== Other boot or video problems ====
Some hardware is not fully compatible and Wubi will freeze upon booting (ACPI) and/or you may experience video problems. Those are not Wubi specific issues. There are generally special parameters that are required to enable workarounds for such hardware. If you press ESC at boot after selecting "Ubuntu" you will se a menu with more boot options. If 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'.
==== Installation error while formatting the swap file ====
If the installation fails while formatting the swap virtual disk it means that your drive is excessively fragmented. Uninstall, run jkdefrag on the target drive, then run wubi again.
==== Cannot uninstall Ubuntu ====
If you used Wubi rev 505, the uninstaller may fail if you installed on a drive different from C. In such case use [[UbuntuWiki:attachment:Uninstall-Ubuntu.exe|attachment:Uninstall-Ubuntu.exe]]. Wubi rev 506+ does not have this issue.
==== Cannot download the ISO file ====
This normally happens when you are behind a proxy server, sometimes the server might be down temporarily. In either case you can download the ISO manually as explained above.
==== Problems upgrading from 7.04 to 7.10 ====
Upgrading from 7.04 to 7.10 is NOT supported. Upgrading from 8.04 to later versions is fully supported.
==== Video Problems after second reboot ====
If you experience problems after installation, press "Ctrl+Alt+F2" and run:
<code><nowiki>sudo dpkg-reconfigure xserver-xorg</nowiki></code>
Select the Vesa driver and leave all other options at default. Then reboot. That will allow you to boot into a safe graphic mode (limited resolution) you should then be able to install the appropriate drivers or try other solutions as appropriate.
==== Corrupted NTFS filesystem ====
All reported cases of damaged filesystems so far were from people that hard rebooted (pulling the plug).
When you hard reboot, you can always damage your filesystem whether you use wubi or not. What happens is that new users sometimes get stacked with wubi/ubuntu and since they do not know what to do they tend to hard-reboot more often than necessary. Sometimes they get lucky, sometimes they do not. Since wubi sits on top of ntfs of course when they do not get lucky, ntfs gets corrupted. Sometimes people blame Wubi for that even though a quick googling will show you that there are tons of people experiencing ntfs corruption without having ever used wubi or ntfs-3g (and a full software industry lurking on that...), most of them after a hard reboot...
If ntfs filesystem gets corrupted you have to run chkdsk /r from the windows recovery console on the Windows CD (or other recovery CD available on the web) or in the msdos console (if you can boot into Windows). At the moment there is no fsck for ntfs on the Linux side, otherwise it would be possible to fix errors automatically within Linux itself, as it happens for other filesystems, without having to rely on Windows tools.
Best advise is to simply avoid hard rebooting. Whatever the OS.
=== Wubi Support Forum ===
If none of the above helps, feel free to ask for help on http://www.ubuntuforums.org/forumdisplay.php?f=234. It helps a lot if you can provide relevant logs when asking for support. Logs also speed up the process considerably. Note that you can install in "Verbose Mode" so that the logs will be even more complete. You will have to uninstall, reinstall, press "esc" at boot after selecting "Ubuntu", and choose "Verbose Mode". That will provide more detailed information.There are different Wubi logs:
* Windows side installation logs are in your user temp folder (%temp%)
* For grub errors, immediately after reboot, press the insert key rapidly after selecting Wubi and/or press esc at the countdown after selecting "Ubuntu" and use "c" or "e" to enter the appropriate boot options manually
* For installation boot logs or if you end up in a busybox console, see /casper.log. You can use the commands "cat" and "more" to read the file.
* For installation logs see /var/log/syslog and /var/log/installer within Linux and C:\ubuntu\installation-logs.zip within Windows. If you do not have C:\ubuntu\installation-logs.zip, uninstall, reinstall, select "verbose mode" at boot (see above). When the installer stops press CTRL+ALT+F2 and run: "sudo sh /custom-installation/hooks/failure-command.sh". You can now reboot into Windows, the logs should be in C:\ubuntu\installation-logs.zip
* Post installation logs are in /tmp and /var/log/syslog
Bugs are tracked in https://bugs.launchpad.net/wubi.
=== Misc ===
==== Inclusion into official Ubuntu ====
Wubi was born as an independent project and hence the 7.04 and 7.10 versions were unofficial. But Wubi 8.04 is fully supported and it has been shipping within the Ubuntu Live CD with the 8.04 release.
==== How do I make Ubuntu the default boot option? ====
Ubuntu is not installed as the default boot option, you have to select it in the windows boot menu. To change that, in windows XP go to control_panel > system > advanced > startup_and_recovery and edit the "Default Operating System", if you want you can change the timeout as well.
==== 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>
 
==== What happens if I have another bootloader? ====
Wubi only changes the Windows bootloader. Chances are that your bootloader will chainload into the Windows bootloader. For instance, if you have Grub already, you will have to select Windows there, and then you will see Windows and Ubuntu. The chain of events goes like that:
GRUB > NTLDR/BCD > GRUB4DOS > KERNEL
==== 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.
==== How do I migrate to a real partition, and/or get rid of Windows entirely? ====
Existing Wubi/Lubi installations can be upgraded to an installation on a dedicated partition via LVPM. The main site for LVPM is at http://lubi.sourceforge.net/lvpm.html and the guide and support forum is at http://ubuntuforums.org/showthread.php?t=438591.
As an alternative, the following script can be used with Wubi 8.04.
Download [[UbuntuWiki:attachment:wubi-move-to-partition|attachment:wubi-move-to-partition]]
Open a terminal and run:
<pre><nowiki>
<pre><nowiki>
sudo sh wubi-move-to-partition /dev/sda9 /dev/sda10
sudo sh wubi-move-to-partition /dev/sda9 /dev/sda10
</nowiki></pre>
</nowiki></pre>
Replace /dev/sda9 with the partition where you would like to migrate the Wubi installation to, and /dev/sda10 with the appropriate swap partition (you can omit the second argument completely, in which case no swap will be setup). The two partitions must already exist and be empty (you can use any partitioning tool such as gparted to create them in advance). Note that the script will install grub as main bootloader replacing the existing bootloader, and  it may not be easy to undo the changes (if things do not work as expected you will have to boot from a Live CD and replace/edit the bootloader manually). Also note that if you have multiple hard-disks, the disk order might have to be adjusted manually.
替换其中的 /dev/sda9 为你希望移植 Wubi 安装到的分区,而 /dev/sda10 是适当的 swap 分区(你完全可以省略第二个参数,在这种情况下,没有 swap 会被设置)。两个分区必须已经存在,并且为空白(你可以使用任何分区工具,譬如 gparted 来预先创建它们)。注意,脚本将会安装 grub 作为主要的 bootloader 来替换已有的 bootloader,并且比较难以撤销更改(如果事情不如你所愿的发展,你将必须从 Live CD 引导并手动替换/编辑 bootloader)。另外还要注意,如果你有多个硬盘,磁盘的顺序可能需要手动调整。
 
==== How do I resize the virtual disks? ====
==== How do I resize the virtual disks? ====
You can use LVPM, at http://lubi.sourceforge.net/lvpm.html
You can use LVPM, at http://lubi.sourceforge.net/lvpm.html
第212行: 第114行:
sudo fsck /win/ubuntu/disks/root.disk
sudo fsck /win/ubuntu/disks/root.disk
</nowiki></pre>
</nowiki></pre>
==== How to reboot cleanly even when the keyboard/mouse are frozen ====
[[Category:安装系统]]
There are normally several ways to reboot cleanly using key combinations such as:
[[Category:Windows]]
* 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. 
=== Wubi Customization ===
==== Can you add Ubuntu-flavor-XYZ to Wubi? ====
If you want your distribution included into the official release of Wubi, that needs to be approved. A live CD ISO must be available to do that (Wubi uses a ubiquity based installer).
==== Can I recompile my own version of Wubi to support my Ubuntu-based distro? ====
Yes, Wubi can be easily rebranded and modified. Get the wubi source code and modify the files in the ./data directory as you see fit. In particular you may want to change isolist.ini and the artwork (image names have to match the headers in isolist.ini).
To compile on a Debian based system run:
<pre><nowiki>
make prerequisites #only to be done once
make
make test #to test the installation within wine</nowiki></pre>
==== Can I use Wubi for non-Ubuntu based distributions? ====
It should be fairly straightforward to modify the frontend (feel free to ask if you need any help), as shown above. Your Linux distribution must have a mechanism to do unattended installation using a preseed file. Wubi takes advantages of debian-installer/ubiquity preseeding, if you use a different mechanism, you will have to modify src/wubi/installer_preseed.nsh. The make prerequisite scripts might need to be updated a bit too since they are debian specific.
Note that upstream files (Linux-side) need to be changed as well since normal distributions are generally not capable of targeting and booting (and rebooting) off a loop device. This task was originally accomplished by the Lupin project, but since 7.10 a lot of functionality has been moved upstream. Hence you might want to have a look at:
* https://launchpad.net/lupin
* https://launchpad.net/partman-auto-loop
* https://code.launchpad.net/ubuntu/+source/initramfs-tools
* Other affected files: update-grub, grub-installer, /etc/init.d/umountfs, /etc/init.d/umountroot, /etc/init/d/sendsigs
* [https://bugs.launchpad.net/bugs/+bugs?search=Search&field.status=New&field.status=Incomplete&field.status=Confirmed&field.status=Triaged&field.status=In+Progress&field.status=Fix+Committed&field.status=Fix+Released&field.status=Invalid&field.status=Won%27t+Fix&field.omit_dupes.used=&field.tag=wubi Relevant upstream Wubi patches]
==== Where is the source code? ====
* [https://code.launchpad.net/wubi Wubi (Windows frontend)]
* [https://code.launchpad.net/lupin Lupin (Linux backend)]
* [https://code.launchpad.net/lubi Lubi (Linux frontend)]
* [https://code.launchpad.net/lvpm LVPM (Migrates virtual disks to real partitions)]
==== What is the license? ====
The code is distributed under [http://www.gnu.org/copyleft/gpl.html#TOC1 GPL version 2 and above], however, the Linux kernel itself is licensed under the GPL version 2 only.
----
[[category:CategorySpec]]
 
[[category:UbuntuWiki]]

2013年12月5日 (四) 00:21的最新版本

DVD 安装 LiveCD 试用 LiveCD 安装 U 盘安装 Wubi 安装 硬盘安装LiveCD

引言

安装

完成后程序会要求您重启计算机。重新启动后在启动选单中选择 Ubuntu。安装操作将继续执行 10-15 分钟并再次重启计算机。至此安装完毕,您可以在启动选单中选择 Ubuntu 并开始使用。



标准安装的默认设置可以满足大部分用户的使用要求。这个可以修吗?

如何选择运行 Windows 或 Ubuntu?

重启后,您可以在启动选单选择运行 Windows 或 Ubuntu。

如何强制 Wubi 安装在内存 <= 256MB 的计算机上?

您可以使用“--skipmemorycheck”参数运行 Wubi。在此情况下安装工具可能无效。

如何强制 Wubi 安装在空闲磁盘空间 < 5GB 的计算机上?

您可以使用“--skipspacecheck”参数运行 Wubi。安装最少要求 3GB 磁盘空间(加上存放 ISO 的空间),不要在更小的空间上尝试...

如何强制 Wubi 跳过 md5 校验?

您可以使用“--skipmd5check”参数运行 Wubi。

安装被中断后如何处理?

您应当在 Windows 中重新运行 Wubi(程序可能要求您先卸载 Wubi)。

卸载

如何卸载 Wubi?

在“添加删除程序”(Vista 为“程序和功能”)里运行卸载工具。或使用 C:\ubuntu\uninstall.exe(如果安装在其他分区,请将 C: 替换成相应盘符)。



如何手动卸载 Wubi?

删除 C:\ubuntu(7.04 版为 C:\wubi,如安装在其他分区,请删除相应分区内的文件)及 C:\wubildr*(包括 C:\wubildr 及 C:\wubildr.mbr)。

对于 Windows XP,您需要编辑 C:\boot.ini 并删除包含 Ubuntu/Wubi 的行。对于 Vista,您可以使用 EasyBCD 编辑启动菜单。或者可以通过 控制面板 > 系统 > 高级 > 启动和故障恢复 点击“编辑”修改启动菜单(仅限 XP)。对于 Windows 98,您需要编辑 C:\config.sys,并删除 Wubi 的区段。

删除以下注册表键:HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wubi,即可将 Wubi 从添加删除列表中移除。

如何重装 Wubi?

再次运行 Wubi.exe。Wubi 将检测现有的安装,并显示卸载的选项。您应当备份安装文件(ISO 镜像),以免重新下载的麻烦。请注意重装后,虚拟磁盘(root.disk)将被复位。

不能启动 Ubuntu

如果 Windows 没有正常关机,Ubuntu 可能不能启动。遇到这种情况,您应当在 Windows 中检查文件系统(目前 Linux 还没有与 chkdsk 相应的工具)。如果 Wubi 启动失败,请启动 windows,在安装 Ubuntu 的分区运行 chkdsk /r,正常关闭计算机并再次尝试启动 Ubuntu。

请注意 Windows 有时会将文件移动至一个隐藏文件夹 c:\found.000。您需要有 c:\ubuntu\disks\root.disk 及 c:\ubuntu\disks\boot 才能启动。如果这些文件不在该位置,请到 found.000 中寻找。您需要首先设置 windows explorer 以便显示隐藏文件,然后将文件从 found.000 移动回原来的路径。

请确认您没有在磁盘阵列或加密磁盘中安装。并且没有使用 Alternate 或 DVD ISO 安装。

格式化 swap 文件时安装错误

如果安装在格式化 swap 虚拟磁盘时失败,表明您的磁盘充满了磁盘碎片。请卸载安装,使用 jkdefrag 在目标分区清理磁盘碎片,然后重新使用 wubi 安装。

我怎样把 Ubuntu 作为默认引导选项?

Ubuntu 未安装为默认的引导选项,你必须在 Windows 引导菜单中选择。要更改这个,在 Windows XP 中转到 控制面板 > 系统 > 高级 > 启动和恢复 并编辑“默认操作系统”,你还可以更改等待时间。

我可以备份安装文件吗?

是的,只需复制 C:\ubuntu\disks\root.disk 到其他的地方即可(在 7.04 版本中该文件是 C:\wubi\disks\*.virtual.disk)。旧的安装文件可以挂载(mount)在 Ubuntu 中,所有相关数据都可以复制到新的安装。

虚拟磁盘应该要多大?

默认大小是根据您的可用空间自动计算得出的,您可以在设置中更改它。实际上,空间不会被完全使用,一个标准的系统安装小于 3 GB,包括所有预安装的软件(office 套件、 游戏、 图形应用程序,等等),但您一旦开始安装额外的软件,2-3 GB 的虚拟磁盘会很快用完空间。大多数情况下 8 GB 应该足够了。请记住 FAT 文件系统上的虚拟磁盘不能大于 4 GB (Wubi 将把大于 4G 的空间拆分成多个虚拟磁盘)。另外,除了虚拟磁盘本身需要占用的空间外,记得 Wubi 需要额外的可用空间,这是因为它需要获取 ISO (700 MB) 文件,再加上一些辅助文件。所以如果您的可用空间少于 5 GB,Wubi 将不能安装。

我怎样才能移植到一个真实的分区,甚至完全摆脱 Windows?

已有的 Wubi/Lubi 安装可以通过 LVPM 升级到一个在专用分区上的安装。LVPM 的主站在 http://lubi.sourceforge.net/lvpm.html 而指南和支持论坛在 http://ubuntuforums.org/showthread.php?t=438591。 另外,下列脚本也可以用于 Wubi 8.04. 下载attachment:wubi-move-to-partition 打开一个终端并运行:

sudo sh wubi-move-to-partition /dev/sda9 /dev/sda10

替换其中的 /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 attachment:wubi-add-virtual-disk, open a terminal and run:

sudo sh wubi-add-virtual-disk /home 15000

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):

cd /host/ubuntu/disks
sudo dd if=/dev/zero of=extra.disk bs=1MB count=1 seek=10000
sudo mkfs.ext3 -F extra.disk

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 fsutil file createnew filename filesize 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:

  1. Make sure you have internet access (see the network icon on the top right)
  2. Open the "Applications" menu and select "Add/Remove..."
  3. In the listbox on the right select: "Show All Available Applications"
  4. Search for "NTFS" and select "NTFS Configuration Tool". Click OK to install it
  5. Run the configuration tool under Applications > System Tools > NTFS Configuration Tool
  6. Select "Enable write support for internal device". Click OK to set it up.

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:

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 LiveCD, then mount the windows partition:

sudo mkdir /win
sudo mount /dev/sda1 /win

Replace sda1 with the appropriate device (a == disk, 1 == partition number), then mount the virtual disk therein

sudo mkdir /vdisk
sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk

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:

sudo fsck /win/ubuntu/disks/root.disk