https://wiki.ubuntu.org.cn/api.php?action=feedcontributions&user=Ekeng&feedformat=atomUbuntu中文 - 用户贡献 [zh-hans]2024-03-28T20:18:13Z用户贡献MediaWiki 1.26.3https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=28424UbuntuHelp:AdeskletsHowto/zh2007-08-14T12:46:18Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|from=https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
{{Verifier|}}<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== 获取 ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== 设置 ====<br />
Desklets 起初要手动运行.因为它们通常是python脚本(通常文件名以".py"结尾),可以在[https://help.ubuntu.com/community/BasicCommands 终端] 运行使用命令 "python filename.py" ( 这里的 filename.py 是desklet的脚本,通常跟文档名相近).运行每个desklet都有两种方法,一种是"测试"模式,另一种是"注册",当您运行desklet时.它会提示您选择哪种模式(按相应的键,回车).刚开始您最好选择测试模式,这样您可以看看它长什么样,是否把它放到桌面上.按ctrl-C 可以结束测试模式(这是结束在终端运行程序的标准方法).<br />
<br />
Desklets 是由文本设置的,通常名为config.txt, 可以用任何文本编辑器打开(当desklet在运行时不要打开,因为您做的更改可能会被覆盖).由于每个desklet都不同,不可能都解释设置方法,但文本文件一般都很简单.比如,以下是我使用的一个"modubar" desklet的配置文件,和MacOSX's dock 很相似,就是顶部没有注释.页面布局和以前一样,您就知道配置有多简单了(这个desklet在它的目录下搜索一个名为icon的文件夹,因此我把图标存放在这个文件夹内):<br />
<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.<br />
<br />
==== 注册 ====<br />
<br />
如果desklet在测试模式下令您满意时,您可以让desklet真正工作,这只要注册.通常这由desklet脚本完成,不是选择测试模式而是选注册模式.desklet一旦注册了,就可以用命令<code><nowiki>adesklets</nowiki></code>,来运行.您可以注册许多个desklet,这样在您运行<code><nowiki>adesklets</nowiki></code>命令时都会运行,在会话添加启动命令也很不错(GNOME下 系统->首选项->会话,选择 启动程序 标签来添加).[[链接标题]]<br />
<br />
==结束语 ==<br />
<br />
结束desklets进程(已注册的)您可使用:<br />
<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
移除已注册的desklets,但还没删除的,您可以清空配置文件用:<br />
<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets 一般出现在屏幕左上角.右击选择移动来移动它们,左击确定.Adesklets会记住desklet的位置,因此下次启动时还会在那个位置.<br />
<br />
很多desklet会用"假透明",这是说它们截一个屏来作为desklet的背景,假装可以透过desklet看到桌面(和"真透明"相对,"真透明"通常是半透明,是由复合程序来做的,如xcompmgr 和the Compiz 窗口管理器).这意味着许多桌面的改变(例如您在运行屏幕保护程序时)在desklets上不会正确显示.我个人使用 ChBg 来循环透过不同的桌面壁纸,我发现当它再次截屏时快速闪现之前的其他窗口.这相当烦人,特别在看影片时.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=28423UbuntuHelp:AdeskletsHowto/zh2007-08-14T12:43:13Z<p>Ekeng:/* Some Final Notes */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== 获取 ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== 设置 ====<br />
Desklets 起初要手动运行.因为它们通常是python脚本(通常文件名以".py"结尾),可以在[https://help.ubuntu.com/community/BasicCommands 终端] 运行使用命令 "python filename.py" ( 这里的 filename.py 是desklet的脚本,通常跟文档名相近).运行每个desklet都有两种方法,一种是"测试"模式,另一种是"注册",当您运行desklet时.它会提示您选择哪种模式(按相应的键,回车).刚开始您最好选择测试模式,这样您可以看看它长什么样,是否把它放到桌面上.按ctrl-C 可以结束测试模式(这是结束在终端运行程序的标准方法).<br />
<br />
Desklets 是由文本设置的,通常名为config.txt, 可以用任何文本编辑器打开(当desklet在运行时不要打开,因为您做的更改可能会被覆盖).由于每个desklet都不同,不可能都解释设置方法,但文本文件一般都很简单.比如,以下是我使用的一个"modubar" desklet的配置文件,和MacOSX's dock 很相似,就是顶部没有注释.页面布局和以前一样,您就知道配置有多简单了(这个desklet在它的目录下搜索一个名为icon的文件夹,因此我把图标存放在这个文件夹内):<br />
<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.<br />
<br />
==== 注册 ====<br />
<br />
如果desklet在测试模式下令您满意时,您可以让desklet真正工作,这只要注册.通常这由desklet脚本完成,不是选择测试模式而是选注册模式.desklet一旦注册了,就可以用命令<code><nowiki>adesklets</nowiki></code>,来运行.您可以注册许多个desklet,这样在您运行<code><nowiki>adesklets</nowiki></code>命令时都会运行,在会话添加启动命令也很不错(GNOME下 系统->首选项->会话,选择 启动程序 标签来添加).[[链接标题]]<br />
<br />
==结束语 ==<br />
<br />
结束desklets进程(已注册的)您可使用:<br />
<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
移除已注册的desklets,但还没删除的,您可以清空配置文件用:<br />
<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets 一般出现在屏幕左上角.右击选择移动来移动它们,左击确定.Adesklets会记住desklet的位置,因此下次启动时还会在那个位置.<br />
<br />
很多desklet会用"假透明",这是说它们截一个屏来作为desklet的背景,假装可以透过desklet看到桌面(和"真透明"相对,"真透明"通常是半透明,是由复合程序来做的,如xcompmgr 和the Compiz 窗口管理器).这意味着许多桌面的改变(例如您在运行屏幕保护程序时)在desklets上不会正确显示.我个人使用 ChBg 来循环透过不同的桌面壁纸,我发现当它再次截屏时快速闪现之前的其他窗口.这相当烦人,特别在看影片时.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=28422UbuntuHelp:AdeskletsHowto/zh2007-08-14T12:11:15Z<p>Ekeng:/* Registering Them */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== 获取 ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== 设置 ====<br />
Desklets 起初要手动运行.因为它们通常是python脚本(通常文件名以".py"结尾),可以在[https://help.ubuntu.com/community/BasicCommands 终端] 运行使用命令 "python filename.py" ( 这里的 filename.py 是desklet的脚本,通常跟文档名相近).运行每个desklet都有两种方法,一种是"测试"模式,另一种是"注册",当您运行desklet时.它会提示您选择哪种模式(按相应的键,回车).刚开始您最好选择测试模式,这样您可以看看它长什么样,是否把它放到桌面上.按ctrl-C 可以结束测试模式(这是结束在终端运行程序的标准方法).<br />
<br />
Desklets 是由文本设置的,通常名为config.txt, 可以用任何文本编辑器打开(当desklet在运行时不要打开,因为您做的更改可能会被覆盖).由于每个desklet都不同,不可能都解释设置方法,但文本文件一般都很简单.比如,以下是我使用的一个"modubar" desklet的配置文件,和MacOSX's dock 很相似,就是顶部没有注释.页面布局和以前一样,您就知道配置有多简单了(这个desklet在它的目录下搜索一个名为icon的文件夹,因此我把图标存放在这个文件夹内):<br />
<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.<br />
<br />
==== 注册 ====<br />
<br />
如果desklet在测试模式下令您满意时,您可以让desklet真正工作,这只要注册.通常这由desklet脚本完成,不是选择测试模式而是选注册模式.desklet一旦注册了,就可以用命令<code><nowiki>adesklets</nowiki></code>,来运行.您可以注册许多个desklet,这样在您运行<code><nowiki>adesklets</nowiki></code>命令时都会运行,在会话添加启动命令也很不错(GNOME下 系统->首选项->会话,选择 启动程序 标签来添加).[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=28421UbuntuHelp:AdeskletsHowto/zh2007-08-14T11:53:39Z<p>Ekeng:/* 设置 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== 获取 ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== 设置 ====<br />
Desklets 起初要手动运行.因为它们通常是python脚本(通常文件名以".py"结尾),可以在[https://help.ubuntu.com/community/BasicCommands 终端] 运行使用命令 "python filename.py" ( 这里的 filename.py 是desklet的脚本,通常跟文档名相近).运行每个desklet都有两种方法,一种是"测试"模式,另一种是"注册",当您运行desklet时.它会提示您选择哪种模式(按相应的键,回车).刚开始您最好选择测试模式,这样您可以看看它长什么样,是否把它放到桌面上.按ctrl-C 可以结束测试模式(这是结束在终端运行程序的标准方法).<br />
<br />
Desklets 是由文本设置的,通常名为config.txt, 可以用任何文本编辑器打开(当desklet在运行时不要打开,因为您做的更改可能会被覆盖).由于每个desklet都不同,不可能都解释设置方法,但文本文件一般都很简单.比如,以下是我使用的一个"modubar" desklet的配置文件,和MacOSX's dock 很相似,就是顶部没有注释.页面布局和以前一样,您就知道配置有多简单了(这个desklet在它的目录下搜索一个名为icon的文件夹,因此我把图标存放在这个文件夹内):<br />
<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=28003UbuntuHelp:AdeskletsHowto/zh2007-07-16T07:00:34Z<p>Ekeng:/* Setting Them Up */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== 获取 ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== 设置 ====<br />
Desklets 起初要手动运行.因为它们通常是python脚本(通常文件名以".py"结尾),可以在[https://help.ubuntu.com/community/BasicCommands 终端] 运行使用命令 "python filename.py" ( 这里的 filename.py 是desklet的脚本,通常跟文档名相近).运行每个desklet都有两种方法,一种是"测试"模式,另一种是"注册",当您运行desklet时.它会提示您选择哪种模式(按相应的键,回车).刚开始您最好选择测试模式,这样您可以看看它长什么样,是否把它放到桌面上.按ctrl-C 可以结束测试模式(这是结束在终端运行程序的标准方法).<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=28002UbuntuHelp:AdeskletsHowto/zh2007-07-16T06:31:43Z<p>Ekeng:/* Getting Them */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== 获取 ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=27790UbuntuHelp:AdeskletsHowto/zh2007-06-29T15:20:55Z<p>Ekeng:/* Getting Them */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.[http://adesklets.sourceforge.net/desklets.html 这里]收集了一些desklets.<br />
<br />
获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=27789UbuntuHelp:AdeskletsHowto/zh2007-06-29T15:04:37Z<p>Ekeng:/* Adesklets */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装 <code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
<br />
Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets [http://adesklets.sourceforge.net/desklets.html here].<br />
<br />
After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=27788UbuntuHelp:AdeskletsHowto/zh2007-06-29T15:04:03Z<p>Ekeng:/* Adesklets */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets 可容易安装.它在 [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] 库里, 您要做的就是安装<code><nowiki>adesklets</nowiki></code> 包.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
<br />
Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets [http://adesklets.sourceforge.net/desklets.html here].<br />
<br />
After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=27787UbuntuHelp:AdeskletsHowto/zh2007-06-29T15:00:02Z<p>Ekeng:/* Set Up */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== 安装 ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets itself is easy to install. It is in the [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] repository, so all you need to do is install the <code><nowiki>adesklets</nowiki></code> package.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
<br />
Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets [http://adesklets.sourceforge.net/desklets.html here].<br />
<br />
After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
[[链接标题]]<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=27786UbuntuHelp:AdeskletsHowto/zh2007-06-29T14:59:17Z<p>Ekeng:/* Introduction */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== 简介 ==<br />
<br />
桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.<br />
<br />
Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.<br />
<br />
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.<br />
<br />
== Set Up ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets itself is easy to install. It is in the [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] repository, so all you need to do is install the <code><nowiki>adesklets</nowiki></code> package.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
<br />
Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets [http://adesklets.sourceforge.net/desklets.html here].<br />
<br />
After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=23292UbuntuHelp:AdeskletsHowto/zh2007-06-26T14:54:22Z<p>Ekeng:</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文. <br />
<br />
== Introduction ==<br />
<br />
The desktop can be a very boring place, especially since Ubuntu likes to use few icons. Even by adding icons, many common tasks such as reading news, checking for new emails and monitoring the system's resources take a few clicks and key presses, the programs can take a while to start, etc.<br />
<br />
Desklets attempt to solve these problems by placing graphical mini-applications (commonly called "applets") onto the desktop, and these desklets can constantly give information from news feeds, system monitors, email accounts and more, and since they are constantly on (yet relatively unobtrusive) it is much quicker to access this information.<br />
<br />
Adesklets takes the approach of providing a few pieces of information to it's desklets (like which X session is being used, what the root window [backdrop] is, etc.) then allowing each desklet to do what it wants.<br />
<br />
<br />
== Set Up ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets itself is easy to install. It is in the [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] repository, so all you need to do is install the <code><nowiki>adesklets</nowiki></code> package.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
<br />
Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets [http://adesklets.sourceforge.net/desklets.html here].<br />
<br />
After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23288UbuntuHelp:AddUsersHowto/zh2007-06-26T14:37:41Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|from=https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
{{Verifier|}}<br />
{{Languages|UbuntuHelp:AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Ubuntu下图形界面 ===<br />
'''转到:''' "系统" > "系统管理" > "用户和组"(''System'' > ''Administration'' > ''Users and Groups'') <br />
<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
按 ''+ 添加用户(Add User)'' , 会打开 ''新建用户帐户(User Account Editor)'' . 至少要用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码. 在 ''用户权限(User privileges)'' 标签中, 添加新用户可访问的权限, 例如 ''使用音频设备(use audio devices)''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Kubuntu 下图形界面===<br />
'''转到:''' K菜单 > 系统设定 > 用户管理(''Kmenu'' > ''System Settings'' > ''Users & Groups'')<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
按 ''管理员模式(Administrator Mode)'', 会弹出一个密码框.输入您的密码.按 新建...(''<u>N</u>ew...''), 会打开 ''用户帐户 -KDE控制模块(User Account - KDE Control Module)''. 至少要有用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码.. 在 ''次要组Secondary Groups'' 区域, 按 选择...(''<u>S</u>elect...''), 然后添加新用户可访问的权限<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== 命令行 ===<br />
添加一个用户您必须使用<code><nowiki>sudo</nowiki></code>命令(for an explanation of what that means, see the RootSudo page). 以下是代码:<br />
<br />
添加一个用户. '''注意:''' 不要使用 useradd 命令.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
查看添加用户的选项可用 <code><nowiki>man</nowiki></code> 命令.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
您可能也需要为您的用户创建一个新组.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
在已存在的组中添加新用户您应该:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
把一个已存在的用户添加到一个已存在的组中您可以使用相同的命令:<br />
<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=23283UbuntuHelp:AdeskletsHowto/zh2007-06-26T14:24:53Z<p>Ekeng:</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}<br />
<br />
Adesklets is a program which allows small monitors and utilities to be placed on the desktop. You may also want to check out Karamba, SuperKaramba, Gkrellm and GDesklets. Whilst these other tools are extremely simple to set up, adesklets takes a bit more configuration, hence the creation of this page. <br />
<br />
== Introduction ==<br />
<br />
The desktop can be a very boring place, especially since Ubuntu likes to use few icons. Even by adding icons, many common tasks such as reading news, checking for new emails and monitoring the system's resources take a few clicks and key presses, the programs can take a while to start, etc.<br />
<br />
Desklets attempt to solve these problems by placing graphical mini-applications (commonly called "applets") onto the desktop, and these desklets can constantly give information from news feeds, system monitors, email accounts and more, and since they are constantly on (yet relatively unobtrusive) it is much quicker to access this information.<br />
<br />
Adesklets takes the approach of providing a few pieces of information to it's desklets (like which X session is being used, what the root window [backdrop] is, etc.) then allowing each desklet to do what it wants.<br />
<br />
<br />
== Set Up ==<br />
<br />
=== Adesklets ===<br />
<br />
Adesklets itself is easy to install. It is in the [https://help.ubuntu.com/community/Repositories/Ubuntu Universe] repository, so all you need to do is install the <code><nowiki>adesklets</nowiki></code> package.<br />
<br />
=== The Desklets Themselves ===<br />
<br />
==== Getting Them ====<br />
<br />
Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets [http://adesklets.sourceforge.net/desklets.html here].<br />
<br />
After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.<br />
<br />
==== Setting Them Up ====<br />
<br />
Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a [https://help.ubuntu.com/community/BasicCommands terminal] in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)<br />
<br />
The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):<br />
<pre><nowiki><br />
id0 = {'bar_background_1': '202020',<br />
'bar_background_2': None,<br />
'bar_foreground': '000000',<br />
'bar_gradient_angle': 0,<br />
'bar_height': 48,<br />
'bar_opacity_1': 100,<br />
'bar_opacity_2': None,<br />
'caption_above': True,<br />
'caption_color': 'FFFFFF',<br />
'caption_delay': 0.10000000000000001,<br />
'caption_fade_in': True,<br />
'caption_fade_in_duration': 0.29999999999999999,<br />
'caption_fade_in_steps': 10,<br />
'caption_font': 'Vera',<br />
'caption_size': 20,<br />
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',<br />
'click_effect_duration': 0.10000000000000001,<br />
'icon_max_height': 148,<br />
'icon_max_width': 148,<br />
'icon_maximize_threshold': 1.0,<br />
'icon_min_height': 96,<br />
'icon_min_width': 96,<br />
'icon_spacing': 5,<br />
'icons': [('terminal.png',<br />
'Terminal', 'gnome-terminal --working-directory /home/chris'),<br />
('home.png', 'Files', 'nautilus /home/chris/Files'),<br />
('evolution.png', 'EMail', 'evolution --component=mail'),<br />
('amarok.png', 'Amarok', 'amarok'),<br />
('listen.png', 'Listen', 'listen'),<br />
('xmms.png', 'XMMS', 'xmms'),<br />
('gimp.png', 'The GIMP', 'gimp'),<br />
('inkscape.png', 'Inkscape', 'inkscape'),<br />
('moho.png', 'Moho', 'moho'),<br />
('abiword.png', 'Abiword', 'abiword'),<br />
('sancho.png', 'Sancho', 'sancho'),<br />
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],<br />
'mod_background_1': 'AAAAAA',<br />
'mod_background_2': None,<br />
'mod_clock_font': 'Vera',<br />
'mod_clock_size': 16,<br />
'mod_font_color': '000000',<br />
'mod_font_opacity': 'FF',<br />
'mod_foreground_1': '000000',<br />
'mod_foreground_2': None,<br />
'mod_gradient_angle': 0,<br />
'mod_opacity_1': 100,<br />
'mod_opacity_2': None,<br />
'module_height': 32,<br />
'modules': [('clock', 1)],<br />
'modules_on': False}<br />
</nowiki></pre><br />
After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.<br />
<br />
==== Registering Them ====<br />
<br />
When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).<br />
<br />
<br />
== Some Final Notes ==<br />
<br />
To kill running desklets (which are registered) you can use:<br />
<pre><nowiki><br />
adesklets -k<br />
</nowiki></pre><br />
To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:<br />
<pre><nowiki><br />
adesklets -c<br />
</nowiki></pre><br />
Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.<br />
<br />
Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AdeskletsHowto/zh&diff=23136UbuntuHelp:AdeskletsHowto/zh2007-06-24T05:08:45Z<p>Ekeng:新页面: {{Translation|}} {{From|https://help.ubuntu.com/community/AdeskletsHowto}} {{Translator|ekeng}} {{Languages|UbuntuHelp:AdeskletsHowto}}</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AdeskletsHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AdeskletsHowto}}</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23015UbuntuHelp:AddUsersHowto/zh2007-06-19T11:54:01Z<p>Ekeng:/* Command-line */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|UbuntuHelp:AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Ubuntu下图形界面 ===<br />
'''转到:''' "系统" > "系统管理" > "用户和组"(''System'' > ''Administration'' > ''Users and Groups'') <br />
<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
按 ''+ 添加用户(Add User)'' , 会打开 ''新建用户帐户(User Account Editor)'' . 至少要用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码. 在 ''用户权限(User privileges)'' 标签中, 添加新用户可访问的权限, 例如 ''使用音频设备(use audio devices)''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Kubuntu 下图形界面===<br />
'''转到:''' K菜单 > 系统设定 > 用户管理(''Kmenu'' > ''System Settings'' > ''Users & Groups'')<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
按 ''管理员模式(Administrator Mode)'', 会弹出一个密码框.输入您的密码.按 新建...(''<u>N</u>ew...''), 会打开 ''用户帐户 -KDE控制模块(User Account - KDE Control Module)''. 至少要有用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码.. 在 ''次要组Secondary Groups'' 区域, 按 选择...(''<u>S</u>elect...''), 然后添加新用户可访问的权限<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== 命令行 ===<br />
添加一个用户您必须使用<code><nowiki>sudo</nowiki></code>命令(for an explanation of what that means, see the RootSudo page). 以下是代码:<br />
<br />
添加一个用户. '''注意:''' 不要使用 useradd 命令.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
查看添加用户的选项可用 <code><nowiki>man</nowiki></code> 命令.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
您可能也需要为您的用户创建一个新组.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
在已存在的组中添加新用户您应该:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
把一个已存在的用户添加到一个已存在的组中您可以使用相同的命令:<br />
<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23013UbuntuHelp:AddUsersHowto/zh2007-06-19T11:10:04Z<p>Ekeng:/* Kubuntu 下图形界面 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Ubuntu下图形界面 ===<br />
'''转到:''' "系统" > "系统管理" > "用户和组"(''System'' > ''Administration'' > ''Users and Groups'') <br />
<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
按 ''+ 添加用户(Add User)'' , 会打开 ''新建用户帐户(User Account Editor)'' . 至少要用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码. 在 ''用户权限(User privileges)'' 标签中, 添加新用户可访问的权限, 例如 ''使用音频设备(use audio devices)''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Kubuntu 下图形界面===<br />
'''转到:''' K菜单 > 系统设定 > 用户管理(''Kmenu'' > ''System Settings'' > ''Users & Groups'')<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
按 ''管理员模式(Administrator Mode)'', 会弹出一个密码框.输入您的密码.按 新建...(''<u>N</u>ew...''), 会打开 ''用户帐户 -KDE控制模块(User Account - KDE Control Module)''. 至少要有用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码.. 在 ''次要组Secondary Groups'' 区域, 按 选择...(''<u>S</u>elect...''), 然后添加新用户可访问的权限<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23012UbuntuHelp:AddUsersHowto/zh2007-06-19T11:02:14Z<p>Ekeng:/* Kubuntu 下图形界面 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Ubuntu下图形界面 ===<br />
'''转到:''' "系统" > "系统管理" > "用户和组"(''System'' > ''Administration'' > ''Users and Groups'') <br />
<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
按 ''+ 添加用户(Add User)'' , 会打开 ''新建用户帐户(User Account Editor)'' . 至少要用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码. 在 ''用户权限(User privileges)'' 标签中, 添加新用户可访问的权限, 例如 ''使用音频设备(use audio devices)''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Kubuntu 下图形界面===<br />
'''转到:''' K菜单 > 系统设定 > 用户管理(''Kmenu'' > ''System Settings'' > ''Users & Groups'')<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
按 ''管理员模式(Administrator Mode)'', 会弹出一个密码框.输入您的密码.按 新建''</u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23011UbuntuHelp:AddUsersHowto/zh2007-06-19T10:57:07Z<p>Ekeng:/* Graphical Kubuntu */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Ubuntu下图形界面 ===<br />
'''转到:''' "系统" > "系统管理" > "用户和组"(''System'' > ''Administration'' > ''Users and Groups'') <br />
<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
按 ''+ 添加用户(Add User)'' , 会打开 ''新建用户帐户(User Account Editor)'' . 至少要用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码. 在 ''用户权限(User privileges)'' 标签中, 添加新用户可访问的权限, 例如 ''使用音频设备(use audio devices)''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Kubuntu 下图形界面===<br />
'''转到:''' 主菜单 > 系统设定 > 用户和组(''Kmenu'' > ''System Settings'' > ''Users & Groups'')<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
按 ''管理员模式(Administrator Mode)'', 会弹出一个密码框.输入您的密码.按 ''<u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23010UbuntuHelp:AddUsersHowto/zh2007-06-19T10:50:45Z<p>Ekeng:/* Graphical Ubuntu */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Ubuntu下图形界面 ===<br />
'''转到:''' "系统" > "系统管理" > "用户和组"(''System'' > ''Administration'' > ''Users and Groups'') <br />
<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
按 ''+ 添加用户(Add User)'' , 会打开 ''新建用户帐户(User Account Editor)'' . 至少要用户名和密码. 用户名'''不能'''使用空格, 也'''不能'''使用 ASCII码. 在 ''用户权限(User privileges)'' 标签中, 添加新用户可访问的权限, 例如 ''使用音频设备(use audio devices)''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Graphical Kubuntu ===<br />
'''Location:''' ''Kmenu'' > ''System Settings'' > ''Users & Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
Press ''Administrator Mode'', this will pop up a password box. Enter your password. Press ''<u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23009UbuntuHelp:AddUsersHowto/zh2007-06-19T10:33:18Z<p>Ekeng:/* Options */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
==选项==<br />
添加一个用户有多种方法,然而,本维基只是简要论述最简单最常见的方法.以下是两种方法:<br />
<br />
* 图形界面<br />
* 命令行 - <code><nowiki>adduser</nowiki></code><br />
图形界面是最简单的,而命令行则用于产生多任务同时运行的可能性.<br />
<br />
=== Graphical Ubuntu ===<br />
'''Location:''' ''System'' > ''Administration'' > ''Users and Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
Press ''+ Add User'', this will open up the ''User Account Editor''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''User privileges'' tab, add privileges that the new user will have access to, such as ''use audio devices''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Graphical Kubuntu ===<br />
'''Location:''' ''Kmenu'' > ''System Settings'' > ''Users & Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
Press ''Administrator Mode'', this will pop up a password box. Enter your password. Press ''<u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23008UbuntuHelp:AddUsersHowto/zh2007-06-19T10:19:36Z<p>Ekeng:/* 信息 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可行的.<br />
<br />
== Options ==<br />
There is more than one way to add a user, however this wiki page will briefly discuss the easiest and most common ways. The two ways shown are:<br />
* Graphical<br />
* Command-line - <code><nowiki>adduser</nowiki></code><br />
Graphical is the easiest solution, while the command-line offers the possibilities of multiple tasks at one time.<br />
<br />
=== Graphical Ubuntu ===<br />
'''Location:''' ''System'' > ''Administration'' > ''Users and Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
Press ''+ Add User'', this will open up the ''User Account Editor''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''User privileges'' tab, add privileges that the new user will have access to, such as ''use audio devices''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Graphical Kubuntu ===<br />
'''Location:''' ''Kmenu'' > ''System Settings'' > ''Users & Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
Press ''Administrator Mode'', this will pop up a password box. Enter your password. Press ''<u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23007UbuntuHelp:AddUsersHowto/zh2007-06-19T10:19:18Z<p>Ekeng:/* Information */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== 信息 ==<br />
当Ubuntu或Kubuntu刚刚安装完成,就会创建一个单独的用户.创建额外的帐户来登录您的系统也是可能的.<br />
<br />
== Options ==<br />
There is more than one way to add a user, however this wiki page will briefly discuss the easiest and most common ways. The two ways shown are:<br />
* Graphical<br />
* Command-line - <code><nowiki>adduser</nowiki></code><br />
Graphical is the easiest solution, while the command-line offers the possibilities of multiple tasks at one time.<br />
<br />
=== Graphical Ubuntu ===<br />
'''Location:''' ''System'' > ''Administration'' > ''Users and Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
Press ''+ Add User'', this will open up the ''User Account Editor''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''User privileges'' tab, add privileges that the new user will have access to, such as ''use audio devices''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Graphical Kubuntu ===<br />
'''Location:''' ''Kmenu'' > ''System Settings'' > ''Users & Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
Press ''Administrator Mode'', this will pop up a password box. Enter your password. Press ''<u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:AddUsersHowto/zh&diff=23006UbuntuHelp:AddUsersHowto/zh2007-06-19T10:12:26Z<p>Ekeng:新页面: {{Translation|}} {{From|https://help.ubuntu.com/community/AddUsersHowto}} {{Translator|ekeng}} {{Languages|AddUsersHowto}} == Information == When Ubuntu and/or Kubuntu are initially ins...</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/AddUsersHowto}}<br />
{{Translator|ekeng}}<br />
<br />
{{Languages|AddUsersHowto}}<br />
<br />
== Information ==<br />
When Ubuntu and/or Kubuntu are initially installed, a single user account was created. It is possible to create additional user logins on your system.<br />
<br />
== Options ==<br />
There is more than one way to add a user, however this wiki page will briefly discuss the easiest and most common ways. The two ways shown are:<br />
* Graphical<br />
* Command-line - <code><nowiki>adduser</nowiki></code><br />
Graphical is the easiest solution, while the command-line offers the possibilities of multiple tasks at one time.<br />
<br />
=== Graphical Ubuntu ===<br />
'''Location:''' ''System'' > ''Administration'' > ''Users and Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser1.png<br />
<br />
Press ''+ Add User'', this will open up the ''User Account Editor''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''User privileges'' tab, add privileges that the new user will have access to, such as ''use audio devices''.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser2.png<br />
<br />
=== Graphical Kubuntu ===<br />
'''Location:''' ''Kmenu'' > ''System Settings'' > ''Users & Groups''<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser3.png<br />
<br />
Press ''Administrator Mode'', this will pop up a password box. Enter your password. Press ''<u>N</u>ew...'', this will open up the ''User Account - KDE Control Module''. The minimum requirements are Username and password. For the Username, do '''not''' use spaces, and '''do''' use ASCII characters. On the ''Secondary Groups'' area, press ''<u>S</u>elect...'', and add priviledges that the new user will have access to.<br />
<br />
https://help.ubuntu.com/community/AddUsersHowto?action=AttachFile&do=get&target=AddUser4.png<br />
<br />
=== Command-line ===<br />
<br />
To add a user you must use the <code><nowiki>sudo</nowiki></code> command (for an explanation of what that means, see the RootSudo page). Here are the commands:<br />
<br />
To add a user. '''NOTE:''' do not use the useradd command.<br />
<pre><nowiki><br />
# sudo adduser <username><br />
</nowiki></pre><br />
<br />
To see the options for adding a user try the <code><nowiki>man</nowiki></code> command.<br />
<pre><nowiki><br />
# man adduser<br />
</nowiki></pre><br />
<br />
You might also wish to create a new group for your users.<br />
<pre><nowiki><br />
# sudo addgroup <groupname><br />
</nowiki></pre><br />
<br />
To add a new user to a existing group you would do this:<br />
<pre><nowiki><br />
# sudo adduser <username> audio<br />
</nowiki></pre><br />
<br />
To add an existing user to an existing group you can use the same command:<br />
<pre><nowiki><br />
# sudo adduser <username> <groupname><br />
</nowiki></pre><br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=23004UbuntuHelp:BootFromUSB/zh2007-06-19T10:06:46Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|from=https://help.ubuntu.com/community/BootFromUSB}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Verifier|}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /''挂载您系统的目录''/dev<br />
sudo chroot /''挂载您系统的目录''<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''挂载您系统的目录''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /''挂载您系统的目录''/boot/initrd.img-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/vmlinuz-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
现在您已经有一个能从您USB驱动器启动的核心了,可以把它放到可启动CD上。您需要下载[ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz 这个 GRUB 源代码包]解压缩后获得其中的"stage2_eltorito"这个文件。现在制作您CD所需要的文件已经集齐了。<br />
<br />
在Live CD的主文件中新建一个文件夹,将其命名为"bootcd"。然后在"bootcd"文件夹中创建另外一个文件夹,命名为"boot"。同样在"boot"文件夹中建一个名为"grub"的文件夹。现在复制stage2_eltorito和menu.lst到这个新建的"grub"文件夹,在"grub"上层文件夹"boot"中,将vmlinuz和initrd文件复制进去。将vmlinuz-<version>文件重命名为简单的"vmlinuz",同样将initrd.img-<version>文件重命名为简单的"initrd.img"(这意味着您等会儿将不需要更改您的配置文件来指向任何新文件名)使用文本编辑器编辑menu.lst文件,查找文件最底部实际OS启动入口所在之处,删除旧的建立两个新的启动入口(如果不正确请将/dev/sda1更改为您的启动分区):<br />
<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
默认会从第一个启动入口启动,您可以随意更改一些其他选项,例如您希望有一个隐藏的目录或者在默认启动入口启动之前有一个不同的等待时间(绝不要将其设置为零,否则您将不能启动恢复模式).这就是您可自启动CD的所有内容,所以现在我们来创建它,打开一个终端窗口(它将默认在主文件夹中)并且运行(所有的命令都在一行中):<br />
<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
现在您有了一个名为UbuntuBootCDForUSB.iso的CD镜像.您可以使用许多常用的CD刻录程序,如内建的Nautilus文件管理器(Ubuntu的默认文件管理器)GnomeBaker,k3b,Nero等将它烧入可写入CD.如果您的CDR/W驱动器不可用(譬如您正在其中运行LiveCD),您可以将CD镜像拷贝到/''挂载您系统的目录''来保证它储存在一个可靠的驱动器上.您同样需要拷贝"bootcd"文件夹,可以使用以下命令:<br />
<br />
<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
现在它们可进入您的/目录(一旦系统装好后就把它们移除,因为这个目录很重要,不应该太杂乱).您可以保存ISO文件到FAT格式的USB盘中(当然不是您刚刚安装Linux的那个),将CD镜像转到Windows下,这样可以用Nero刻录.<br />
<br />
当USB盘插入后现在您只要从您刻录好的CD启动,接着(这取决于GRUB的安装方式)就进入Ubuntu的启动过程.(注意"Waiting for root filesystem" 这行.您成功了!).如果GRUB发生错误,您可按"e"键编辑菜单上的当前的高亮启动命令行.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== 参考 ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html 创建一张可启动的GRUB CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
===评论===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=23003UbuntuHelp:BootFromUSB/zh2007-06-19T10:03:35Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Verifier|}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /''挂载您系统的目录''/dev<br />
sudo chroot /''挂载您系统的目录''<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''挂载您系统的目录''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /''挂载您系统的目录''/boot/initrd.img-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/vmlinuz-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
现在您已经有一个能从您USB驱动器启动的核心了,可以把它放到可启动CD上。您需要下载[ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz 这个 GRUB 源代码包]解压缩后获得其中的"stage2_eltorito"这个文件。现在制作您CD所需要的文件已经集齐了。<br />
<br />
在Live CD的主文件中新建一个文件夹,将其命名为"bootcd"。然后在"bootcd"文件夹中创建另外一个文件夹,命名为"boot"。同样在"boot"文件夹中建一个名为"grub"的文件夹。现在复制stage2_eltorito和menu.lst到这个新建的"grub"文件夹,在"grub"上层文件夹"boot"中,将vmlinuz和initrd文件复制进去。将vmlinuz-<version>文件重命名为简单的"vmlinuz",同样将initrd.img-<version>文件重命名为简单的"initrd.img"(这意味着您等会儿将不需要更改您的配置文件来指向任何新文件名)使用文本编辑器编辑menu.lst文件,查找文件最底部实际OS启动入口所在之处,删除旧的建立两个新的启动入口(如果不正确请将/dev/sda1更改为您的启动分区):<br />
<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
默认会从第一个启动入口启动,您可以随意更改一些其他选项,例如您希望有一个隐藏的目录或者在默认启动入口启动之前有一个不同的等待时间(绝不要将其设置为零,否则您将不能启动恢复模式).这就是您可自启动CD的所有内容,所以现在我们来创建它,打开一个终端窗口(它将默认在主文件夹中)并且运行(所有的命令都在一行中):<br />
<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
现在您有了一个名为UbuntuBootCDForUSB.iso的CD镜像.您可以使用许多常用的CD刻录程序,如内建的Nautilus文件管理器(Ubuntu的默认文件管理器)GnomeBaker,k3b,Nero等将它烧入可写入CD.如果您的CDR/W驱动器不可用(譬如您正在其中运行LiveCD),您可以将CD镜像拷贝到/''挂载您系统的目录''来保证它储存在一个可靠的驱动器上.您同样需要拷贝"bootcd"文件夹,可以使用以下命令:<br />
<br />
<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
现在它们可进入您的/目录(一旦系统装好后就把它们移除,因为这个目录很重要,不应该太杂乱).您可以保存ISO文件到FAT格式的USB盘中(当然不是您刚刚安装Linux的那个),将CD镜像转到Windows下,这样可以用Nero刻录.<br />
<br />
当USB盘插入后现在您只要从您刻录好的CD启动,接着(这取决于GRUB的安装方式)就进入Ubuntu的启动过程.(注意"Waiting for root filesystem" 这行.您成功了!).如果GRUB发生错误,您可按"e"键编辑菜单上的当前的高亮启动命令行.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== 参考 ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html 创建一张可启动的GRUB CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
===评论===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=22974UbuntuHelp:BootFromUSB/zh2007-06-17T05:11:05Z<p>Ekeng:/* 参考 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /''挂载您系统的目录''/dev<br />
sudo chroot /''挂载您系统的目录''<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''挂载您系统的目录''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /''挂载您系统的目录''/boot/initrd.img-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/vmlinuz-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
现在您已经有一个能从您USB驱动器启动的核心了,可以把它放到可启动CD上。您需要下载[ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz 这个 GRUB 源代码包]解压缩后获得其中的"stage2_eltorito"这个文件。现在制作您CD所需要的文件已经集齐了。<br />
<br />
在Live CD的主文件中新建一个文件夹,将其命名为"bootcd"。然后在"bootcd"文件夹中创建另外一个文件夹,命名为"boot"。同样在"boot"文件夹中建一个名为"grub"的文件夹。现在复制stage2_eltorito和menu.lst到这个新建的"grub"文件夹,在"grub"上层文件夹"boot"中,将vmlinuz和initrd文件复制进去。将vmlinuz-<version>文件重命名为简单的"vmlinuz",同样将initrd.img-<version>文件重命名为简单的"initrd.img"(这意味着您等会儿将不需要更改您的配置文件来指向任何新文件名)使用文本编辑器编辑menu.lst文件,查找文件最底部实际OS启动入口所在之处,删除旧的建立两个新的启动入口(如果不正确请将/dev/sda1更改为您的启动分区):<br />
<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
默认会从第一个启动入口启动,您可以随意更改一些其他选项,例如您希望有一个隐藏的目录或者在默认启动入口启动之前有一个不同的等待时间(绝不要将其设置为零,否则您将不能启动恢复模式).这就是您可自启动CD的所有内容,所以现在我们来创建它,打开一个终端窗口(它将默认在主文件夹中)并且运行(所有的命令都在一行中):<br />
<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
现在您有了一个名为UbuntuBootCDForUSB.iso的CD镜像.您可以使用许多常用的CD刻录程序,如内建的Nautilus文件管理器(Ubuntu的默认文件管理器)GnomeBaker,k3b,Nero等将它烧入可写入CD.如果您的CDR/W驱动器不可用(譬如您正在其中运行LiveCD),您可以将CD镜像拷贝到/''挂载您系统的目录''来保证它储存在一个可靠的驱动器上.您同样需要拷贝"bootcd"文件夹,可以使用以下命令:<br />
<br />
<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
现在它们可进入您的/目录(一旦系统装好后就把它们移除,因为这个目录很重要,不应该太杂乱).您可以保存ISO文件到FAT格式的USB盘中(当然不是您刚刚安装Linux的那个),将CD镜像转到Windows下,这样可以用Nero刻录.<br />
<br />
当USB盘插入后现在您只要从您刻录好的CD启动,接着(这取决于GRUB的安装方式)就进入Ubuntu的启动过程.(注意"Waiting for root filesystem" 这行.您成功了!).如果GRUB发生错误,您可按"e"键编辑菜单上的当前的高亮启动命令行.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== 参考 ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html 创建一张可启动的GRUB CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
===评论===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=22973UbuntuHelp:BootFromUSB/zh2007-06-17T05:05:04Z<p>Ekeng:/* 使用Linux内核 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /''挂载您系统的目录''/dev<br />
sudo chroot /''挂载您系统的目录''<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''挂载您系统的目录''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /''挂载您系统的目录''/boot/initrd.img-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/vmlinuz-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
现在您已经有一个能从您USB驱动器启动的核心了,可以把它放到可启动CD上。您需要下载[ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz 这个 GRUB 源代码包]解压缩后获得其中的"stage2_eltorito"这个文件。现在制作您CD所需要的文件已经集齐了。<br />
<br />
在Live CD的主文件中新建一个文件夹,将其命名为"bootcd"。然后在"bootcd"文件夹中创建另外一个文件夹,命名为"boot"。同样在"boot"文件夹中建一个名为"grub"的文件夹。现在复制stage2_eltorito和menu.lst到这个新建的"grub"文件夹,在"grub"上层文件夹"boot"中,将vmlinuz和initrd文件复制进去。将vmlinuz-<version>文件重命名为简单的"vmlinuz",同样将initrd.img-<version>文件重命名为简单的"initrd.img"(这意味着您等会儿将不需要更改您的配置文件来指向任何新文件名)使用文本编辑器编辑menu.lst文件,查找文件最底部实际OS启动入口所在之处,删除旧的建立两个新的启动入口(如果不正确请将/dev/sda1更改为您的启动分区):<br />
<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
默认会从第一个启动入口启动,您可以随意更改一些其他选项,例如您希望有一个隐藏的目录或者在默认启动入口启动之前有一个不同的等待时间(绝不要将其设置为零,否则您将不能启动恢复模式).这就是您可自启动CD的所有内容,所以现在我们来创建它,打开一个终端窗口(它将默认在主文件夹中)并且运行(所有的命令都在一行中):<br />
<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
现在您有了一个名为UbuntuBootCDForUSB.iso的CD镜像.您可以使用许多常用的CD刻录程序,如内建的Nautilus文件管理器(Ubuntu的默认文件管理器)GnomeBaker,k3b,Nero等将它烧入可写入CD.如果您的CDR/W驱动器不可用(譬如您正在其中运行LiveCD),您可以将CD镜像拷贝到/''挂载您系统的目录''来保证它储存在一个可靠的驱动器上.您同样需要拷贝"bootcd"文件夹,可以使用以下命令:<br />
<br />
<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
现在它们可进入您的/目录(一旦系统装好后就把它们移除,因为这个目录很重要,不应该太杂乱).您可以保存ISO文件到FAT格式的USB盘中(当然不是您刚刚安装Linux的那个),将CD镜像转到Windows下,这样可以用Nero刻录.<br />
<br />
当USB盘插入后现在您只要从您刻录好的CD启动,接着(这取决于GRUB的安装方式)就进入Ubuntu的启动过程.(注意"Waiting for root filesystem" 这行.您成功了!).如果GRUB发生错误,您可按"e"键编辑菜单上的当前的高亮启动命令行.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== 参考 ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD| 创建一张可启动的GRUM CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
===评论===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=22972UbuntuHelp:BootFromUSB/zh2007-06-17T03:12:55Z<p>Ekeng:/* See Also */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /''挂载您系统的目录''/dev<br />
sudo chroot /''挂载您系统的目录''<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''挂载您系统的目录''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /''挂载您系统的目录''/boot/initrd.img-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/vmlinuz-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
现在您已经有一个能从您USB驱动器启动的核心了,可以把它放到可启动CD上。您需要下载[ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz 这个 GRUB 源代码包]解压缩后获得其中的"stage2_eltorito"这个文件。现在制作您CD所需要的文件已经集齐了。<br />
<br />
在Live CD的主文件中新建一个文件夹,将其命名为"bootcd"。然后在"bootcd"文件夹中创建另外一个文件夹,命名为"boot"。同样在"boot"文件夹中建一个名为"grub"的文件夹。现在复制stage2_eltorito和menu.lst到这个新建的"grub"文件夹,在"grub"上层文件夹"boot"中,将vmlinuz和initrd文件复制进去。将vmlinuz-<version>文件重命名为简单的"vmlinuz",同样将initrd.img-<version>文件重命名为简单的"initrd.img"(这意味着您等会儿将不需要更改您的配置文件来指向任何新文件名)使用文本编辑器编辑menu.lst文件,查找文件最底部实际OS启动入口所在之处,删除旧的建立两个新的启动入口(如果不正确请将/dev/sda1更改为您的启动分区):<br />
<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
默认会从第一个启动入口启动,您可以随意更改一些其他选项,例如您希望有一个隐藏的目录或者在默认启动入口启动之前有一个不同的等待时间(绝不要将其设置为零,否则您将不能启动恢复模式).这就是您可自启动CD的所有内容,所以现在我们来创建它,打开一个终端窗口(它将默认在主文件夹中)并且运行(所有的命令都在一行中):<br />
<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
现在您有了一个名为UbuntuBootCDForUSB.iso的CD镜像.您可以使用许多常用的CD刻录程序,如内建的Nautilus文件管理器(Ubuntu的默认文件管理器)GnomeBaker,k3b,Nero等将它烧入可写入CD.如果您的CDR/W驱动器不可用(譬如您正在其中运行LiveCD),您可以将CD镜像拷贝到/''挂载您系统的目录''来保证它储存在一个可靠的驱动器上.您同样需要拷贝"bootcd"文件夹,可以使用以下命令:<br />
<br />
<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
现在它们可进入您的/目录(一旦系统装好后就把它们移除,因为这个目录很重要,不应该太杂乱).您可以保存ISO文件到FAT格式的USB盘中(当然不是您刚刚安装Linux的那个),将CD镜像转到Windows下,这样可以用Nero刻录.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== 参考 ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD| 创建一张可启动的GRUM CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
===评论===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=22971UbuntuHelp:BootFromUSB/zh2007-06-17T03:11:56Z<p>Ekeng:/* 使用Linux内核 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /''挂载您系统的目录''/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /''挂载您系统的目录''/dev<br />
sudo chroot /''挂载您系统的目录''<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''挂载您系统的目录''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /''挂载您系统的目录''/boot/initrd.img-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/vmlinuz-<kernelversion> ~<br />
cp /''挂载您系统的目录''/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
现在您已经有一个能从您USB驱动器启动的核心了,可以把它放到可启动CD上。您需要下载[ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz 这个 GRUB 源代码包]解压缩后获得其中的"stage2_eltorito"这个文件。现在制作您CD所需要的文件已经集齐了。<br />
<br />
在Live CD的主文件中新建一个文件夹,将其命名为"bootcd"。然后在"bootcd"文件夹中创建另外一个文件夹,命名为"boot"。同样在"boot"文件夹中建一个名为"grub"的文件夹。现在复制stage2_eltorito和menu.lst到这个新建的"grub"文件夹,在"grub"上层文件夹"boot"中,将vmlinuz和initrd文件复制进去。将vmlinuz-<version>文件重命名为简单的"vmlinuz",同样将initrd.img-<version>文件重命名为简单的"initrd.img"(这意味着您等会儿将不需要更改您的配置文件来指向任何新文件名)使用文本编辑器编辑menu.lst文件,查找文件最底部实际OS启动入口所在之处,删除旧的建立两个新的启动入口(如果不正确请将/dev/sda1更改为您的启动分区):<br />
<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
默认会从第一个启动入口启动,您可以随意更改一些其他选项,例如您希望有一个隐藏的目录或者在默认启动入口启动之前有一个不同的等待时间(绝不要将其设置为零,否则您将不能启动恢复模式).这就是您可自启动CD的所有内容,所以现在我们来创建它,打开一个终端窗口(它将默认在主文件夹中)并且运行(所有的命令都在一行中):<br />
<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
现在您有了一个名为UbuntuBootCDForUSB.iso的CD镜像.您可以使用许多常用的CD刻录程序,如内建的Nautilus文件管理器(Ubuntu的默认文件管理器)GnomeBaker,k3b,Nero等将它烧入可写入CD.如果您的CDR/W驱动器不可用(譬如您正在其中运行LiveCD),您可以将CD镜像拷贝到/''挂载您系统的目录''来保证它储存在一个可靠的驱动器上.您同样需要拷贝"bootcd"文件夹,可以使用以下命令:<br />
<br />
<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
现在它们可进入您的/目录(一旦系统装好后就把它们移除,因为这个目录很重要,不应该太杂乱).您可以保存ISO文件到FAT格式的USB盘中(当然不是您刚刚安装Linux的那个),将CD镜像转到Windows下,这样可以用Nero刻录.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD| 创建一张可启动的GRUM CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
=== Comments ===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=22938UbuntuHelp:BootFromUSB/zh2007-06-13T05:24:09Z<p>Ekeng:/* 使用Linux内核 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''载入您您系统的地方''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD| 创建一张可启动的GRUM CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
=== Comments ===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=22937UbuntuHelp:BootFromUSB/zh2007-06-13T05:23:19Z<p>Ekeng:/* Using a Linux Kernel 使用Linux内核 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng dewafer}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
精简了的Linux内核可以放进一张高密度 (1.44MB) 软盘,但标准的Ubuntu内核则不大可能。而且,标准的Ubuntu内核并没有从USB设备启动所需要的所有驱动程序,因此这些额外的驱动模块必须被放进 "initial RAM disk" 映像 (缩写为 "initrd"),这一映像在启动过程中被复制到RAM ,以使内核能够读取它所包含的那些额外模块。 多数PC都能从CDROM启动,可写的CD能够存储比足够数据更多的内容,这使得Linux和一个initrd可以很容易地被写入其中(这也就是“live CD"的原理),因此我们就将使用这种方法来启动。既然内核和initrd在启动时被复制到了RAM并在那里运行(一旦内核可以读取主要的驱动器,那么以RAM为基础的initrd就不再需要了),启动完毕后就没有必要把CD继续留在光驱里了,所以如果你只有一个CDROM驱动器,那么除了使用live CD时必须用到它,光驱并非一刻也离不开的。 <br />
<br />
那么我们现在已经知道Ubuntu理论上如何才能从CD启动到USB驱动器,下一步应该将其付诸实践了。<br />
<br />
== 通过grub启动 ==<br />
<br />
这是最简单的办法了,从2002-2005就已经被证明适合于数种笔记本电脑。要想检查你的BIOS是否能检测USB驱动器并交付给grub,只需运行grub(如果已经安装,那就在硬盘上运行,也可以从grub启动软件或CD运行)。在grub菜单中,选'c'即可进入命令行模式。现在搜索USB驱动器,用<code><nowiki>root</nowiki></code>命令选择一个驱动器或分区,用<code><nowiki>find</nowiki></code>命令查看是否找到了正确的那一个。可以像下面这个例子一样浏览各个设备:<br />
<br />
<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(如果你有两个内部驱动器,USB驱动器可能是<code><nowiki>hd2,0</nowiki></code>等。)<br />
<br />
或者如果你知道在驱动器上存在某个文件,比如叫作"MYDRIVE",那么只要运行<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
这样grub就可以搜索它能访问的所有驱动器和分区。它会列出<code><nowiki>root</nowiki></code>这一命令使用的正确设备。<br />
<br />
启动这一驱动器,输入如下内容:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
为方便起见,可把这些命令加到你的grub配置中去(通常在<code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
当然如果你的硬盘上没有安装grub,那就把你的grub软盘或CD上的menu.lst改一下。<br />
<br />
如果你在grub的帮助下找不到驱动器,那就只能使用linux内核了,下个部分会有解释。<br />
<br />
== 使用Linux内核==<br />
<br />
你可能使用常规的CD光盘或DVD来安装Ubuntu, 因为您将从包含Linux内核和所有必需的驱动模块的盘片上启动,从而控制您的USB设备.有唯一的不同点应该注意一下,就是这时称您的驱动器为 "/dev/sda"而不是常规的"/dev/hda",这也可以从很多指南中找到.<br />
<br />
一旦使用盘片安装完成,您必须重启进入新的USB系统.这里需要一个可启动的CD.从其他的Ubuntu系统制作这样一个CD是最简单的,从其他的Linux系统更难些,在Windows中制作就相当的难了.从Ubuntu Live CD启动通常最简单的.<br />
<br />
<br />
为了建立您自己的boot CD,您将需要从Live CD内装载您的系统(请参考 [[UbuntuHelp:Mount]])。一旦装载完成,就该把需要的模块加入您的initrd中去了。您可以运行:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
Which will open the text editor with that file. You need to add these lines to the end of the file:<br />
该命令会使用一个文本编辑器打开该文件,您需要在该文件末尾加入下列几行:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(在手动修改的配置文件中加入注释是一个很好的习惯,这样您就不会在以后搞糊涂了)现在可以保存文件并退出文本编辑器了。<br />
<br />
There is one small problem before we carry on. USB drives take a few seconds before they are set up properly by Linux, and your boot would fail before your drive becomes accessible. To sort this we need to tell the initrd to wait a few seconds before it gets carried away and fails. You can do this by running:<br />
在我们继续之前有个小问题,Linux在正确建立USB驱动器之前需要几秒钟时间,在驱动器可用之前启动可能会失败。为了解决这个问题,我们需要告诉initrd在继续启动和失败之前等待几秒钟,您可以通过运行下列代码解决:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
现在在这个文件最顶部加入:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
然后保存文件并退出文本编辑器。<br />
<br />
现在我们已经修正了initrd的设置,我们必须使用这些设置来重新建立使用我们新策略的initrd。如此您必须运行下列代码来进入您的系统:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
现在您已经进入了系统,您可以使用以下代码重新配置Linux来重建您的initrd<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
kernelversion>代表您想重新配置的已安装的Linux版本。Dapper默认是2.6.15-23-386。您也可以使用以下代码查看所有可用的版本(从您的系统中)<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or或者<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
如果重新配置命令运行成功了,您应该会看到一些有关重新建立的initrd、更新的GRUB等的命令行。您能在/boot(在Live的文件系统中的 /''载入您您系统的地方''/boot)中找到新的initrd和相应的内核了,并且名为initrd.img-<kernelversion>和vmlinuz-<kernelversion>。现在按键ctrl-d从chroot中退出。然后您需要用以下命令来复制这些文件到Live CD的主文件夹中,包括一个为启动引导GRUB准备的配置文件。<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== 这个系统的缺点 ===<br />
<br />
当Ubuntu内核更新的时候你并不会注意到,这是因为你仍是从你的CD上运行旧内核。这很容易纠正,只需把"vmlinuz"和"initrd.img"这两个文件用"bootcd/boot"文件夹中的新版本代替,并重新运行上述"sudo mkisofs"命令来创建一个新的映像(新内核将自动包含我们所做的改动,因为我们已经把变化加入到了系统的配置文件中)。将新映像写到磁盘上之后,你就可以用它来启动新内核了。(我不推荐只使用一张CDRW光盘、每次都覆盖写入,因为如果这样无效的话你就会遇到麻烦。我建议使用两张CDRW光盘,更新一张。一旦这张更新光盘已经被检测并可正常使用,那么你就应该更新第二张光盘了。)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD| 创建一张可启动的GRUM CD] - 这是我写这个指南时使用的GNU GRUB的官方文件。<br />
<br />
=== Comments ===<br />
上述指南假设只在一个分区上安装Ubuntu系统。我曾用另一个分区作为/boot,结果遇到了麻烦。为避免这一点,在从/ 一般挂载的Ubuntu系统中创建CD。<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=18610UbuntuHelp:BootFromUSB/zh2007-05-22T06:18:24Z<p>Ekeng:/* Booting via grub */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
A stripped down Linux kernel will fit onto a high density (1.44MB) floppy disk, but the standard Ubuntu kernel doesn't quite. Also, the standard Ubuntu kernel does not have all of the drivers needed to boot a USB drive, thus these extra driver modules must be put into the "initial RAM disk" image (abbreviated to "initrd") which gets copied into the RAM during boot to enable the kernel to access the extra modules it contains. Most PCs can boot from a CDROM drive, and writable CDs can store more than enough data to allow Linux and an initrd to fit comfortably (that's how "live CDs" work) so we will use this method to boot. Since the kernel and initrd get copied into RAM during boot and run from there (the RAM based initrd is not needed once the kernel has access to the main drive anyway) it is not necessary for the CD to be in the drive after booting has finished, so if you only have one CDROM drive it will not be tied up like it would with a live CD.<br />
<br />
So now we know how Ubuntu can be booted from CD into a USB drive in theory, it is time to put it into practice.<br />
<br />
== 通过grub启动 ==<br />
<br />
This is the easiest way, and has been proven to work on several laptops from 2002-2005.<br />
To check if your BIOS is able to detect the USB drive and hand it over to grub, just run grub (from your hard drive if it already installed, or from a grub boot floppy or CD). At the grub menu, hit 'c' to enter command mode. Now search for your USB drive, using the <code><nowiki>root</nowiki></code> command to choose a drive/partition and the <code><nowiki>find</nowiki></code> command to see if you found the right one. You can go through your devices like in this example:<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(If you have 2 internal drives, the USB drive probably is <code><nowiki>hd2,0</nowiki></code> and so on.)<br />
<br />
Or, if you know that there is a file called e.g. "MYDRIVE" on the drive, just run<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
and grub will look through all drives and partitions that it can access. It will list the correct device to use for the <code><nowiki>root</nowiki></code> command.<br />
<br />
Boot the drive by entering:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
For convenience, add these commands to your grub configuration (usually in <code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
Of course, if you don't have grub installed on your hard drive, change the menu.lst on your grub floppy or CD.<br />
<br />
If you are not able to find the drive with the help of grub, you have to use the linux kernel as explained in the next section.<br />
<br />
== Using a Linux Kernel ==<br />
<br />
You can install Ubuntu using a regular CD or DVD, since you will be booting from discs which contain a Linux kernel and all of the driver modules needed to acces your USB drive. The only difference you may notice is that your drive will be called "/dev/sda" instead of the regular "/dev/hda" which you may find in many guides.<br />
<br />
Once the installation has finished using the disc you must reboot into your new USB system. This is where you need a bootable CD. It is easiest to make such a CD from another Ubuntu system, slightly harder from a different Linux system, and quite hard on a Windows system. It is usually easiest to boot from an Ubuntu Live CD.<br />
<br />
To build your own boot CD you will need to mount your system from within the Live CD (this is describe here [[UbuntuHelp:Mount]]). Once that is done it is time to add the needed modules to your initrd. To do this you must run:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
Which will open the text editor with that file. You need to add these lines to the end of the file:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(It is always a good idea to put comments in any manually changed configurations so you don't get confused later) Now save the file and exit gedit.<br />
<br />
There is one small problem before we carry on. USB drives take a few seconds before they are set up properly by Linux, and your boot would fail before your drive becomes accessible. To sort this we need to tell the initrd to wait a few seconds before it gets carried away and fails. You can do this by running:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
Now to this you should add at the very top the lines:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
Then save the file and exit the text editor.<br />
<br />
Now that we have corrected the initrd's setup we must use this setup to rebuild the initrd using our new guidelines. To do this you must enter your system by running:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
Now that you are in your system you can rebuild your initrd by reconfiguring Linux with the command<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
Where <kernelversion> is the version of Linux you have installed that you wish to reconfigure. The default for Dapper is 2.6.15-23-386, but you can see all of the possible versions with (from within your system):<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
If the reconfigure command was successful there should be some lines about rebuilding initrd, updating GRUB, etc. Now you can find your new initrd and matching kernel in /boot of your system (that is /wherever_you_mounted_your_system/boot in the Live CD's system) and they are called initrd.img-<kernelversion> and vmlinuz-<kernelversion>. You should exit from the chroot now by pressing ctrl-d. Now you need to copy these files, along with a configuration file for the bootloader GRUB, to the Live CD's home folder with the commands:<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== Disadvantages Of This System ===<br />
<br />
Whenever Ubuntu's kernel is updated you will not notice. This is because you will still be running the older kernel from your CD. You can fix this easily by replacing the "vmlinuz" and "initrd.img" files by the new ones in the "bootcd/boot" folder and making a new image by rerunning the above "sudo mkisofs" command (new kernels will automatically contain our modifications since we added the changes to the system's configuration files) After writing the new image to disc you can use it to boot into your new kernel (I would not recommend using a single CDRW disc and overwriting it everytime as you will be in trouble if it doesn't work. Instead I suggest using 2 CDRW discs and updating one. Once that updated disc has been tested and it works then you should update the second disc)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD] - This is GNU GRUB's official documentation which I used when writing this guide<br />
<br />
=== Comments ===<br />
The instructions above assume an Ubuntu system in one partition. I had an extra partition for /boot and I ran into some troubles. In order to avoid this, build the CD from an Ubuntu system mounted generally in / .<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=18609UbuntuHelp:BootFromUSB/zh2007-05-22T06:15:23Z<p>Ekeng:/* 如何工作 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== 如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.然而,我们可以从这些在计算机启动系统中固有的限制里得到什么呢?答案是不能.相反我们还要在启动过程增加其他的层通过增加BIOS能访问的软件,接着就可访问USB设备.幸运的是,已经有一款优秀的软件可以读取USB设备,它就是Linux.只要在设备里写入BIOS能识别的Linux内核,我们就可以让Linux内核接管我们想要做的事.另外,一些情况下,''grub''启动引导器可以不用Linux内核而直接工作.<br />
<br />
A stripped down Linux kernel will fit onto a high density (1.44MB) floppy disk, but the standard Ubuntu kernel doesn't quite. Also, the standard Ubuntu kernel does not have all of the drivers needed to boot a USB drive, thus these extra driver modules must be put into the "initial RAM disk" image (abbreviated to "initrd") which gets copied into the RAM during boot to enable the kernel to access the extra modules it contains. Most PCs can boot from a CDROM drive, and writable CDs can store more than enough data to allow Linux and an initrd to fit comfortably (that's how "live CDs" work) so we will use this method to boot. Since the kernel and initrd get copied into RAM during boot and run from there (the RAM based initrd is not needed once the kernel has access to the main drive anyway) it is not necessary for the CD to be in the drive after booting has finished, so if you only have one CDROM drive it will not be tied up like it would with a live CD.<br />
<br />
So now we know how Ubuntu can be booted from CD into a USB drive in theory, it is time to put it into practice.<br />
<br />
== Booting via grub ==<br />
<br />
This is the easiest way, and has been proven to work on several laptops from 2002-2005.<br />
To check if your BIOS is able to detect the USB drive and hand it over to grub, just run grub (from your hard drive if it already installed, or from a grub boot floppy or CD). At the grub menu, hit 'c' to enter command mode. Now search for your USB drive, using the <code><nowiki>root</nowiki></code> command to choose a drive/partition and the <code><nowiki>find</nowiki></code> command to see if you found the right one. You can go through your devices like in this example:<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(If you have 2 internal drives, the USB drive probably is <code><nowiki>hd2,0</nowiki></code> and so on.)<br />
<br />
Or, if you know that there is a file called e.g. "MYDRIVE" on the drive, just run<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
and grub will look through all drives and partitions that it can access. It will list the correct device to use for the <code><nowiki>root</nowiki></code> command.<br />
<br />
Boot the drive by entering:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
For convenience, add these commands to your grub configuration (usually in <code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
Of course, if you don't have grub installed on your hard drive, change the menu.lst on your grub floppy or CD.<br />
<br />
If you are not able to find the drive with the help of grub, you have to use the linux kernel as explained in the next section.<br />
<br />
== Using a Linux Kernel ==<br />
<br />
You can install Ubuntu using a regular CD or DVD, since you will be booting from discs which contain a Linux kernel and all of the driver modules needed to acces your USB drive. The only difference you may notice is that your drive will be called "/dev/sda" instead of the regular "/dev/hda" which you may find in many guides.<br />
<br />
Once the installation has finished using the disc you must reboot into your new USB system. This is where you need a bootable CD. It is easiest to make such a CD from another Ubuntu system, slightly harder from a different Linux system, and quite hard on a Windows system. It is usually easiest to boot from an Ubuntu Live CD.<br />
<br />
To build your own boot CD you will need to mount your system from within the Live CD (this is describe here [[UbuntuHelp:Mount]]). Once that is done it is time to add the needed modules to your initrd. To do this you must run:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
Which will open the text editor with that file. You need to add these lines to the end of the file:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(It is always a good idea to put comments in any manually changed configurations so you don't get confused later) Now save the file and exit gedit.<br />
<br />
There is one small problem before we carry on. USB drives take a few seconds before they are set up properly by Linux, and your boot would fail before your drive becomes accessible. To sort this we need to tell the initrd to wait a few seconds before it gets carried away and fails. You can do this by running:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
Now to this you should add at the very top the lines:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
Then save the file and exit the text editor.<br />
<br />
Now that we have corrected the initrd's setup we must use this setup to rebuild the initrd using our new guidelines. To do this you must enter your system by running:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
Now that you are in your system you can rebuild your initrd by reconfiguring Linux with the command<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
Where <kernelversion> is the version of Linux you have installed that you wish to reconfigure. The default for Dapper is 2.6.15-23-386, but you can see all of the possible versions with (from within your system):<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
If the reconfigure command was successful there should be some lines about rebuilding initrd, updating GRUB, etc. Now you can find your new initrd and matching kernel in /boot of your system (that is /wherever_you_mounted_your_system/boot in the Live CD's system) and they are called initrd.img-<kernelversion> and vmlinuz-<kernelversion>. You should exit from the chroot now by pressing ctrl-d. Now you need to copy these files, along with a configuration file for the bootloader GRUB, to the Live CD's home folder with the commands:<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== Disadvantages Of This System ===<br />
<br />
Whenever Ubuntu's kernel is updated you will not notice. This is because you will still be running the older kernel from your CD. You can fix this easily by replacing the "vmlinuz" and "initrd.img" files by the new ones in the "bootcd/boot" folder and making a new image by rerunning the above "sudo mkisofs" command (new kernels will automatically contain our modifications since we added the changes to the system's configuration files) After writing the new image to disc you can use it to boot into your new kernel (I would not recommend using a single CDRW disc and overwriting it everytime as you will be in trouble if it doesn't work. Instead I suggest using 2 CDRW discs and updating one. Once that updated disc has been tested and it works then you should update the second disc)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD] - This is GNU GRUB's official documentation which I used when writing this guide<br />
<br />
=== Comments ===<br />
The instructions above assume an Ubuntu system in one partition. I had an extra partition for /boot and I ran into some troubles. In order to avoid this, build the CD from an Ubuntu system mounted generally in / .<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=18260UbuntuHelp:BootFromUSB/zh2007-05-18T14:13:57Z<p>Ekeng:</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
==如何工作==<br />
<br />
个人计算机使用一种叫 BIOS(基本输入/输出系统) 的系统来启动机器.过去25年来,虽然很多BIOS已经增加了少数特性,但BIOS系统的作用仍然十分有限,因为只是"启动"过程(即所谓由于计算机已经"pull itself up by its boot straps", 这是一个壮举,现实生活中不可能发生,但是它却恰如其分地描述了由电源开关控制的一个简单的电流可以启动一系列的连锁行为甚至更加复杂的电子行为,直到计算机已经启动和运行.这就是BIOS的关键,还不算太复杂)的一部份.<br />
目前有很多BIOS系统的替代品,例如Amiga Kickstart, 它使用高达50M的ROM芯片来存储操作系统的大部分东西(但是这使在Amiga上启动Linux变得更加困难,因此我们不使用在Kickstart芯片上的AmigaOS),以及最近的EFI系统使用的是基于Intel的苹果操作系统,但是现在的个人计算机仍然停留在BIOS.本指南给那些计算机的"额外特征"没有USB支持的扩展功能的用户.<br />
So, how do we get around these inherent limitations in the computer's boot system? The answer is that we can't. Instead we must add another layer to the bootup procedure by adding a piece of software which the BIOS can access, and which in turn can access the USB drive for us. Luckily there is already an excellent piece of software which can understand USB devices and its name is Linux. As long as there is a Linux kernel on a device which the BIOS can understand then we can let this Linux kernel take over to do what we want. Additionally, in some cases the ''grub'' boot loader can do the job directly, without the need of a linux kernel.<br />
<br />
A stripped down Linux kernel will fit onto a high density (1.44MB) floppy disk, but the standard Ubuntu kernel doesn't quite. Also, the standard Ubuntu kernel does not have all of the drivers needed to boot a USB drive, thus these extra driver modules must be put into the "initial RAM disk" image (abbreviated to "initrd") which gets copied into the RAM during boot to enable the kernel to access the extra modules it contains. Most PCs can boot from a CDROM drive, and writable CDs can store more than enough data to allow Linux and an initrd to fit comfortably (that's how "live CDs" work) so we will use this method to boot. Since the kernel and initrd get copied into RAM during boot and run from there (the RAM based initrd is not needed once the kernel has access to the main drive anyway) it is not necessary for the CD to be in the drive after booting has finished, so if you only have one CDROM drive it will not be tied up like it would with a live CD.<br />
<br />
So now we know how Ubuntu can be booted from CD into a USB drive in theory, it is time to put it into practice.<br />
<br />
== Booting via grub ==<br />
<br />
This is the easiest way, and has been proven to work on several laptops from 2002-2005.<br />
To check if your BIOS is able to detect the USB drive and hand it over to grub, just run grub (from your hard drive if it already installed, or from a grub boot floppy or CD). At the grub menu, hit 'c' to enter command mode. Now search for your USB drive, using the <code><nowiki>root</nowiki></code> command to choose a drive/partition and the <code><nowiki>find</nowiki></code> command to see if you found the right one. You can go through your devices like in this example:<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(If you have 2 internal drives, the USB drive probably is <code><nowiki>hd2,0</nowiki></code> and so on.)<br />
<br />
Or, if you know that there is a file called e.g. "MYDRIVE" on the drive, just run<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
and grub will look through all drives and partitions that it can access. It will list the correct device to use for the <code><nowiki>root</nowiki></code> command.<br />
<br />
Boot the drive by entering:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
For convenience, add these commands to your grub configuration (usually in <code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
Of course, if you don't have grub installed on your hard drive, change the menu.lst on your grub floppy or CD.<br />
<br />
If you are not able to find the drive with the help of grub, you have to use the linux kernel as explained in the next section.<br />
<br />
== Using a Linux Kernel ==<br />
<br />
You can install Ubuntu using a regular CD or DVD, since you will be booting from discs which contain a Linux kernel and all of the driver modules needed to acces your USB drive. The only difference you may notice is that your drive will be called "/dev/sda" instead of the regular "/dev/hda" which you may find in many guides.<br />
<br />
Once the installation has finished using the disc you must reboot into your new USB system. This is where you need a bootable CD. It is easiest to make such a CD from another Ubuntu system, slightly harder from a different Linux system, and quite hard on a Windows system. It is usually easiest to boot from an Ubuntu Live CD.<br />
<br />
To build your own boot CD you will need to mount your system from within the Live CD (this is describe here [[UbuntuHelp:Mount]]). Once that is done it is time to add the needed modules to your initrd. To do this you must run:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
Which will open the text editor with that file. You need to add these lines to the end of the file:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(It is always a good idea to put comments in any manually changed configurations so you don't get confused later) Now save the file and exit gedit.<br />
<br />
There is one small problem before we carry on. USB drives take a few seconds before they are set up properly by Linux, and your boot would fail before your drive becomes accessible. To sort this we need to tell the initrd to wait a few seconds before it gets carried away and fails. You can do this by running:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
Now to this you should add at the very top the lines:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
Then save the file and exit the text editor.<br />
<br />
Now that we have corrected the initrd's setup we must use this setup to rebuild the initrd using our new guidelines. To do this you must enter your system by running:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
Now that you are in your system you can rebuild your initrd by reconfiguring Linux with the command<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
Where <kernelversion> is the version of Linux you have installed that you wish to reconfigure. The default for Dapper is 2.6.15-23-386, but you can see all of the possible versions with (from within your system):<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
If the reconfigure command was successful there should be some lines about rebuilding initrd, updating GRUB, etc. Now you can find your new initrd and matching kernel in /boot of your system (that is /wherever_you_mounted_your_system/boot in the Live CD's system) and they are called initrd.img-<kernelversion> and vmlinuz-<kernelversion>. You should exit from the chroot now by pressing ctrl-d. Now you need to copy these files, along with a configuration file for the bootloader GRUB, to the Live CD's home folder with the commands:<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== Disadvantages Of This System ===<br />
<br />
Whenever Ubuntu's kernel is updated you will not notice. This is because you will still be running the older kernel from your CD. You can fix this easily by replacing the "vmlinuz" and "initrd.img" files by the new ones in the "bootcd/boot" folder and making a new image by rerunning the above "sudo mkisofs" command (new kernels will automatically contain our modifications since we added the changes to the system's configuration files) After writing the new image to disc you can use it to boot into your new kernel (I would not recommend using a single CDRW disc and overwriting it everytime as you will be in trouble if it doesn't work. Instead I suggest using 2 CDRW discs and updating one. Once that updated disc has been tested and it works then you should update the second disc)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD] - This is GNU GRUB's official documentation which I used when writing this guide<br />
<br />
=== Comments ===<br />
The instructions above assume an Ubuntu system in one partition. I had an extra partition for /boot and I ran into some troubles. In order to avoid this, build the CD from an Ubuntu system mounted generally in / .<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=18250UbuntuHelp:BootFromUSB/zh2007-05-18T12:53:32Z<p>Ekeng:</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
本文解释如何从一个不支持USB启动的计算机上启动已安装在USB设备上的Ubuntu系统.<br />
<br />
<br />
== 介绍 ==<br />
如果你把Ubuntu安装在USB设备上,如记忆棒,移动硬盘,通常是不可能在老机器上启动这个系统的.本指南是解释如何制作一个可以加载USB系统的启动CD.<br />
<br />
现在的有些电脑没有从USB启动的BIOS选项(或菜单项),但它们往往都可以检测到USB设备,这种情况下可以用''grub'' 来启动设备. <br />
<br />
== How It Works ==<br />
<br />
PCs use a system called the BIOS (Basic Input/Output System) to start the machine. Even though a few features have been added to many BIOSs over the last 25 years the BIOS system is still extremely limited, as it is part of the "bootup" procedure (so called because the computer has to "pull itself up by its boot straps", a feat which is impossible in real life but aptly describes how a simple electrical current supplied with a power switch can start a chain reaction of activating ever more complex electronics until the computer system is up and running. The BIOS is key to this, so it cannot be very complex). There have been several alternatives for the BIOS system such as the Amiga Kickstart, which uses up to half a megabyte of ROM chips to store large parts of the operating system (although this makes booting Linux on an Amiga slightly more difficult since we do not want the AmigaOS which is in the Kickstart chips) and more recently the EFI system used in Intel based Apple Macs, but for now the PC system is stuck with the BIOS, and this guide is for those of you who's "extra features" don't extend to USB support. So, how do we get around these inherent limitations in the computer's boot system? The answer is that we can't. Instead we must add another layer to the bootup procedure by adding a piece of software which the BIOS can access, and which in turn can access the USB drive for us. Luckily there is already an excellent piece of software which can understand USB devices and its name is Linux. As long as there is a Linux kernel on a device which the BIOS can understand then we can let this Linux kernel take over to do what we want. Additionally, in some cases the ''grub'' boot loader can do the job directly, without the need of a linux kernel.<br />
<br />
A stripped down Linux kernel will fit onto a high density (1.44MB) floppy disk, but the standard Ubuntu kernel doesn't quite. Also, the standard Ubuntu kernel does not have all of the drivers needed to boot a USB drive, thus these extra driver modules must be put into the "initial RAM disk" image (abbreviated to "initrd") which gets copied into the RAM during boot to enable the kernel to access the extra modules it contains. Most PCs can boot from a CDROM drive, and writable CDs can store more than enough data to allow Linux and an initrd to fit comfortably (that's how "live CDs" work) so we will use this method to boot. Since the kernel and initrd get copied into RAM during boot and run from there (the RAM based initrd is not needed once the kernel has access to the main drive anyway) it is not necessary for the CD to be in the drive after booting has finished, so if you only have one CDROM drive it will not be tied up like it would with a live CD.<br />
<br />
So now we know how Ubuntu can be booted from CD into a USB drive in theory, it is time to put it into practice.<br />
<br />
== Booting via grub ==<br />
<br />
This is the easiest way, and has been proven to work on several laptops from 2002-2005.<br />
To check if your BIOS is able to detect the USB drive and hand it over to grub, just run grub (from your hard drive if it already installed, or from a grub boot floppy or CD). At the grub menu, hit 'c' to enter command mode. Now search for your USB drive, using the <code><nowiki>root</nowiki></code> command to choose a drive/partition and the <code><nowiki>find</nowiki></code> command to see if you found the right one. You can go through your devices like in this example:<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(If you have 2 internal drives, the USB drive probably is <code><nowiki>hd2,0</nowiki></code> and so on.)<br />
<br />
Or, if you know that there is a file called e.g. "MYDRIVE" on the drive, just run<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
and grub will look through all drives and partitions that it can access. It will list the correct device to use for the <code><nowiki>root</nowiki></code> command.<br />
<br />
Boot the drive by entering:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
For convenience, add these commands to your grub configuration (usually in <code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
Of course, if you don't have grub installed on your hard drive, change the menu.lst on your grub floppy or CD.<br />
<br />
If you are not able to find the drive with the help of grub, you have to use the linux kernel as explained in the next section.<br />
<br />
== Using a Linux Kernel ==<br />
<br />
You can install Ubuntu using a regular CD or DVD, since you will be booting from discs which contain a Linux kernel and all of the driver modules needed to acces your USB drive. The only difference you may notice is that your drive will be called "/dev/sda" instead of the regular "/dev/hda" which you may find in many guides.<br />
<br />
Once the installation has finished using the disc you must reboot into your new USB system. This is where you need a bootable CD. It is easiest to make such a CD from another Ubuntu system, slightly harder from a different Linux system, and quite hard on a Windows system. It is usually easiest to boot from an Ubuntu Live CD.<br />
<br />
To build your own boot CD you will need to mount your system from within the Live CD (this is describe here [[UbuntuHelp:Mount]]). Once that is done it is time to add the needed modules to your initrd. To do this you must run:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
Which will open the text editor with that file. You need to add these lines to the end of the file:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(It is always a good idea to put comments in any manually changed configurations so you don't get confused later) Now save the file and exit gedit.<br />
<br />
There is one small problem before we carry on. USB drives take a few seconds before they are set up properly by Linux, and your boot would fail before your drive becomes accessible. To sort this we need to tell the initrd to wait a few seconds before it gets carried away and fails. You can do this by running:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
Now to this you should add at the very top the lines:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
Then save the file and exit the text editor.<br />
<br />
Now that we have corrected the initrd's setup we must use this setup to rebuild the initrd using our new guidelines. To do this you must enter your system by running:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
Now that you are in your system you can rebuild your initrd by reconfiguring Linux with the command<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
Where <kernelversion> is the version of Linux you have installed that you wish to reconfigure. The default for Dapper is 2.6.15-23-386, but you can see all of the possible versions with (from within your system):<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
If the reconfigure command was successful there should be some lines about rebuilding initrd, updating GRUB, etc. Now you can find your new initrd and matching kernel in /boot of your system (that is /wherever_you_mounted_your_system/boot in the Live CD's system) and they are called initrd.img-<kernelversion> and vmlinuz-<kernelversion>. You should exit from the chroot now by pressing ctrl-d. Now you need to copy these files, along with a configuration file for the bootloader GRUB, to the Live CD's home folder with the commands:<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== Disadvantages Of This System ===<br />
<br />
Whenever Ubuntu's kernel is updated you will not notice. This is because you will still be running the older kernel from your CD. You can fix this easily by replacing the "vmlinuz" and "initrd.img" files by the new ones in the "bootcd/boot" folder and making a new image by rerunning the above "sudo mkisofs" command (new kernels will automatically contain our modifications since we added the changes to the system's configuration files) After writing the new image to disc you can use it to boot into your new kernel (I would not recommend using a single CDRW disc and overwriting it everytime as you will be in trouble if it doesn't work. Instead I suggest using 2 CDRW discs and updating one. Once that updated disc has been tested and it works then you should update the second disc)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD] - This is GNU GRUB's official documentation which I used when writing this guide<br />
<br />
=== Comments ===<br />
The instructions above assume an Ubuntu system in one partition. I had an extra partition for /boot and I ran into some troubles. In order to avoid this, build the CD from an Ubuntu system mounted generally in / .<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromUSB/zh&diff=18247UbuntuHelp:BootFromUSB/zh2007-05-18T10:06:57Z<p>Ekeng:New page: {{Translation|}} {{From|https://help.ubuntu.com/community/BootFromUSB}} {{Translator|ekeng}} {{Languages|UbuntuHelp:BootFromUSB}} This page explains how to boot an Ubuntu system which is ...</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/BootFromUSB}}<br />
{{Translator|ekeng}}<br />
{{Languages|UbuntuHelp:BootFromUSB}}<br />
<br />
This page explains how to boot an Ubuntu system which is installed on a USB device when the computer does not support USB booting<br />
<br />
== Introduction ==<br />
<br />
If you want to install Ubuntu onto a USB drive, such as a large "USB stick" or an external hard drive it is often impossible to boot this system on slightly older computers. This guide explains how to create a bootable CD which will load the USB system.<br />
<br />
Some recent computers lack the BIOS option (or menu entry) to boot from a USB drive, but they are often capable of detecting the USB drive, in which case ''grub'' can be used to boot the drive.<br />
<br />
== How It Works ==<br />
<br />
PCs use a system called the BIOS (Basic Input/Output System) to start the machine. Even though a few features have been added to many BIOSs over the last 25 years the BIOS system is still extremely limited, as it is part of the "bootup" procedure (so called because the computer has to "pull itself up by its boot straps", a feat which is impossible in real life but aptly describes how a simple electrical current supplied with a power switch can start a chain reaction of activating ever more complex electronics until the computer system is up and running. The BIOS is key to this, so it cannot be very complex). There have been several alternatives for the BIOS system such as the Amiga Kickstart, which uses up to half a megabyte of ROM chips to store large parts of the operating system (although this makes booting Linux on an Amiga slightly more difficult since we do not want the AmigaOS which is in the Kickstart chips) and more recently the EFI system used in Intel based Apple Macs, but for now the PC system is stuck with the BIOS, and this guide is for those of you who's "extra features" don't extend to USB support. So, how do we get around these inherent limitations in the computer's boot system? The answer is that we can't. Instead we must add another layer to the bootup procedure by adding a piece of software which the BIOS can access, and which in turn can access the USB drive for us. Luckily there is already an excellent piece of software which can understand USB devices and its name is Linux. As long as there is a Linux kernel on a device which the BIOS can understand then we can let this Linux kernel take over to do what we want. Additionally, in some cases the ''grub'' boot loader can do the job directly, without the need of a linux kernel.<br />
<br />
A stripped down Linux kernel will fit onto a high density (1.44MB) floppy disk, but the standard Ubuntu kernel doesn't quite. Also, the standard Ubuntu kernel does not have all of the drivers needed to boot a USB drive, thus these extra driver modules must be put into the "initial RAM disk" image (abbreviated to "initrd") which gets copied into the RAM during boot to enable the kernel to access the extra modules it contains. Most PCs can boot from a CDROM drive, and writable CDs can store more than enough data to allow Linux and an initrd to fit comfortably (that's how "live CDs" work) so we will use this method to boot. Since the kernel and initrd get copied into RAM during boot and run from there (the RAM based initrd is not needed once the kernel has access to the main drive anyway) it is not necessary for the CD to be in the drive after booting has finished, so if you only have one CDROM drive it will not be tied up like it would with a live CD.<br />
<br />
So now we know how Ubuntu can be booted from CD into a USB drive in theory, it is time to put it into practice.<br />
<br />
== Booting via grub ==<br />
<br />
This is the easiest way, and has been proven to work on several laptops from 2002-2005.<br />
To check if your BIOS is able to detect the USB drive and hand it over to grub, just run grub (from your hard drive if it already installed, or from a grub boot floppy or CD). At the grub menu, hit 'c' to enter command mode. Now search for your USB drive, using the <code><nowiki>root</nowiki></code> command to choose a drive/partition and the <code><nowiki>find</nowiki></code> command to see if you found the right one. You can go through your devices like in this example:<pre><nowiki><br />
grub> root (hd0,0) # first harddrive, first partition<br />
grub> find /[tab] # type the slash then press [tab], and it will try to list files on this partition<br />
Error 17: Cannot mount selected partition # Oops no file system here<br />
grub> root (hd0,1) # first harddrive, second partition<br />
grub> find /[tab]<br />
Possible files are: lost+found var etc media ... # That was my hard drive with my linux install<br />
grub> root (hd1,0) # second hard drive usually is the USB drive if you have only one internal drive<br />
grub> find /[tab]<br />
Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg # Bingo, that's the USB stick<br />
</nowiki></pre><br />
(If you have 2 internal drives, the USB drive probably is <code><nowiki>hd2,0</nowiki></code> and so on.)<br />
<br />
Or, if you know that there is a file called e.g. "MYDRIVE" on the drive, just run<br />
<pre><nowiki><br />
grub> find /MYDRIVE<br />
</nowiki></pre><br />
and grub will look through all drives and partitions that it can access. It will list the correct device to use for the <code><nowiki>root</nowiki></code> command.<br />
<br />
Boot the drive by entering:<br />
<pre><nowiki><br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
For convenience, add these commands to your grub configuration (usually in <code><nowiki>/boot/grub/menu.lst</nowiki></code>):<br />
<pre><nowiki><br />
title Boot USB drive<br />
root (hd1,0)<br />
chainloader +1<br />
boot<br />
</nowiki></pre><br />
Of course, if you don't have grub installed on your hard drive, change the menu.lst on your grub floppy or CD.<br />
<br />
If you are not able to find the drive with the help of grub, you have to use the linux kernel as explained in the next section.<br />
<br />
== Using a Linux Kernel ==<br />
<br />
You can install Ubuntu using a regular CD or DVD, since you will be booting from discs which contain a Linux kernel and all of the driver modules needed to acces your USB drive. The only difference you may notice is that your drive will be called "/dev/sda" instead of the regular "/dev/hda" which you may find in many guides.<br />
<br />
Once the installation has finished using the disc you must reboot into your new USB system. This is where you need a bootable CD. It is easiest to make such a CD from another Ubuntu system, slightly harder from a different Linux system, and quite hard on a Windows system. It is usually easiest to boot from an Ubuntu Live CD.<br />
<br />
To build your own boot CD you will need to mount your system from within the Live CD (this is describe here [[UbuntuHelp:Mount]]). Once that is done it is time to add the needed modules to your initrd. To do this you must run:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/modules<br />
</nowiki></pre><br />
Which will open the text editor with that file. You need to add these lines to the end of the file:<br />
<pre><nowiki><br />
usbcore<br />
sd_mod<br />
ehci_hcd<br />
uhci_hcd<br />
ohci_hcd<br />
usb-storage<br />
scsi_mod<br />
</nowiki></pre><br />
(It is always a good idea to put comments in any manually changed configurations so you don't get confused later) Now save the file and exit gedit.<br />
<br />
There is one small problem before we carry on. USB drives take a few seconds before they are set up properly by Linux, and your boot would fail before your drive becomes accessible. To sort this we need to tell the initrd to wait a few seconds before it gets carried away and fails. You can do this by running:<br />
<pre><nowiki><br />
gksudo gedit /wherever_you_have_mounted_your_system/etc/mkinitramfs/initramfs.conf<br />
</nowiki></pre><br />
Now to this you should add at the very top the lines:<br />
<pre><nowiki><br />
WAIT=15<br />
</nowiki></pre><br />
Then save the file and exit the text editor.<br />
<br />
Now that we have corrected the initrd's setup we must use this setup to rebuild the initrd using our new guidelines. To do this you must enter your system by running:<br />
<pre><nowiki><br />
sudo mount --bind /dev /wherever_you_have_mounted_your_system/dev<br />
sudo chroot /wherever_you_have_mounted_your_system<br />
mount -a<br />
</nowiki></pre><br />
Now that you are in your system you can rebuild your initrd by reconfiguring Linux with the command<br />
<pre><nowiki><br />
dpkg-reconfigure linux-image-<kernelversion><br />
</nowiki></pre><br />
Where <kernelversion> is the version of Linux you have installed that you wish to reconfigure. The default for Dapper is 2.6.15-23-386, but you can see all of the possible versions with (from within your system):<br />
<pre><nowiki><br />
apt-cache search linux-image-2.6<br />
</nowiki></pre><br />
Or<br />
<pre><nowiki><br />
ls /lib/modules<br />
</nowiki></pre><br />
If the reconfigure command was successful there should be some lines about rebuilding initrd, updating GRUB, etc. Now you can find your new initrd and matching kernel in /boot of your system (that is /wherever_you_mounted_your_system/boot in the Live CD's system) and they are called initrd.img-<kernelversion> and vmlinuz-<kernelversion>. You should exit from the chroot now by pressing ctrl-d. Now you need to copy these files, along with a configuration file for the bootloader GRUB, to the Live CD's home folder with the commands:<br />
<pre><nowiki><br />
cp /wherever_your_system_is_mounted/boot/initrd.img-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/vmlinuz-<kernelversion> ~<br />
cp /wherever_your_system_is_mounted/boot/grub/menu.lst ~<br />
</nowiki></pre><br />
Now that you have a kernel which can boot your USB drive it is time to put it on a bootable CD. You will need to download [ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz this archive of the GRUB source code] and extract it to obtain the "stage2_eltorito" file inside. Now that you have the needed files we can make your CD.<br />
<br />
Make a folder in the Live CD's home folder called "bootcd", then inside there make another called "boot" and inside there one called "grub". Now copy the stage2_eltorito and menu.lst to this new "grub" folder and copy the vmlinuz and initrd files into the "boot" folder above it. Rename the vmlinuz-<version> file to simply "vmlinuz" and the initrd.img-<version> file to simply "initrd.img" (this means you won't have to change your configuration later to point to any new filenames) Edit the menu.lst file with the text editor and look at the bottom where the actual OS entries are. Delete what is there and make two new entries (replace /dev/sda1 with your root partition if this is not correct):<br />
<pre><nowiki><br />
title Ubuntu<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img<br />
boot<br />
<br />
title Ubuntu Recovery Mode<br />
root (cd)<br />
kernel /boot/vmlinuz root=/dev/sda1 ro single<br />
initrd /boot/initrd.img<br />
boot<br />
</nowiki></pre><br />
By default the top entry will be booted. You can change some of the other options here if you want a hidden menu or a different timeout before the default entry is booted (never set this to zero or you will not be able to enter recovery mode). That is the entire contents of your bootable CD, so now we have to build it. Open a terminal (by default it will be in the home folder) and run (all on one line):<br />
<pre><nowiki><br />
sudo mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o UbuntuBootCDForUSB.iso bootcd<br />
</nowiki></pre><br />
You should now have a CD image called UbuntuBootCDForUSB.iso which you can write to a recordable CD using many common CD writing programs such as the one built into the Nautilus file manager (Ubuntu's default file manager), GnomeBaker, k3b, Nero and many more. If you don't have your CDR/W drive accessible (because you are running a LiveCD in it) then you can copy the CD image to /wherever_you_have_mounted_your_system to keep it safely stored on a real drive. You should also copy over the "bootcd" folder. This can be done with:<br />
<pre><nowiki><br />
sudo cp UbuntuBootCDForUSB.iso /wherever_you_have_mounted_your_system<br />
sudo cp -r bootcd /wherever_you_have_mounted_your_system<br />
</nowiki></pre><br />
They will now be accessible in your / directory (move them out of there once your system is set up as this is an important directory and should not be cluttered). You can save the iso file to a FAT formatted USB stick (obviously not one you have just set up with Linux) to transfer the CD image to Windows where it can be written by Nero.<br />
<br />
Now you just have to boot off the CD you have written whilst your USB drive is plugged in and (depending on how you set up GRUB) you will be sent into Ubuntu's boot procedure. (Notice the "Waiting for root filesystem" line? You did that!). If GRUB gives an error then you can edit the bootup lines by pressing "e" with the right entry highlighted in the menu.<br />
<br />
=== Disadvantages Of This System ===<br />
<br />
Whenever Ubuntu's kernel is updated you will not notice. This is because you will still be running the older kernel from your CD. You can fix this easily by replacing the "vmlinuz" and "initrd.img" files by the new ones in the "bootcd/boot" folder and making a new image by rerunning the above "sudo mkisofs" command (new kernels will automatically contain our modifications since we added the changes to the system's configuration files) After writing the new image to disc you can use it to boot into your new kernel (I would not recommend using a single CDRW disc and overwriting it everytime as you will be in trouble if it doesn't work. Instead I suggest using 2 CDRW discs and updating one. Once that updated disc has been tested and it works then you should update the second disc)<br />
<br />
== See Also ==<br />
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html Building a bootable GRUB CD] - This is GNU GRUB's official documentation which I used when writing this guide<br />
<br />
=== Comments ===<br />
The instructions above assume an Ubuntu system in one partition. I had an extra partition for /boot and I ran into some troubles. In order to avoid this, build the CD from an Ubuntu system mounted generally in / .<br />
<br />
* Thanks for the info, I added a line to bind /dev to the chroot and a mount -a command, which should take care of that. A /boot partition becomes basically redundant if you use this LiveCD method, so I don't think it would be a common situation. Personally I have only made /boot seperate when using LVM, but with a few extra modules this CD could boot directly to LVM, I may add that later (the CD image is tiny, so more features wouldn't hurt).<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=Linux%E4%B8%8D%E6%98%AFWindows/zh&diff=18246Linux不是Windows/zh2007-05-18T09:51:33Z<p>Ekeng:</p>
<hr />
<div>{{Translation}}<br />
{{From|http://linux.oneandoneis2.org/LNW.htm}}<br />
{{Translator|laborer ekeng}}<br />
{{Verifier|Leal}}<br />
{{Languages|Linux不是Windows}}<br />
<br />
<center class=""><br />
<p><i>以下文章中,我将用一个词Linux来囊括GNU/Linux操作系统和各种FOSS(译注:自由和开源软件,Free / Open Source Software)项目,这样读起来会顺畅些。<br />
</i><br />
</p><br />
<h1>[[image:tux.png]] != [[image:windows.png]]<br />
<br><br />
(Linux不是Windows)</h1><br />
<p style="text-align: center;"><small>[http://geekblog.oneandoneis2.org/index.php/2005/12/31/derived_works_aamp_translations Derived works]</small></p><br />
<div style="text-align: justify;"><br />
<p class="MsoNormal"><span style=""><br />
<br />
如果你在看此文,对于一个对Linux有太多疑问的Linux新手来说,这会是使你一步一步从Windows 转换到Linux.的机会.对于很多人这会产生很多问题,因此才有了这篇文章.<br />
许多个别问题源于这个问题,所以本文细分为多方面的问题.</span></p><br />
<br />
<br />
<br />
<h3><b><span style="">问题 一: Linux跟 Windows根本不一样.</span></b></h3><br />
<br />
<p class="MsoNormal"><span style=""><br />
<br />
<br />
你会很惊讶这么多人有这样的抱怨,他们使用Linux,只是期望找到一个基本是 [http://www.reactos.com/ 免费的,开源的Windows版本.] 很多时候,这都是那些过度热衷于Linux的使用者告诉他们的. 但是,这只是似是而非的希望.<br />
</span></p><br />
<br />
<p class="MsoNormal"><span style=""><br />
人们尝试Linux的原因多种多样,但是普遍的原因归总起来就一条:他们希望linux会比windows更优秀。通常用以衡量(linux的)成功的标准是成本、选择权、性能和安全性。(当然)还有许多其它的(标准)。但是每一个尝试Linux的Windows用户都是(从这些方面考虑),因为他们希望Linux在这些方面胜过他们(从Windows)得到的。<br />
</span></p><br />
<br />
<p class="MsoNormal"><span style=""><br />
这正是问题之所在。</span></p><br />
<br />
<p class="MsoNormal"><span style="">从逻辑上来讲,不可能在保持一样东西完全等效的情况下而把它做得更好。一个完美的拷贝可能是等价的,但是它不可能有超越。所以当你尝试Linux而希望它能够做的更好,你无可避免的发现它会不同。太多的人都忽略了这么一个事实,并且把两个操作系统之间的不同看作是Linux的不足。</span></p><br />
<br />
<p class="MsoNormal"><span style=""><br />
说一个简单的例子,想一想驱动程序的升级吧:典型的情况下某人在windows下升级一个硬件的驱动,它需要去硬件制造商的网站下载新的驱动;然而在Linux下你(只是)需要升级你的内核。</span></p><br />
<br />
<p class="MsoNormal"><span style=""><br />
这意味着在Linux下一次下载和升级会给你提供(所有)你的机器适用的最新驱动程序,然而在Windows下你却不得不浏览多个网站并分别下载升级程序。这是一个完全不同的过程,不过当然这样也不坏。但是很多人却抱怨这一点,因为这不是他们习惯的方式。</span></p><br />
<br />
<p class="MsoNormal"><br />
还有,另一个你接触得更多的例子,想一想Firefox:开源软件的伟大成功故事中的一个。一个席卷全球的网络浏览器。它是通过模仿IE,那个“最流行的浏览器”而取得成功的吗?<br />
</p><br />
<br />
<p class="MsoNormal"><br />
不是的,它更加成功是因为它比IE <span style="font-style: italic;">更好</span> , 它之所以 <span style="font-style: italic;">更好</span> 是因为它 <span style="font-style: italic;">不同</span>. 它有标签式浏览,实时书签,内建搜索条,PNG支持,adblock扩展,以及其他美妙的东西。 它能在底部显示一个<span style="font-style: italic;">"查找"</span>工具条,它能够查找你键入的内容并且以红色显示出相符的内容。 IE没有标签页浏览,没有RSS功能,搜索条仅仅能通过第三方扩展实现,它的查找对话框还得通过点击 <span style="font-style: italic;">"确认"</span>按钮开始查找,而且还要点击<span style="font-style: italic;">"确认"</span>才能清除<span style="font-style: italic;">"未发现" </span>错误提示。这是一个清楚的无可置疑的证明,它证明了一个开源应用程序通过“不同”而做到了“更好”,靠“更好”而取得了成功。如果FF是一个IE的克隆,它将会消逝得微不足道。如果Linux是一个Windows的克隆,同样的事情也会发生在Linux身上。<span style=""><br />
</span></p><br />
<br />
<p><span style=""><br />
那么解决问题一的方案:记住Linux中那些相对你的习惯来说熟悉的和相同的部分,Linux <span style="font-weight: bold;">不是</span> 新版的 &amp; 改进版的(windows)。 欢迎来到这个什么都不一样的地方,因为只有这里它才有机会变得杰出。</span></p><br />
<br />
<h3><span style=""></span><span style=""><b>问题二 : Linux和Windows <span style="font-style: italic;">太</span>不一样了</b></span></h3><br />
<br />
<p class="MsoNormal"><span style=""><br />
接下来的一个问题是当人们能够预期Linux的不同时,却发现有一些差异实在是太激进以至超过了他们的喜好程度。也许最典型的例子就是可供linux用户的选择实在是太多了。一个初用的Windows用户有一个经典或XP风格的桌面,并且已经安装有一个写字板程序,Internet Explorer浏览器,Outlook Express程序,然而一个初用Linux的用户却有上百种发行版可以选择,于是就有Gnome或者KDE或者Fluxbox或者什么的桌面,Vi或者emacs或者kate什么的文字处理软件,Konqueror或者Opera或者Firefox或者Mozilla浏览器,如此等等不一而足。</span></p><br />
<br />
<p class="MsoNormal"><span style=""><br />
windows用户不曾为了得到和运行(一个OS)而作出过如此丰富的选择, <i>"有必要有那么多种选项吗?"</i> 这样的恼火帖子很常见。</span></p><br />
<p class="MsoNormal">Linux<i><span style="">真的</span></i><span style="">和Windows有那么大的区别吗?不管怎么说,它们都是操作系统。它们都做同样的工作:操作你的计算机,让你有个东西运行你的应用程序,自然它们多少都有些共通的地方吧? </span></p><br />
<p class="MsoNormal"><span style="">让我们从这个角度看问题:出门看看路上行驶的各种不同的车辆。所有的车辆不管是什么样的设计多少都有同样的目的:从路上把你由A处运到B处。注意它们有不同的设计。</span></p><br />
<p class="MsoNormal"><span style="">但是你会想,汽车之间的差异非常小:它们都有方向盘,脚踏板,变速杆,手闸,车窗和车门,油箱……如果你能够开这部车,你就能开任何一部车!</span></p><br />
<p class="MsoNormal"><span style="">确实如此。但是你没看见过有些人不开汽车,取而代之他们骑摩托车?</span></p><br />
<p class="MsoNormal"><span style="">从一个版本的windows切换到另一个版本就像从一辆汽车换到另外一辆汽车。Win95到Win98,老实说我说不出什么区别。Win98到WinXp,区别比较大但是也没有什么真正的重大区别。</span></p><br />
<p class="MsoNormal"><span style="">但是从windows切换到Linux就象从开汽车切换到骑摩托车。他们都是<b style="color: rgb(51, 51, 255);">操作系统/道路车辆</b><span style="color: rgb(51, 51, 255);">.</span> 他们可能都使用同样的 <b style="color: rgb(51, 51, 255);">硬件/道路</b><span style="color: rgb(51, 51, 255);">.</span> 他们可能都 <b style="color: rgb(51, 51, 255);">提供一个运行应用程序的环境/把你从A处运到B处</b><span style="color: rgb(51, 51, 255);">.</span>但是他们从本质上使用不同的方法达到这样的目的。</span></p><br />
<p class="MsoNormal"><b style="color: rgb(51, 51, 255);"><span style="">Windows/汽车</span></b><span style="">对于<b style="color: rgb(51, 51, 255);">病毒/小偷</b>并不安全,除非你<b style="color: rgb(51, 51, 255);">安装反病毒软件/锁上车门</b><span style="color: rgb(51, 51, 255);">. </span><b style="color: rgb(51, 51, 255);">Linux/摩托车</b>却没有<b style="color: rgb(51, 51, 255);">病毒/车门</b>,所以即使你没有<b style="color: rgb(51, 51, 255);">安装反病毒软件/锁车门</b><span style="color: rgb(51, 51, 255);">.</span></span></p>也非常安全。<br />
<br />
<p class="MsoNormal"><span style="">让我们反过来看一看:</span></p><br />
<br />
<p class="MsoNormal"><b style="color: rgb(51, 51, 255);"><span style="">Linux/汽车</span></b><span style=""><br />
从根本上用于多<b style="color: rgb(51, 51, 255);">用户/乘客</b><span style="color: rgb(51, 51, 255);">. </span><b style="color: rgb(51, 51, 255);">Windows/摩托车</b><br />
用于单 <b style="color: rgb(51, 51, 255);">用户/乘客</b>.<br />
每个 <b style="color: rgb(51, 51, 255);">Windows<br />
用户/摩托车驾驶员</b><span style="color: rgb(51, 51, 255);"><br />
</span>每时每刻都要习惯集中精力控制他的 <b style="color: rgb(51, 51, 255);">计算机/车辆</b><br />
<br />
. 而一个 <b style="color: rgb(51, 51, 255);">Linux<br />
用户/汽车乘客</b> 只要在<b style="color: rgb(51, 51, 255);">以根用户登录/坐在驾驶座上</b>时才要习惯去控制他的 <b style="color: rgb(51, 51, 255);">计算机/车辆</b>.</span></p><br />
<p class="MsoNormal"><span style="">Two<br />
different<br />
approaches to fulfilling the same goal. They differ in fundamental<br />
ways. They<br />
have different strengths and weaknesses: A car is the clear winner at<br />
transporting a family &amp; a lot of cargo from A to B: More seats<br />
&amp; more<br />
storage space. A motorbike is the clear winner at getting one person<br />
from A to B:<br />
Less affected by congestion and uses less fuel.</span></p><br />
<p class="MsoNormal"><span style="">There are<br />
many<br />
things that <b>don't</b> change when you switch between<br />
cars and motorbikes:<br />
You still have to put petrol in the tank, you still have to drive on<br />
the same<br />
roads, you still have to obey the traffic lights and Stop signs, you<br />
still have<br />
to indicate before turning, you still have to obey the same speed<br />
limits.</span></p><br />
<br />
<p class="MsoNormal"><span style="">But there<br />
are also many<br />
things that <b>do</b> change: Car drivers don't have to<br />
wear crash helmets,<br />
motorbike drivers don't have to put on a seatbelt. Car drivers have to<br />
turn the<br />
steering wheel to get around a corner, motorbike drivers have to lean<br />
over. Car<br />
drivers accelerate by pushing a foot-pedal, motorbike drivers<br />
accelerate by<br />
twisting a hand control.</span></p><br />
<p class="MsoNormal"><span style="">A<br />
motorbike driver<br />
who tries to corner a car by leaning over is going to run into problems<br />
very<br />
quickly. And Windows users who try to use <b>their</b><br />
existing skills and<br />
habits generally also find themselves having many issues. In fact,<br />
Windows<br />
"Power Users" frequently have <i>more</i> problems with<br />
Linux than<br />
people with little or no computer experience, for this very reason.<br />
Typically,<br />
the most vehement <i>"Linux is not ready for the desktop yet"</i><br />
arguments come from ingrained Windows users who reason that if <b>they</b><br />
<br />
couldn't make the switch, a less-experienced user has no chance. But<br />
this is<br />
the exact opposite of the truth.</span></p><br />
<p class="MsoNormal"><span style="">So, to<br />
avoid problem<br />
#2: Don't assume that being a knowledgeable Windows user means you're a<br />
knowledgeable Linux user: When you first start with Linux, you are a<br />
novice.</span></p><br />
<p class="MsoNormal"><span style=""></span></p><br />
<br />
<h3><b><span style="">问题三: 文化冲击</span></b><span style="font-weight: bold;"></span></h3><br />
<br />
<h3><span style="font-weight: bold;">Subproblem #3a: There <span style="font-style: italic;">is</span> a culture</span><b><span style=""></span></b><span style=""></span></h3><br />
<br />
<p class="MsoNormal"><span style="">Windows<br />
users are<br />
more or less in a customer-supplier relationship: They pay for<br />
software, for<br />
warranties, for support, and so on. They expect software to have a<br />
certain<br />
level of usability. They are therefore used to having rights with their<br />
software: They have paid for technical support and have every right to<br />
demand<br />
that they receive it. They are also used to dealing with entities<br />
rather than<br />
people: Their contracts are with a company, not with a person.</span></p><br />
<p class="MsoNormal"><span style="">Linux<br />
users are in<br />
more of a community. They don't have to buy the software, they don't<br />
have to<br />
pay for technical support. They download software for free &amp;<br />
use Instant<br />
Messaging and web-based forums to get help. They deal with people, not<br />
corporations.</span></p><br />
<br />
<p class="MsoNormal"><span style="">A Windows<br />
user will<br />
not endear himself by bringing his habitual&nbsp;attitudes over to<br />
Linux, to<br />
put it mildly.</span></p><br />
<p class="MsoNormal"><span style="">The<br />
biggest cause of<br />
friction tends to be in the online interactions: A "3a" user new to<br />
Linux asks<br />
for help with a problem he's having. When he doesn't get that help at<br />
what he<br />
considers an acceptable rate, he starts complaining and demanding more<br />
help.<br />
Because that's what he's used to doing with paid-for tech support.<br />
The<br />
problem&nbsp;is<br />
that this <i>isn't</i> paid-for support. This is a bunch<br />
of volunteers who are<br />
willing to help people with problems out of the goodness of their<br />
hearts. The<br />
new user has no right to demand anything from them, any more than<br />
somebody<br />
collecting for charity can demand larger donations from contributors.</span></p><br />
<p class="MsoNormal"><span style="">In much<br />
the same way, a<br />
Windows user is used to using commercial software. Companies don't<br />
release<br />
software until it's reliable, functional, and user-friendly enough. So<br />
this is<br />
what a Windows user tends to expect from software: It starts at version<br />
1.0.&nbsp;Linux<br />
software,<br />
however, tends to get released almost as soon as it's written: It<br />
starts at<br />
version 0.1. This way, people who really need the functionality can get<br />
it<br />
ASAP; interested developers can get involved in helping improve the<br />
code; and<br />
the community as a whole stays aware of what's going on.</span></p><br />
<p class="MsoNormal"><span style="">If a "3a"<br />
user runs<br />
into trouble with Linux, he'll complain: The software hasn't met his<br />
standards,<br />
and he thinks he has a right to expect that standard. His mood won't be<br />
improved when he gets sarcastic replies like <i>"I'd demand a<br />
refund if I<br />
were you"</i></span></p><br />
<p class="MsoNormal"><span style="">So, to<br />
avoid problem<br />
#3a: Simply remember that you haven't paid the developer who wrote the<br />
software<br />
or the people online who provide the tech support. They don't owe you<br />
anything.</span></p><br />
<br />
<p class="MsoNormal"><span style=""></span><b><span style=""></span></b></p><br />
<br />
3.其他问题:这是一种文化<br />
<br />
<p class="MsoNormal"><span style="">WINDOWS用户或多或少的处在一种消费者和提供者的关系,他们花钱买软件,获得授权,得到支持等等.他们希望软件能够有明确的可用性.因此他们习惯得到使用软件的权利,他们花钱去得到技术上的支持以及他们需要的权利,他们也得到了.他们也经常要与一些实体打交道:例如他们与一家公司签一份合同,而不是个人.</span></p><br />
<br />
<br />
<p class="MsoNormal"><span style="">LINUX用户有着更多的一致性.他们不需要花钱去买软件,不需要为得到技术上的支持而耗费财力.他们免费下载软件,并且利用快速通信和到论坛去寻求帮助.他们和个人打交道,而不是公司.</span></p><br />
<br />
<br />
<p class="MsoNormal"><span style="">一个Windows的用户如果只是把他的观点带到Linux中,那么他是不会喜欢上Linux的.要慢慢的改变观点. </span></p><br />
<br />
<br />
<p class="MsoNormal"><span style="">引起矛盾的最大原因是在在线交流方面:一个刚刚用Linux的3a用户在遇到问题时寻求帮助,当他没有得到他可以接受的答案的时候,他便开始抱怨并且想要得到更多的帮助.因为这正是他以前用付费的来获得帮助的方式.问题就是这不是付费提供帮助的系统.而是很多热心人发自内心的帮助其他人解决问题的系统.一个新的用户没有任何权利去向这些热心人索要帮助,这就如同一个想要得到施舍的人,还要求从捐赠者那里获得更多的捐赠品一样.</span></p><br />
<br />
<br />
<p class="MsoNormal"><span style="">相同的,一个Windows用户习惯了使用商业软件. 这些软件在没有做到足够的可靠性,功能性和对用户友好的截面前,公司是不会开放代码的.这正是Windows用户期待Linux下的软件的原因,从Linux1.0版本的软件开始,用户就希望尽快得到开放的代码.这样,真正需要这些的人就会很快的得到它,并且这也使开发者会在提高代码这方面感兴趣,因此整个团体就会知道接下来要做什么了.</span></p><br />
<br />
<br />
<p class="MsoNormal"><span style="">如果一个3a用户在使用Linux时遇到了困难,他会抱怨:这个软件没能满足我的需求.并且他认为他有权利得到这样的满足.他的情绪将会有所改进,如果他等到这样的带有讽刺性的回答:如果我是你,我要求退款!</span></p><br />
<br />
<br />
<p class="MsoNormal"><span style="">所以,对于3a用户,为了避免这些问题,应做到:只要记住,你并没有付给那些软件开发者或者在线帮你提供技术指导的人任何钱.他们并不欠你任何东西.</span></p><br />
<br />
<h3><b><span style="">Subproblem #3b: New vs. Old</span></b><span style=""></span></h3><br />
<br />
<p class="MsoNormal">&nbsp;Linux pretty<br />
much started out life as a<br />
hacker's hobby. It grew as it attracted more hobbyist hackers. It was<br />
quite some time before anybody but a geek stood a chance of getting a<br />
useable Linux installation working easily. Linux started out&nbsp;<span style="font-style: italic;">"By geeks, for geeks."</span><br />
And even today, the majority of established Linux users are<br />
self-confessed geeks.</p><br />
<p class="MsoNormal">And that's a pretty good<br />
thing: If you've got<br />
a problem with hardware or software, having a large number of geeks<br />
available to work on the solution is a definite plus.&nbsp;</p><br />
<p class="MsoNormal">But Linux has grown up<br />
quite a bit since its<br />
early days. There are distros that almost anybody can install, even<br />
distros that live on CDs and detect all your hardware for you without <span style="font-style: italic;">any</span><br />
intervention. It's become attractive to non-hobbyist users who are just<br />
interested in it because it's virus-free and cheap to upgrade. It's not<br />
uncommon for<br />
there to be friction<br />
between the two camps. It's important to bear in mind, however, that<br />
there's no real malice on either side: It's lack of understanding that<br />
causes the problems.</p><br />
<p class="MsoNormal">Firstly, you get the<br />
hard-core geeks who<br />
still assume that everybody using Linux is a fellow geek. This means<br />
they expect a high level of knowledge, and often leads to accusations<br />
of arrogance,<br />
elitism, and rudeness. And in truth, sometimes that's what it is. But<br />
quite often, it's not:&nbsp;It's elitist to say&nbsp;<span style="font-style: italic;">"Everybody ought to know this"</span>.<br />
It's not elitist to say&nbsp;<span style="font-style: italic;">"Everybody<br />
knows this"</span> - quite the opposite.&nbsp;</p><br />
<br />
<p class="MsoNormal">Secondly,&nbsp;you get<br />
the new users who're trying to make the switch after a lifetime of<br />
using commercial OSes. These users are used to software that anybody<br />
can sit down &amp; use, out-of-the-box.</p><br />
<p class="MsoNormal">The issues arise<br />
because&nbsp;group 1 is made up of people who enjoy being able to<br />
tear their OS apart and rebuild it the way they like it, while group 2<br />
tends to be indifferent to the way the OS works, so long as it <span style="font-style: italic;">does</span> work.</p><br />
<p class="MsoNormal">A parallel situation that<br />
can emphasize the problems is Lego. Picture the following:</p><br />
<p class="MsoNormal">New: <span style="font-style: italic;">I wanted a new toy car, and<br />
everybody's raving about how great Lego cars can be. So I bought some<br />
Lego, but when I got home, I just had a load of bricks and cogs and<br />
stuff in the box. Where's my car??</span></p><br />
<p class="MsoNormal">Old: <span style="font-style: italic;">You have to build the car out of<br />
the bricks. That's the whole point of Lego.</span></p><br />
<br />
<p class="MsoNormal">New: <span style="font-style: italic;">What?? I don't know how to build<br />
a car. I'm not a mechanic. How am I supposed to know how to put it all<br />
together??</span></p><br />
<p class="MsoNormal">Old: <span style="font-style: italic;">There's a leaflet that came in<br />
the box. It tells you exactly how to put the bricks together to get a<br />
toy car. You don't need to know how, you just need to follow the<br />
instructions.</span></p><br />
<p class="MsoNormal">New: <span style="font-style: italic;">Okay, I found the instructions.<br />
It's going to take me hours! Why can't they just sell it as a toy car,<br />
instead of making you have to build it??</span></p><br />
<p class="MsoNormal">Old: <span style="font-style: italic;">Because not everybody wants to<br />
make a toy car with Lego. It can be made into anything we like. That's<br />
the whole point.</span></p><br />
<p class="MsoNormal">New: <span style="font-style: italic;">I still don't see why they can't<br />
supply it as a car so people who want a car have got one, and other<br />
people can take it apart if they want to. Anyway, I finally got it put<br />
together, but some bits come off occasionally. What do I do about this?<br />
Can I glue it?</span></p><br />
Old: <span style="font-style: italic;">It's Lego. It's<br />
designed to come apart. That's the whole point.</span><br />
<br />
<p class="MsoNormal">New: <span style="font-style: italic;">But I don't <span style="font-weight: bold;">want</span> it to come<br />
apart. I just want a toy car!</span></p><br />
Old: <span style="font-weight: bold;"><span style="font-style: italic;">Then why on Earth did you buy a<br />
box of Lego??</span></span><br />
<p class="MsoNormal">It's clear to just about anybody that<br />
Lego is not really aimed at<br />
people who just want a toy car. You don't get conversations like the<br />
above in real life. The whole point of Lego<br />
is that you have fun building it and you can make anything you like<br />
with it. If<br />
you've no interest in building anything, Lego's not for you. This is<br />
quite obvious.</p><br />
<p class="MsoNormal">As far as the long-time Linux user is<br />
concerned, the same holds true for Linux: It's an open-source,<br />
fully-customizeable set of software. That's the whole point. If you<br />
don't want to hack the components a bit, why bother to use it?</p><br />
<p class="MsoNormal">But there's been a lot of effort<br />
lately to make Linux more suitable for the non-hackers, a situation<br />
that's not a million miles away from selling pre-assembled Lego kits,<br />
in order to make it appeal to a wider audience. Hence you get<br />
conversations that aren't far away from the ones above:<br />
Newcomers&nbsp;complain about the existence of what the established<br />
users consider to be fundamental features, and resent having the read a<br />
manual to get something working. &nbsp;But complaining that there<br />
are too many distros; or that software has too<br />
many configuration options; or that it doesn't work perfectly<br />
out-of-the-box; is like complaining that Lego can be made into too many<br />
models, and not liking the fact that it can be broken down into bricks<br />
and built into&nbsp;many other things.</p><br />
<br />
<p class="MsoNormal">So, to avoid problem #3b: Just<br />
remember that what Linux seems to be now is <span style="font-weight: bold;">not</span><br />
what Linux was in the past. The largest and most necessary part of the<br />
Linux community, the hackers and the developers, like Linux <span style="font-weight: bold;">because</span> they can fit<br />
it together the way they like; they don't like it in <span style="font-weight: bold;">spite</span> of having to<br />
do all the assembly before they can use it.</p><br />
<p class="MsoNormal"></p><br />
<h3><span style="font-weight: bold;">Problem #4: Designed for the designer</span></h3><br />
<br />
<p class="MsoNormal">In the car industry, you'll very<br />
rarely find that<br />
the person who designed the engine also designed the car interior: It<br />
calls for totally different skills. Nobody wants an engine that only <span style="font-style: italic;">looks</span> like it can<br />
go fast, and nobody wants an interior that works superbly but is<br />
cramped and ugly. And<br />
in the same way, in the software industry, the user interface (UI) is<br />
not usually created by the people who wrote the software.</p><br />
<br />
<p class="MsoNormal">In the Linux world, however, this is<br />
not so much<br />
the case: Projects frequently start out as one man's toy. He does<br />
everything himself, and therefore the interface has no need of any kind<br />
of <span style="font-style: italic;">"user friendly"</span><br />
features:<br />
The user knows everything there is to know about the software, he<br />
doesn't need help. Vi is a good example of software deliberately<br />
created for a user who already knows how it works: It's not unheard of<br />
for new users to reboot their computers because they couldn't figure<br />
out<br />
how else to get out of vi.</p><br />
<p class="MsoNormal">However, there is an important<br />
difference between<br />
a FOSS programmer and most commercial software writers: The software a<br />
FOSS programmer creates is software that he intends to use. So whilst<br />
the end result might not be as 'comfortable' for the novice user, they<br />
can draw some comfort in knowing that the software is designed by<br />
somebody who knows what the end-users needs are: He too is an end-user.<br />
This is very different from commercial software writers, who are making<br />
software for <span style="font-style: italic;">other<br />
people</span> to use: They are <span style="font-style: italic;">not</span> knowledgeable<br />
end-users.</p><br />
<p class="MsoNormal">So whilst vi has an interface that is<br />
hideously<br />
unfriendly to new users, it is still in use today because it is such a<br />
superb interface once you know how it works. Firefox was created by<br />
people who regularly browse the Web. The Gimp was built by people who<br />
use it to manipulate graphics files. And so on.</p><br />
<p class="MsoNormal">So Linux interfaces are frequently a<br />
bit of a<br />
minefield for the novice: Despite its popularity, vi should never be<br />
considered by a new user who just wants to quickly make a few changes<br />
to a file. And if you're using software early in its lifecycle,<br />
a&nbsp;polished, user-friendly interface is something you're likely<br />
to<br />
find only in the <span style="font-style: italic;">"ToDo"</span><br />
<br />
list: Functionality comes first. Nobody designs<br />
a killer interface and then tries to add functionality bit by bit. They<br />
create functionality, and then improve the interface bit by bit.</p><br />
<p class="MsoNormal">So to avoid #4 issues: Look for<br />
software that's<br />
specifically aimed at being easy for new users to use, or accept that<br />
some software that has a steeper learning curve than you're used to. To<br />
complain that vi isn't friendly enough for new users is to be laughed<br />
at for missing the point.</p><br />
<p class="MsoNormal"></p><br />
<br />
<h3>Problem #5: The myth of "user-friendly"</h3><br />
<br />
<p>This is a big one. It's a very big term in the computing<br />
world,<br />
"user-friendly". It's even the name of a particularly good webcomic.<br />
But it's a bad term.</p><br />
<p>The basic concept is good: That software be designed with the<br />
needs<br />
of the user in mind. But it's always addressed as a single concept,<br />
which it isn't.&nbsp;</p><br />
If you spend your entire life processing text files, your ideal<br />
software will be fast and powerful, enabling you to do the maximum<br />
amount of work for the minimum amount of effort. Simple keyboard<br />
shortcuts and mouseless operation will be of vital importance.<br><br />
<p>But if you very rarely edit text files, and you just want to<br />
write<br />
an occasional letter, the last thing you want is to struggle with<br />
learning keyboard shortcuts. Well-organized menus and clear icons in<br />
toolbars will be your ideal.&nbsp;</p><br />
<p>Clearly, software designed around the needs of the first user<br />
will<br />
not be suitable for the second, and vice versa. So how can any software<br />
be called "user-friendly", if we all have different needs?</p><br />
<br />
<p>The simple answer: User-friendly is a misnomer, and one that<br />
makes a complex situation seem simple.</p><br />
<p>What does "user-friendly" really mean? Well, in the context in<br />
which it is used, "user friendly" software means <span style="font-style: italic;">"Software that can be used to a<br />
reasonable level of competence by a user with no previous experience of<br />
the&nbsp;software."</span> This has the unfortunate effect of<br />
making lousy-but-familiar interfaces&nbsp;fall into the category of<br />
"user-friendly".&nbsp;</p><br />
<p></p><br />
<h3>Subproblem #5a: Familiar is friendly</h3><br />
<p>So it is that in most "user-friendly" text editors &amp;<br />
word<br />
processors, you Cut and Paste by using Ctrl-X and Ctrl-V. Totally<br />
unintuitive, but everybody's used to these combinations, so they count<br />
as a "friendly" combination.</p><br />
<p>So when somebody comes to vi and finds that it's "d<span style="font-style: italic;"></span>" to cut, and "p"<br />
to paste, it's not considered<br />
friendly: It's<br />
not what anybody is used to.</p><br />
<br />
<p>Is it superior? Well, actually, yes.&nbsp;</p><br />
<p>With the Ctrl-X approach, how do you cut a word from the<br />
document you're currently in? <span style="font-style: italic;">(No<br />
using the mouse!)</span></p><br />
From the start of the word, <span style="font-style: italic;">Ctrl-Shift-Right</span><br />
to select the word.&nbsp;<br><br />
Then <span style="font-style: italic;">Ctrl-X</span><br />
to cut it.<br />
<p>The vi approach? <span style="font-style: italic;">dw</span><br />
<br />
deletes the word.</p><br />
<p>How about cutting <span style="font-weight: bold;">five</span><br />
words with a Ctrl-X application?</p><br />
From the start of the words, <span style="font-style: italic;">Ctrl-Shift-Right</span><br><br />
<span style="font-style: italic;">Ctrl-Shift-</span><span style="font-style: italic;">Right</span><br><br />
<span style="font-style: italic;">Ctrl-Shift-</span><span style="font-style: italic;">Right</span><br><br />
<span style="font-style: italic;">Ctrl-Shift-</span><span style="font-style: italic;">Right</span><br><br />
<br />
<span style="font-style: italic;">Ctrl-Shift-</span><span style="font-style: italic;">Right</span><br><br />
<span style="font-style: italic;">Ctrl-X</span><br />
<p>And with vi?</p><br />
<p><span style="font-style: italic;">d5w</span></p><br />
<p>The vi approach is far more versatile and actually<br />
more&nbsp;intuitive: "X" and "V" are not obvious or memorable "Cut"<br />
and "Paste" commands, whereas "dw" to <span style="font-style: italic; font-weight: bold;">d</span>elete<br />
a <span style="font-style: italic; font-weight: bold;">w</span>ord,<br />
and "p" to <span style="font-style: italic; font-weight: bold;">p</span>ut<br />
it back is perfectly straightforward. But "X" and "V" are what we all<br />
know, so whilst vi is clearly superior, it's unfamiliar.<br />
Ergo, it<br />
is considered unfriendly. On no other basis, pure familiarity makes a<br />
Windows-like interface seem friendly. And as we learned in problem #1,<br />
Linux<br />
is necessarily different to Windows. Inescapably, Linux always appears<br />
less<br />
"user-friendly" than Windows.&nbsp;</p><br />
<br />
<p>To avoid #5a problems, all you can really do is try and<br />
remember<br />
that <span style="font-style: italic;">"user-friendly"</span><br />
doesn't mean <span style="font-style: italic;">"What I'm<br />
used to"</span>: Try doing things<br />
your usual way, and if it doesn't work, try and work out what a total<br />
novice would do.&nbsp;</p><br />
<p></p><br />
<h3>Subproblem #5b: Inefficient is friendly</h3><br />
<p>This is a sad but inescapable fact. Paradoxically, the harder<br />
you<br />
make it to access an application's functionality, the friendlier it can<br />
seem to be.&nbsp;</p><br />
<p>This is because friendliness is added to an interface by using<br />
simple, visible 'clues' - the more, the better. After all, if a<br />
complete novice to computers is put in front of a WYSIWYG word<br />
processor and asked to make a bit of text bold, which is more likely:</p><br />
<ul><br />
<li>He'll guess that <span style="font-style: italic;">"Ctrl-B"</span><br />
<br />
is the usual standard&nbsp;</li><br />
</ul><br />
<ul><br />
<li>He'll look for clues, and try clicking on the <span style="font-style: italic;">"Edit"</span> menu.<br />
Unsuccessful, he'll try the next likely one along the row of menus: <span style="font-style: italic;">"Format"</span>. The new<br />
menu has a <span style="font-style: italic;">"Font"</span><br />
option, which seems promising. And Hey! There's our <span style="font-style: italic;">"Bold"</span> option.<br />
Success!</li><br />
<br />
</ul><br />
<p>Next time you do any processing, try doing every job via the<br />
menus:<br />
No shortcut keys, and no toolbar icons. Menus all the way. You'll find<br />
you slow to a crawl, as every task suddenly demands a multitude of<br />
keystrokes/mouseclicks.</p><br />
Making software "user-friendly" in this fashion is like putting<br />
training wheels on a bicycle: It lets you get up &amp; running<br />
immediately, without any skill or experience needed. It's <span style="font-style: italic;">perfect</span> for a<br />
beginner. But nobody out there thinks that <span style="font-style: italic;">all</span> bicycles should<br />
be sold<br />
with<br />
training wheels: If you were given such a bicycle today, I'll wager the<br />
first<br />
thing you'd do is remove them for being unnecessary encumbrances:<br />
Once you know how to ride a bike, training wheels are unnecessary.<br />
<p>And in the same way, a great deal of Linux software is<br />
designed<br />
without "training wheels" - it's designed for users who already have<br />
some basic skills in place. After all, nobody's a permanent novice:<br />
Ignorance is short-lived, and knowledge is forever. So the software is<br />
designed with the majority in mind.&nbsp;</p><br />
<p>This might seem an excuse: After<br />
all, MS Word has all the friendly menus, <span style="font-style: italic;">and</span> it has toolbar<br />
buttons,<br />
<br />
<span style="font-style: italic;">and</span> it has<br />
shortcut keys. . . Best of all worlds, surely?<br />
Friendly&nbsp;<span style="font-weight: bold;">and</span><br />
efficient.</p><br />
<p>However, this has to be put into perspective: Firstly, the<br />
practicalities: having menus and toolbars and shortcuts and all would<br />
mean a lot of coding, and it's not like Linux developers all get paid<br />
for their time.&nbsp;Secondly, it still doesn't really take into<br />
account<br />
serious&nbsp;power-users: Very few professional wordsmiths use MS<br />
Word. Ever meet a coder who used MS Word? Compare that to how<br />
many use emacs &amp; vi.&nbsp;</p><br />
<p>Why is this? Firstly, because some "friendly"<br />
behaviour rules out efficient behaviour: See the "Cut&amp;Copy"<br />
example<br />
above. And secondly, because most of Word's functionality is buried in<br />
menus that you <span style="font-style: italic;">have</span><br />
<br />
to use:<br />
Only the most common functionality has those handy little buttons in<br />
toolbars at the top. The less-used functions that are still vital for<br />
serious users just take too long to access.</p><br />
<p>Something to bear in mind, however, is that "training wheels"<br />
are<br />
often available as "optional extras" for Linux software: They might not<br />
be obvious, but frequently they're available.</p><br />
<p>Take mplayer. You use it to play a video file by typing <span style="font-style: italic;">mplayer filename</span><br />
in a terminal. You fastforward &amp; rewind using the arrow keys<br />
and<br />
the PageUp &amp; PageDown keys. This is not overly "user-friendly".<br />
However, if you instead type <span style="font-style: italic;">gmplayer<br />
filename</span>, you'll get the graphical frontend, with all its<br />
nice, friendly , familiar buttons.</p><br />
<p>Take ripping a CD to MP3 (or Ogg): Using the command-line, you<br />
need<br />
to use cdparanoia to rip the files to disc. Then you need<br />
an&nbsp;encoder. . . It's a hassle, even if you know exactly how to<br />
use the<br />
packages <span style="font-style: italic;">(imho)</span>.<br />
So download<br />
<br />
&amp; install something like Grip. This is an easy-to-use graphical<br />
frontend that uses cdparanoia and encoders behind-the-scenes to make it<br />
really easy to rip CDs, and even has CDDB support to name the files<br />
automatically for you.&nbsp;</p><br />
<p>The same goes for ripping DVDs: The number of options to pass<br />
to<br />
transcode is a bit of a nightmare. But using dvd::rip to talk to<br />
transcode for you makes the whole thing a simple, GUI-based process<br />
which anybody can do.</p><br />
<p>So to avoid #5b issues: Remember that "training wheels" tend<br />
to<br />
be&nbsp;bolt-on extras in Linux, rather than being automatically<br />
supplied with the main product. And sometimes, "training wheels" just<br />
can't be part of the design.</p><br />
<p></p><br />
<h3>Problem #6: Imitation vs. Convergence</h3><br />
<p>An argument people often make when they find that Linux isn't<br />
the Windows clone they wanted is to insist that this is what Linux has<br />
been (or <span style="font-style: italic;">should</span><br />
have been) attempting to be since it was created, and that people who<br />
don't<br />
recognise this and help to make Linux more Windows-like are in the<br />
wrong. They draw on many arguments for this:</p><br />
<p style="font-style: italic;">Linux has gone from<br />
Command-Line- to Graphics-based interfaces, a clear attempt to copy<br />
Windows</p><br />
<br />
<p>Nice theory, but false: The original X windowing system was<br />
released in 1984, as the successor to the W windowing system ported to<br />
Unix in 1983. Windows 1.0 was released in 1985. Windows didn't really<br />
make it<br />
big until version 3, released in 1990 - by which time, X windows had<br />
for years been at the X11 stage we use today. Linux itself was only<br />
started in 1991. So Linux didn't create a GUI to copy Windows: It<br />
simply made use of a GUI that existed long before Windows.</p><br />
<p style="font-style: italic;">Windows 3 gave way to<br />
Windows 95 - making a huge level of<br />
changes to the UI that Microsoft has never equalled since. It had many<br />
new &amp; innovative features: Drag &amp; drop functionality;<br />
taskbars,<br />
and so on. All of which have since been copied by Linux, of course.</p><br />
<p>Actually. . . no. All the above existed prior to Microsoft<br />
making use<br />
of them. NeXTSTeP in particular was a hugely advanced (for the time)<br />
GUI, and it predated Win95 significantly - version 1 released in 1989,<br />
and the final version in 1995. </p><br />
<p style="font-style: italic;">Okay, okay, so Microsoft<br />
didn't think up the individual features that we think of as the Windows<br />
Look-and-Feel. But it still created <strong>a</strong><br />
Look-and-Feel, and Linux has been trying to imitate that ever since.</p><br />
<p>To debunk this, one must discuss the concept of <em>convergent<br />
evolution</em>.<br />
This is where two completely different and independent systems evolve<br />
over time to become very similar. It happens all the time in biology.<br />
For example, sharks and dolphins. Both are (typically) fish-eating<br />
marine organisms of about the same size. Both have dorsal fins,<br />
pectoral fins, tail fins, and similar, streamlined shapes.</p><br />
<br />
<p>However,<br />
sharks evolved from fish, while dolphins evolved from a land-based<br />
quadrupedal mammal of some sort. The reason they have very similar<br />
overall appearances is that they both evolved to be as efficient as<br />
possible at living within a marine environment. At no stage did<br />
pre-dolphins (the relative newcomers) look at sharks and think <em>"Wow,<br />
look at those fins. They work really well. I'll try and evolve some<br />
myself!"</em></p><br />
<p>Similarly,<br />
it's perfectly true to look at early Linux desktops and see FVWM and<br />
TWM and a lot of other simplistic GUIs. And then look at modern Linux<br />
desktops, and see Gnome &amp; KDE with their taskbars and menus and<br />
eye-candy. And yes, it's true to say that they're a lot more like<br />
Windows than they used to be.</p><br />
<p>But then, so is Windows: Windows 3.0 had no taskbar that I<br />
remember. And the Start menu? <span style="font-style: italic;">What</span><br />
Start menu?</p><br />
<p>Linux didn't have a desktop anything like modern Windows.<br />
Microsoft didn't either. Now they both do. What does this tell us?</p><br />
<p>It<br />
tells us that developers in both camps looked for ways of improving the<br />
GUI, and because there are only a limited number of solutions to a<br />
problem, they often used very similar methods. Similarity does not in<br />
any way prove or imply imitation. Remembering that will help you avoid<br />
straying into problem #6 territory.</p><br />
<p></p><br />
<br />
<h3>Problem #7: That FOSS thing.</h3><br />
<p>Oh, this causes problems. Not intrinsically: The software<br />
being free and open-source is a wonderful and immensely important part<br />
of the whole thing. But understanding just how different FOSS is from<br />
proprietary software can be too big an adjustment for some people to<br />
make.&nbsp;</p><br />
<p>I've already mentioned some instances of this: People thinking<br />
they can demand technical support and the like. But it goes far beyond<br />
that.&nbsp;</p><br />
<p>Microsoft's Mission Statement is <span style="font-style: italic;">"A computer on every desktop"</span><br />
- with the unspoken rider that each computer should be running Windows.<br />
Microsoft and Apple both sell operating systems, and both do their<br />
utmost to make sure their products get used by the largest number of<br />
people: They're businesses, out to make money.</p><br />
<p>And then there is FOSS. Which, even today, is almost entirely<br />
non-commercial.</p><br />
<p>Before you reach for your email client to tell me about Red<br />
Hat, Suse, Linspire and all:&nbsp;Yes, I know they "sell" Linux. I<br />
know they'd all love Linux to be<br />
adopted universally, especially their own flavour of it. But don't<br />
confuse the suppliers with the manufacturers. The<br />
Linux kernel was not created by a company, and is not maintained by<br />
people out to make a profit with it. The GNU tools were not created by<br />
a company, and are not maintained by people out to make a profit with<br />
them. The X11 windowing system. . . well, the most popular<br />
implementation is xorg right now, and the <span style="font-style: italic;">".org"</span> part should<br />
tell you<br />
all you need to know. Desktop software: Well, you might be able to make<br />
a case for KDE being commercial, since it's Qt-based. But Gnome,<br />
Fluxbox, Enlightenment, etc. are all non-profit. There <span style="font-style: italic;">are</span> people out to<br />
sell Linux, but they are very much the minority.</p><br />
<br />
<p>Increasing the number of end-users of proprietary software<br />
leads to a direct financial benefit to the company that makes it. This<br />
is simply not the case for FOSS: There is no direct benefit to any FOSS<br />
developer in increasing the userbase. Indirect benefits, yes: Personal<br />
pride; an increased potential for finding bugs; more likelihood of<br />
attracting new developers; possibly a chance of a good job offer; and<br />
so on.&nbsp;</p><br />
<p>But Linus Torvalds doesn't make money from increased Linux<br />
usage. Richard Stallman doesn't get money from increased GNU usage. All<br />
those servers running OpenBSD and OpenSSH don't put a penny into the<br />
OpenBSD project's pockets. And so we come to the biggest problem of all<br />
when it comes to new users and Linux:</p><br />
<p>They find out they're not wanted.</p><br />
<p>New users come to Linux after spending their lives using an OS<br />
where the end-user's needs are paramount, and <span style="font-style: italic;">"user friendly"</span><br />
and <span style="font-style: italic;">"customer focus"</span><br />
are considered veritable Holy Grails. And they<br />
suddenly find themselves using an OS that still relies on 'man' files,<br />
the<br />
command-line,&nbsp;hand-edited configuration files, and Google. And<br />
when they complain, they don't get coddled or promised better things:<br />
They get bluntly shown the door.</p><br />
<p>That's an exaggeration, of course.<br />
But it <span style="font-style: italic;">is</span><br />
<br />
how a lot of potential Linux converts perceived things when<br />
they tried and failed to make the switch.&nbsp;</p><br />
<p>In an odd way, FOSS is actually a very selfish development<br />
method:<br />
People only work on what they want to work on, when they want to work<br />
on it. Most people don't see any need to make Linux more attractive to<br />
inexperienced end-users: It already does what&nbsp;<span style="font-style: italic;">they</span> want it to do,<br />
why should they care if it doesn't work for other people?&nbsp;</p><br />
<p>FOSS has many parallels with the Internet itself: You don't<br />
pay the<br />
writer of <span style="font-weight: bold; color: rgb(51, 51, 255);">a<br />
webpage/the<br />
software</span> to download and <span style="font-weight: bold; color: rgb(51, 51, 255);">read/install</span><span style="color: rgb(51, 51, 255);"> it. </span><span style="font-weight: bold; color: rgb(51, 51, 255);">Ubiquitous<br />
broadband/User-friendly interfaces</span> are of no great<br />
interest to<br />
somebody who already &nbsp;<span style="font-weight: bold; color: rgb(51, 51, 255);">has<br />
broadband/knows how to use the software. Bloggers/developers</span><br />
<br />
don't need to have lots of <span style="font-weight: bold; color: rgb(51, 51, 255);">readers/users</span><br />
to justify <span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">blogging/coding</span>.</span><br />
There <span style="font-style: italic;">are</span><br />
lots of people making lots of money off it, but it's not by<br />
the old-fashioned <span style="font-style: italic;">"I<br />
own this&nbsp;and you have to pay me if you want some of it"</span><br />
method that most businesses are so enamoured of; it's by providing<br />
services like <span style="font-weight: bold; color: rgb(51, 51, 255);">tech-support/e-commerce</span><span style="color: rgb(51, 51, 255);">.</span>&nbsp;</p><br />
<br />
<p>Linux is not interested in market share. Linux does not have<br />
customers. Linux does not have shareholders, or a responsibility to the<br />
bottom line. Linux was not created to make money. Linux does not have<br />
the goal of being the most popular and widespread OS on the planet.</p><br />
<p>All the Linux community wants is to create a really good,<br />
fully-featured, free operating system. If that results in Linux<br />
becoming a hugely popular OS, then that's great. If that results in<br />
Linux having the most intuitive, user-friendly interface ever created,<br />
then that's great. If that results in Linux becoming the basis of a<br />
multi-billion dollar industry, then that's great.</p><br />
<p>It's <span style="font-weight: bold;">great</span>,<br />
but it's not <span style="font-weight: bold;">the<br />
point</span>. The point is to make Linux the best OS that the<br />
community is capable of making. Not for other people: For<br />
itself. The oh-so-common threats of&nbsp;<span style="font-style: italic;">"Linux will never take over the<br />
desktop unless it does such-and-such"</span> are simply<br />
irrelevant: The Linux community isn't <span style="font-style: italic;">trying</span> to take over<br />
the desktop. They really don't care if it gets good enough to make it<br />
onto&nbsp;<span style="font-style: italic;">your</span><br />
<br />
desktop, so long as it stays good enough to remain on&nbsp;<span style="font-style: italic;">theirs.</span> The<br />
highly-vocal MS-haters, pro-Linux zealots, and money-making FOSS<br />
purveyors might be loud, but they're still minorities.</p><br />
<p>That's what the Linux community wants: an OS that can be<br />
installed by whoever really wants it. So if you're<br />
considering switching to Linux, first ask yourself what <span style="font-weight: bold;">you</span> really want.</p><br />
<p>If you want an OS that doesn't chauffeur you around, but hands<br />
you the keys, puts you in the driver's seat, <span style="font-style: italic;">and expects you to know what to<br />
do</span>: Get Linux. You'll have to devote some time to learning<br />
how to use it, but once you've done so, you'll have an OS that you can<br />
make sit up and dance. </p><br />
<p>If you really just want Windows without the malware and<br />
security issues: Read up on good security practices; install a good<br />
firewall, malware-detector,&nbsp;and anti-virus; replace IE with a<br />
more secure browser; and keep yourself up-to-date with security<br />
updates. There are people out there <span style="font-style: italic;">(myself included)</span><br />
<br />
who've used Windows since 3.1 days right through to XP without ever<br />
being infected with a virus or malware: you can do it too. Don't get<br />
Linux: It will fail miserably at being what you want it to be.</p><br />
<p>If you really want the security and performance of a<br />
Unix-based OS but with a customer-focussed attitude and an<br />
world-renowned interface: Buy an Apple Mac. OS X is great. But don't<br />
get Linux: It will not do what you want it to do.</p><br />
<p>It's not just about <span style="font-style: italic;">"Why<br />
should I want Linux?"</span>. It's also about <span style="font-style: italic;">"Why should Linux want me?"</span></p><br />
</div><br />
</center></div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18241UbuntuHelp:Synaptic/zh2007-05-18T09:01:57Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|ekeng}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== 主要特点 ==<br />
<br />
* 综合搜索-例如:通过 '软件包描述和名称' 来搜索特定的特征和条件.<br />
<br />
* 安装和卸载软件变得简单<br />
<br />
* 把软件分门别类<br />
<br />
* 易于区分已安装的软件<br />
<br />
* 自动列出并安装附加的软件<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== 安装==<br />
<br />
* Ubuntu 默认安装<br />
<br />
== 小提示 ==<br />
<br />
* 卸载软件的一部分可能不会移除一些可能已安装的附加软件. 把附加软件清单截个图 (使用 'Alt' + 'Prnt Scrn' 对当前活动窗口截图) ,以后就可以手动移除新立得忽略的附加软件.<br />
<br />
== 你不妨看看其他软件==<br />
<br />
* '''Apt''' (查看: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== 进一步阅读 ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ 新立得软件包管理器]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement| Ubuntu的软件管理]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto| 新立得使用指南]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy 非官方的 Ubuntu 6.10 (Edgy Eft) 初学者指南]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18240UbuntuHelp:Synaptic/zh2007-05-18T09:00:30Z<p>Ekeng:/* Further Reading */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== 主要特点 ==<br />
<br />
* 综合搜索-例如:通过 '软件包描述和名称' 来搜索特定的特征和条件.<br />
<br />
* 安装和卸载软件变得简单<br />
<br />
* 把软件分门别类<br />
<br />
* 易于区分已安装的软件<br />
<br />
* 自动列出并安装附加的软件<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== 安装==<br />
<br />
* Ubuntu 默认安装<br />
<br />
== 小提示 ==<br />
<br />
* 卸载软件的一部分可能不会移除一些可能已安装的附加软件. 把附加软件清单截个图 (使用 'Alt' + 'Prnt Scrn' 对当前活动窗口截图) ,以后就可以手动移除新立得忽略的附加软件.<br />
<br />
== 你不妨看看其他软件==<br />
<br />
* '''Apt''' (查看: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== 进一步阅读 ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ 新立得软件包管理器]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement| Ubuntu的软件管理]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto| 新立得使用指南]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy 非官方的 Ubuntu 6.10 (Edgy Eft) 初学者指南]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18239UbuntuHelp:Synaptic/zh2007-05-18T08:56:17Z<p>Ekeng:/* Other applications you may wish to look at */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== 主要特点 ==<br />
<br />
* 综合搜索-例如:通过 '软件包描述和名称' 来搜索特定的特征和条件.<br />
<br />
* 安装和卸载软件变得简单<br />
<br />
* 把软件分门别类<br />
<br />
* 易于区分已安装的软件<br />
<br />
* 自动列出并安装附加的软件<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== 安装==<br />
<br />
* Ubuntu 默认安装<br />
<br />
== 小提示 ==<br />
<br />
* 卸载软件的一部分可能不会移除一些可能已安装的附加软件. 把附加软件清单截个图 (使用 'Alt' + 'Prnt Scrn' 对当前活动窗口截图) ,以后就可以手动移除新立得忽略的附加软件.<br />
<br />
== 你不妨看看其他软件==<br />
<br />
* '''Apt''' (查看: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18238UbuntuHelp:Synaptic/zh2007-05-18T08:51:35Z<p>Ekeng:/* Hints and Tips */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== 主要特点 ==<br />
<br />
* 综合搜索-例如:通过 '软件包描述和名称' 来搜索特定的特征和条件.<br />
<br />
* 安装和卸载软件变得简单<br />
<br />
* 把软件分门别类<br />
<br />
* 易于区分已安装的软件<br />
<br />
* 自动列出并安装附加的软件<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== 安装==<br />
<br />
* Ubuntu 默认安装<br />
<br />
== 小提示 ==<br />
<br />
* 卸载软件的一部分可能不会移除一些可能已安装的附加软件. 把附加软件清单截个图 (使用 'Alt' + 'Prnt Scrn' 对当前活动窗口截图) ,以后就可以手动移除新立得忽略的附加软件.<br />
<br />
== Other applications you may wish to look at ==<br />
<br />
* '''Apt''' (see: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18233UbuntuHelp:Synaptic/zh2007-05-18T08:37:28Z<p>Ekeng:/* Installation */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== 主要特点 ==<br />
<br />
* 综合搜索-例如:通过 '软件包描述和名称' 来搜索特定的特征和条件.<br />
<br />
* 安装和卸载软件变得简单<br />
<br />
* 把软件分门别类<br />
<br />
* 易于区分已安装的软件<br />
<br />
* 自动列出并安装附加的软件<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== 安装==<br />
<br />
* Ubuntu 默认安装<br />
<br />
== Hints and Tips ==<br />
<br />
* Uninstalling a piece of software will not remove other dependencies that may have been installed. Taking a screenshot of the list of dependencies (use 'Alt' + 'Prnt Scrn' to capture the active window) enables you to remove what Synaptic would ignore.<br />
<br />
== Other applications you may wish to look at ==<br />
<br />
* '''Apt''' (see: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18232UbuntuHelp:Synaptic/zh2007-05-18T08:36:07Z<p>Ekeng:/* Key Features */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== 主要特点 ==<br />
<br />
* 综合搜索-例如:通过 '软件包描述和名称' 来搜索特定的特征和条件.<br />
<br />
* 安装和卸载软件变得简单<br />
<br />
* 把软件分门别类<br />
<br />
* 易于区分已安装的软件<br />
<br />
* 自动列出并安装附加的软件<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== Installation ==<br />
<br />
* Part of the default Ubuntu installation<br />
== Hints and Tips ==<br />
<br />
* Uninstalling a piece of software will not remove other dependencies that may have been installed. Taking a screenshot of the list of dependencies (use 'Alt' + 'Prnt Scrn' to capture the active window) enables you to remove what Synaptic would ignore.<br />
<br />
== Other applications you may wish to look at ==<br />
<br />
* '''Apt''' (see: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18229UbuntuHelp:Synaptic/zh2007-05-18T08:19:47Z<p>Ekeng:/* Screenshot */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== Key Features ==<br />
<br />
* Comprehensive search - e.g. find specific features and terms via a 'Description and Name' search<br />
<br />
* Easily install and uninstall software<br />
<br />
* Categorised listings of software<br />
<br />
* Easily identify already installed applications<br />
<br />
* Lists and installs dependencies<br />
<br />
== 界面截图 ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== Installation ==<br />
<br />
* Part of the default Ubuntu installation<br />
== Hints and Tips ==<br />
<br />
* Uninstalling a piece of software will not remove other dependencies that may have been installed. Taking a screenshot of the list of dependencies (use 'Alt' + 'Prnt Scrn' to capture the active window) enables you to remove what Synaptic would ignore.<br />
<br />
== Other applications you may wish to look at ==<br />
<br />
* '''Apt''' (see: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18228UbuntuHelp:Synaptic/zh2007-05-18T08:18:52Z<p>Ekeng:/* 新立得软件包管理器 */</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
有些软件的安装过程极其复杂,而容易上手的新立得软件包管理器使这过程变得简单.<br />
<br />
英文版: System > Administration > Synaptic Package Manager<br />
<br />
中文版: 系统 > 系统管理 > 新立得软件包管理器<br />
<br />
== Key Features ==<br />
<br />
* Comprehensive search - e.g. find specific features and terms via a 'Description and Name' search<br />
<br />
* Easily install and uninstall software<br />
<br />
* Categorised listings of software<br />
<br />
* Easily identify already installed applications<br />
<br />
* Lists and installs dependencies<br />
<br />
== Screenshot ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== Installation ==<br />
<br />
* Part of the default Ubuntu installation<br />
== Hints and Tips ==<br />
<br />
* Uninstalling a piece of software will not remove other dependencies that may have been installed. Taking a screenshot of the list of dependencies (use 'Alt' + 'Prnt Scrn' to capture the active window) enables you to remove what Synaptic would ignore.<br />
<br />
== Other applications you may wish to look at ==<br />
<br />
* '''Apt''' (see: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:Synaptic/zh&diff=18226UbuntuHelp:Synaptic/zh2007-05-18T08:08:30Z<p>Ekeng:New page: {{Translation|}} {{From|https://help.ubuntu.com/community/Synaptic}} {{Translator|}} {{Languages|Synaptic}} Parent: UbuntuHelp:Software == 新立得软件包管理器== Synaptic Package...</p>
<hr />
<div>{{Translation|}}<br />
{{From|https://help.ubuntu.com/community/Synaptic}}<br />
{{Translator|}}<br />
{{Languages|Synaptic}}<br />
<br />
Parent: UbuntuHelp:Software<br />
<br />
== 新立得软件包管理器==<br />
<br />
Synaptic Package Manager is an easy-to-use software installer, which is verbose in its description of things like other software requirements.<br />
<br />
Menu: System > Administration > Synaptic Package Manager<br />
<br />
<br />
== Key Features ==<br />
<br />
* Comprehensive search - e.g. find specific features and terms via a 'Description and Name' search<br />
<br />
* Easily install and uninstall software<br />
<br />
* Categorised listings of software<br />
<br />
* Easily identify already installed applications<br />
<br />
* Lists and installs dependencies<br />
<br />
== Screenshot ==<br />
<br />
https://help.ubuntu.com/community/Synaptic?action=AttachFile&do=get&target=scrn-synaptic.jpg<br />
<br />
== Installation ==<br />
<br />
* Part of the default Ubuntu installation<br />
== Hints and Tips ==<br />
<br />
* Uninstalling a piece of software will not remove other dependencies that may have been installed. Taking a screenshot of the list of dependencies (use 'Alt' + 'Prnt Scrn' to capture the active window) enables you to remove what Synaptic would ignore.<br />
<br />
== Other applications you may wish to look at ==<br />
<br />
* '''Apt''' (see: '''[[UbuntuHelp:AptGetHowto]]''')<br />
* '''[[UbuntuHelp:Automatix]]'''<br />
* '''[http://easyubuntu.freecontrib.org/ Easy Ubuntu]'''<br />
<br />
== Further Reading ==<br />
<br />
* '''[http://www.nongnu.org/synaptic/ Synaptic Package Manager]'''<br />
<br />
* '''[[UbuntuHelp:SoftwareManagement|Software Management in Ubuntu]]'''<br />
<br />
* '''[[UbuntuHelp:Repositories]]'''<br />
<br />
* '''[[UbuntuHelp:SynapticHowto|The Synaptic Howto]]'''<br />
<br />
* '''[http://ubuntuguide.org/wiki/Ubuntu_Edgy Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide]'''<br />
<br />
<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootText/zh&diff=18189UbuntuHelp:BootText/zh2007-05-18T05:15:14Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|from=https://help.ubuntu.com/community/BootText}}<br />
{{From|https://help.ubuntu.com/community/BootText}}<br />
{{Translator|ekeng}}<br />
{{Languages|BootText}}<br />
<br />
<br />
本文不是提供启动图像也不是教您如何隐藏启动文字,只是让启动画面更好看而已.<br />
<br />
== 提高分辨率 ==<br />
编辑 /boot/grub/menu.lst<br />
<pre><nowiki><br />
gksudo gedit /boot/grub/menu.lst<br />
</nowiki></pre><br />
<br />
把 <code><nowiki>vga=792</nowiki></code> 加到默认的启动菜单中.<br />
例如:<br />
<pre><nowiki><br />
titleUbuntu, kernel 2.6.10-5-k7 Default <br />
root(hd0,0)<br />
kernel/vmlinuz root=/dev/hde6 ro quiet splash vga=792<br />
initrd/initrd.img<br />
savedefault<br />
boot<br />
</nowiki></pre><br />
<br />
== 改变"[ ok ]"的颜色 ==<br />
<br />
'''注:5.10 Breezy中无法使用. 解决方法[http://www.ubuntuforums.org/showpost.php?p=395004&postcount=37 点此].''' (ed. 28/12/2005)<br />
'''[译者注:我的Ubuntu 7.04 的init-functions文件的 log_end_msg () 函数不是如下所述,因此没有试验成功,望高手指点.]'''<br />
<br />
我们让 "[ ok ]" 启动时变绿.<br />
<br />
* 编辑 /lib/lsb/init-functions<br />
<pre><nowiki><br />
gksudo gedit /lib/lsb/init-functions<br />
</nowiki></pre><br />
<br />
* 找到log_end_msg () 函数, 通常在文件的底部,把<code><nowiki>GREEN=`$TPUT setaf 2`</nowiki></code> 添加<code><nowiki>RED=`$TPUT setaf 1`</nowiki></code>的下方.<br />
* 把 <code><nowiki>echo "$UP$END[ ok ]"</nowiki></code> 改成 <code><nowiki>echo "$UP$END[ ${GREEN}ok${NORMAL} ]"</nowiki></code><br />
<br />
函数应像以下这样:<br />
<pre><nowiki><br />
log_end_msg () {<br />
<br />
[ -z "$1" ] && return 1<br />
<br />
TPUT=/usr/bin/tput<br />
EXPR=/usr/bin/expr<br />
if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then<br />
COLS=`$TPUT cols`<br />
if [ -n "$COLS" ]; then<br />
COL=`$EXPR $COLS - 7`<br />
else<br />
COL=73<br />
fi<br />
<br />
UP=`$TPUT cuu1`<br />
END=`$TPUT hpa $COL`<br />
START=`$TPUT hpa 0`<br />
RED=`$TPUT setaf 1`<br />
GREEN=`$TPUT setaf 2`<br />
NORMAL=`$TPUT op`<br />
if [ $1 -eq 0 ]; then<br />
echo "$UP$END[ ${GREEN}ok${NORMAL} ]"<br />
else<br />
echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"<br />
fi<br />
else<br />
if [ $1 -eq 0 ]; then<br />
echo " ...done."<br />
else<br />
echo " ...fail!"<br />
fi<br />
fi<br />
return $1<br />
}<br />
</nowiki></pre><br />
<br />
== 最终结果 ==<br />
重启,分辨率应该提高了, [ ok ] 的颜色应该变绿了.<br />
<br />
参考: [http://www.ubuntuforums.org/showthread.php?t=50054&highlight=spice dudinatrix]<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootFromCD/zh&diff=18188UbuntuHelp:BootFromCD/zh2007-05-18T05:14:21Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|https://help.ubuntu.com/community/BootFromCD}}<br />
{{From|https://help.ubuntu.com/community/BootFromCD}}<br />
{{Translator|ekeng}}<br />
{{Languages|UbuntuHelp:BootFromCD}}<br />
<br />
<br />
<br />
== 从光盘启动的常见问题 ==<br />
<br />
当准备从光盘安装或试用当前版本的Ubuntu时,你的计算机需要从光盘启动.通常只要把光盘放入光驱里,然后重启计算机.有时会出现问题,或只是意想不到的情况.以下列出了常见的问题以及解决方法.<br />
<br />
=== 光盘没有准确刻录 ===<br />
<br />
检查并确定光盘被准确地刻录了.如果您用的是从[https://shipit.ubuntu.com Ubuntu ShipIt]寄来的光盘,就没有必要担心这个了.如果您从[http://www.ubuntu.com/download/ Ubuntu 官方下载页] 下载的ISO镜像还没刻录,点击这个[https://help.ubuntu.com/community/BurningIsoHowto 如何刻录ISO镜像] .<br />
<br />
在您的当前操作系统打开您刻录的光盘,应该会看到多个目录和文件,而不是单个的.iso文件.如果您浏览光盘时只看到单个的.iso文件,那就是刻录错误,您应该按这里的方法[https://help.ubuntu.com/community/BurningIsoHowto 如何刻录ISO镜像]重新刻录.<br />
<br />
* 正确的光盘文件<br />
https://help.ubuntu.com/community/BootFromCD?action=AttachFile&do=get&target=correctcd.png<br />
* 错误的光盘文件(您应该按这里的方法[https://help.ubuntu.com/community/BurningIsoHowto 如何刻录ISO镜像]重新刻录)<br />
https://help.ubuntu.com/community/BootFromCD?action=AttachFile&do=get&target=incorrectcd.png<br />
<br />
=== BIOS 没有设置成从光盘启动 ===<br />
<br />
一些计算机是直接从硬盘启动的,这也很简单,进入BIOS,设定从CD-ROM启动,并要确定它启动次序在硬盘启动之前.<br />
<br />
通常进入BIOS的方法是在计算机启动是按DELETE键(这似乎成为标准了).在其他老式机上是用不同的键或组合键,例如ESC, F1, F2, F10, Ctrl-Esc, Alt-Esc, Ctrl-Alt-Esc, Ctrl-Alt-Enter, Ins甚至其他键.您需要一直按着或者按多次.了解细节的最好方法是参看用户手册或查看产品网站.<br />
<br />
* 常见的启动 BIOS界面(注意 'press DEL to enter SETUP'这行信息)<br />
https://help.ubuntu.com/community/BootFromCD?action=AttachFile&do=get&target=poweronbios.jpg <br />
<br />
* 一个典型BIOS启动菜单界面<br />
https://help.ubuntu.com/community/BootFromCD?action=AttachFile&do=get&target=biosbootmenu.png<br />
<br />
===计算机需要你按下某个键便可以设置从CD启动 ===<br />
<br />
某些计算机要求你按下一个键使它能够从CD驱动器启动,最好的帮助信息是从你的计算机手册或计算机制造厂商网站获得 . 也可以尝试以下几个常用的键.<br />
<br />
苹果计算机或其它计算机: 重新启动后按下 C 键.<br />
<br />
东芝Toshiba, IBM或其它计算机: 重新启动后按 F12 进入启动菜单[boot menu]并选择CD-ROM.<br />
<br />
其它个人计算机 : 重新启动后按 TAB 键进入启动菜单[boot menu]并选择.<br />
<br />
<br />
https://help.ubuntu.com/community/BootFromCD?action=AttachFile&do=get&target=escbiosbootmenu.png<br />
<br />
=== 当一台计算机拥有多个CD/DVD驱动器时===<br />
<br />
某些计算机当拥有超过两个或两个以上的CD/DVD驱动器时,这台计算机只允许启动一个CD/DVD驱动器,所以请重新启动计算机并尝试一下分别从不同的驱动器启动。<br />
<br />
=== BIOS 中没有设置从CD/DVD驱动器启动的选项 ===<br />
<br />
你可以下载 [http://en.wikipedia.org/wiki/RaWrite2 rawrite2.exe] (可在dos 3.2 或更高版本中运行) 和Smart Boot Manager sbm.bin(用google搜索或从你的Ubuntu CD的安装目录) 并拷贝到同一个文件夹. 准备一张空白软盘, 插入软盘驱动器并运行rawrite2.exe. 然后用这个程序生成后的软盘, 插入无法从CD启动的计算机. 确认你的BIOS设置成从软盘启动并启动计算机. 然后会出现一个菜单,选择CD-ROM并按回车[Enter], 就可从CD启动.<br />
<br />
=== CD 驱动器不支持从CD启动 (老式驱动器) ===<br />
一些老的驱动器不支持从CD启动,您可以买一个新的或者借一个,也可以尝试按上述的方法来解决'BIOS 中没有设置从CD/DVD驱动器启动的选项'的问题.<br />
----<br />
<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekenghttps://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:BootText/zh&diff=18184UbuntuHelp:BootText/zh2007-05-18T05:05:20Z<p>Ekeng:</p>
<hr />
<div>{{Copyedit translation|fromhttps://help.ubuntu.com/community/BootText}}<br />
{{From|https://help.ubuntu.com/community/BootText}}<br />
{{Translator|ekeng}}<br />
{{Languages|BootText}}<br />
<br />
<br />
本文不是提供启动图像也不是教您如何隐藏启动文字,只是让启动画面更好看而已.<br />
<br />
== 提高分辨率 ==<br />
编辑 /boot/grub/menu.lst<br />
<pre><nowiki><br />
gksudo gedit /boot/grub/menu.lst<br />
</nowiki></pre><br />
<br />
把 <code><nowiki>vga=792</nowiki></code> 加到默认的启动菜单中.<br />
例如:<br />
<pre><nowiki><br />
titleUbuntu, kernel 2.6.10-5-k7 Default <br />
root(hd0,0)<br />
kernel/vmlinuz root=/dev/hde6 ro quiet splash vga=792<br />
initrd/initrd.img<br />
savedefault<br />
boot<br />
</nowiki></pre><br />
<br />
== 改变"[ ok ]"的颜色 ==<br />
<br />
'''注:5.10 Breezy中无法使用. 解决方法[http://www.ubuntuforums.org/showpost.php?p=395004&postcount=37 点此].''' (ed. 28/12/2005)<br />
'''[译者注:我的Ubuntu 7.04 的init-functions文件的 log_end_msg () 函数不是如下所述,因此没有试验成功,望高手指点.]'''<br />
<br />
我们让 "[ ok ]" 启动时变绿.<br />
<br />
* 编辑 /lib/lsb/init-functions<br />
<pre><nowiki><br />
gksudo gedit /lib/lsb/init-functions<br />
</nowiki></pre><br />
<br />
* 找到log_end_msg () 函数, 通常在文件的底部,把<code><nowiki>GREEN=`$TPUT setaf 2`</nowiki></code> 添加<code><nowiki>RED=`$TPUT setaf 1`</nowiki></code>的下方.<br />
* 把 <code><nowiki>echo "$UP$END[ ok ]"</nowiki></code> 改成 <code><nowiki>echo "$UP$END[ ${GREEN}ok${NORMAL} ]"</nowiki></code><br />
<br />
函数应像以下这样:<br />
<pre><nowiki><br />
log_end_msg () {<br />
<br />
[ -z "$1" ] && return 1<br />
<br />
TPUT=/usr/bin/tput<br />
EXPR=/usr/bin/expr<br />
if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then<br />
COLS=`$TPUT cols`<br />
if [ -n "$COLS" ]; then<br />
COL=`$EXPR $COLS - 7`<br />
else<br />
COL=73<br />
fi<br />
<br />
UP=`$TPUT cuu1`<br />
END=`$TPUT hpa $COL`<br />
START=`$TPUT hpa 0`<br />
RED=`$TPUT setaf 1`<br />
GREEN=`$TPUT setaf 2`<br />
NORMAL=`$TPUT op`<br />
if [ $1 -eq 0 ]; then<br />
echo "$UP$END[ ${GREEN}ok${NORMAL} ]"<br />
else<br />
echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"<br />
fi<br />
else<br />
if [ $1 -eq 0 ]; then<br />
echo " ...done."<br />
else<br />
echo " ...fail!"<br />
fi<br />
fi<br />
return $1<br />
}<br />
</nowiki></pre><br />
<br />
== 最终结果 ==<br />
重启,分辨率应该提高了, [ ok ] 的颜色应该变绿了.<br />
<br />
参考: [http://www.ubuntuforums.org/showthread.php?t=50054&highlight=spice dudinatrix]<br />
----<br />
[[category:CategoryDocumentation]]<br />
<br />
[[category:UbuntuHelp]]</div>Ekeng