From ff5bb95aee78f861aa399931b9a61aafc7dda4cc Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 10 Apr 2019 00:23:45 +0800 Subject: [PATCH 1/6] PRF:20190407 Happy 14th anniversary Git- What do you love about Git.md @zhs852 --- ...versary Git- What do you love about Git.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md b/translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md index dbd343656a..cc7da478d6 100644 --- a/translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md +++ b/translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md @@ -1,55 +1,57 @@ [#]: collector: (lujun9972) [#]: translator: (zhs852) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Happy 14th anniversary Git: What do you love about Git?) [#]: via: (https://opensource.com/article/19/4/what-do-you-love-about-git) -[#]: author: (Jen Wike Huger (Red Hat) https://opensource.com/users/jen-wike/users/seth) +[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike/users/seth) Git 十四周年:你喜欢 Git 的哪一点? ====== + > Git 为软件开发所带来的巨大影响是其它工具难以企及的。 + ![arrows cycle symbol for failing faster][1] -在 Linus Torvalds 开发 Git 后的十四年间,它为软件开发所带来的影响是其它工具难以企及的—在 [StackOverflow 的 2018 年开发者调查][2] 中,87% 的受访者都表示他们使用 Git 来作为他们项目的版本控制工具。显然,没有其它工具能撼动 Git 版本控制管理工具(SCM)之王的地位。 +在 Linus Torvalds 开发 Git 后的十四年间,它为软件开发所带来的影响是其它工具难以企及的:在 [StackOverflow 的 2018 年开发者调查][2] 中,87% 的受访者都表示他们使用 Git 来作为他们项目的版本控制工具。显然,没有其它工具能撼动 Git 版本控制管理工具(SCM)之王的地位。 -为了在 4 月 7 日 Git 的十四周年这一天向 Git 表示敬意,我问了一些热衷者它们最喜欢 Git 的哪一点。以下便是他们所告诉我的: +为了在 4 月 7 日 Git 的十四周年这一天向 Git 表示敬意,我问了一些爱好者他们最喜欢 Git 的哪一点。以下便是他们所告诉我的: -_(为了便于理解,部分回答已经进行了小幅修改)_ +*(为了便于理解,部分回答已经进行了小幅修改)* -“我无法忍受 Git。无论是难以理解的术语还是它的分布式。除非使用 Gerrit 这样的插件来使它达到像 Subversion 或 Perforce 这样的集中式仓库管理器使用的工具的 50%。不过既然这次的问题是‘你喜欢 Git 的什么?’,我还是希望回答:Git 使得对复杂的源代码树操作成为可能,并且它的回滚功能使得实现一个要 20 次修改才能更正的问题变得简单起来。” — _[Sweet Tea Dorminy][3]_ +“我无法忍受 Git。无论是难以理解的术语还是它的分布式。使用 Gerrit 这样的插件才能使它像 Subversion 或 Perforce 这样的集中式仓库管理器使用的工具的一半好用。不过既然这次的问题是‘你喜欢 Git 的什么?’,我还是希望回答:Git 使得对复杂的源代码树操作成为可能,并且它的回滚功能使得实现一个要 20 次修改才能更正的问题变得简单起来。” — _[Sweet Tea Dorminy][3]_ -“我喜欢 Git 是因为它不会强制我执行特定的工作流程,并且开发团队可以自由地以适合自己的方式来进行团队开发,无论是 Pull Requests、以电子邮件递送差异或是给予所有人 Push 的权限。” — _[Andy Price][4]_ +“我喜欢 Git 是因为它不会强制我执行特定的工作流程,并且开发团队可以自由地以适合自己的方式来进行团队开发,无论是拉取请求、以电子邮件递送差异文件或是给予所有人推送的权限。” — _[Andy Price][4]_ -“我从 06、07 年的样子就开始使用 Git 了。我喜欢 Git 是因为,它既适用于那种从未离开过我电脑的小项目,也适用于团队合作和对外发行的大型项目。Git 使你可以从(几乎)所有的错误提交中回滚到先前版本,这个功能显著地减轻了我在软件版本管理方面的压力。” — _[Jonathan S. Katz][5]_ +“我从 2006、2007 年的样子就开始使用 Git 了。我喜欢 Git 是因为,它既适用于那种从未离开过我电脑的小项目,也适用于大型的团队合作的分布式项目。Git 使你可以从(几乎)所有的错误提交中回滚到先前版本,这个功能显著地减轻了我在软件版本管理方面的压力。” — _[Jonathan S. Katz][5]_ -“我很欣赏 Git 那种 [底层命令和高层命令][6] 的理念。用户可以使用 Git 有效率地分享任何形式的信息,而不需要知道其内部工作原理。也就是说,你只需要好奇心,就能使用这个没有图形界面的命令行工具了,它同时也揭示了为许多代码共享社区提供支持的内容可寻址文件系统。” — _[Matthew Broberg][7]_ +“我很欣赏 Git 那种 [底层命令和高层命令][6] 的理念。用户可以使用 Git 有效率地分享任何形式的信息,而不需要知道其内部工作原理。而好奇的人可以透过其表层的命令,而发现其为许多代码分享平台提供了支持的可以定位内容的文件系统。” — _[Matthew Broberg][7]_ “我喜欢 Git 是因为浏览、开发、构建、测试和向我的 Git 仓库中提交代码的工作几乎都能用它来完成。它经常会调动起我参与开源项目的积极性。” — _[Daniel Oh][8]_ “Git 是我用过的首个版本控制工具。数年间,它从一个可怕的工具变成了一个友好的工具。我喜欢它使你在修改代码的时候更加自信,因为它能保证你主分支的安全(除非你强制提交了一段考虑不周的代码到主分支)。你可以检出先前的提交来撤销更改,这一点也是很棒的。” — _[Kedar Vijay Kulkarni][9]_ -“我之所以喜欢 Git 是因为它淘汰了一些其它的版本控制工具。没人使用 VSS,而 Subversion 可以和 git-svn 一起使用(如果必要),BitKeeper 则和 Monotone 一样只为老一辈所知。当然,我们还有 Mercurial,不过在我几年之前用它来为 Firefox 添加 AArch64 支持时,我觉得它仍是那种还未完善的工具。部分人可能还会提到 Perforce、SourceSafe 或是其它企业级的解决方案,我只想说他们在开源世界里并不流行。” — _[Marcin Juszkiewicz][10]_ +“我之所以喜欢 Git 是因为它淘汰了一些其它的版本控制工具。没人使用 VSS,而 Subversion 可以和 git-svn 一起使用(如果必要),BitKeeper 则和 Monotone 一样只为老一辈所知。当然,我们还有 Mercurial,不过在我几年之前用它来为 Firefox 添加 AArch64 支持时,我觉得它仍是那种还未完善的工具。部分人可能还会提到 Perforce、SourceSafe 或是其它企业级的解决方案,我只想说它们在开源世界里并不流行。” — _[Marcin Juszkiewicz][10]_ -“我喜欢 SHA1 化(commit → tree → blob)的内建模型,它们十分易用。我也喜欢它的高层命令。同时我也将它作为对 JBoss/Red Hat Fuse 的修补工具。并且这个工具的确有用。我还喜欢 Git 的 [三棵树的故事][11]。” — _[Grzegorz Grzybek][12]_ +“我喜欢内置的 SHA1 化对象模型(commit → tree → blob)的简易性。我也喜欢它的高层命令。同时我也将它作为对 JBoss/Red Hat Fuse 的补丁机制。并且这种机制确实有效。我还喜欢 Git 的 [三棵树的故事][11]。” — _[Grzegorz Grzybek][12]_ -“我喜欢 [自动生成的 Git 说明页][13](这个页面虽然听起来是有关 Git 的,但是事实上这是一个没有实际意义的页面—不过它总是会给人一种像是真的 Git 页面的感觉…),这使得我对 Git 的敬意油然而生。” — _[Marko Myllynen][14]_ +“我喜欢 [自动生成的 Git 说明页][13](这个页面虽然听起来是有关 Git 的,但是事实上这是一个没有实际意义的页面,不过它总是会给人一种像是真的 Git 页面的感觉…),这使得我对 Git 的敬意油然而生。” — _[Marko Myllynen][14]_ “Git 改变了我作为开发者的生活。它使得 SCM 问题从世界上消失得无影无踪。”— _[Joel Takvorian][15]_ * * * -看完这十个热衷者的回答之后,就轮到你了:你最欣赏 Git 的什么?请在评论区分享你的看法! +看完这十个爱好者的回答之后,就轮到你了:你最欣赏 Git 的什么?请在评论区分享你的看法! -------------------------------------------------------------------------------- via: https://opensource.com/article/19/4/what-do-you-love-about-git -作者:[Jen Wike Huger (Red Hat)][a] +作者:[Jen Wike Huger][a] 选题:[lujun9972][b] 译者:[zhs852](https://github.com/zhs852) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 38367dda47b74b155e28a87a9358ba6edc21b756 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 10 Apr 2019 00:24:39 +0800 Subject: [PATCH 2/6] PUB:20190407 Happy 14th anniversary Git- What do you love about Git.md @zhs852 https://linux.cn/article-10702-1.html --- ... Happy 14th anniversary Git- What do you love about Git.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190407 Happy 14th anniversary Git- What do you love about Git.md (98%) diff --git a/translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md b/published/20190407 Happy 14th anniversary Git- What do you love about Git.md similarity index 98% rename from translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md rename to published/20190407 Happy 14th anniversary Git- What do you love about Git.md index cc7da478d6..25400372b3 100644 --- a/translated/tech/20190407 Happy 14th anniversary Git- What do you love about Git.md +++ b/published/20190407 Happy 14th anniversary Git- What do you love about Git.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (zhs852) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10702-1.html) [#]: subject: (Happy 14th anniversary Git: What do you love about Git?) [#]: via: (https://opensource.com/article/19/4/what-do-you-love-about-git) [#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike/users/seth) From dd0459fea2717f4478efa98c1cde537a2e0b91e9 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Tue, 9 Apr 2019 17:00:40 +0000 Subject: [PATCH 3/6] =?UTF-8?q?Revert=20"=E7=94=B3=E8=AF=B7=E7=BF=BB?= =?UTF-8?q?=E8=AF=91"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2016492db107f38680cde8c0ab685f3fee467d1a. --- ...easure Twice Compute Once with Xen Linux TPM 2.0 and TXT.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sources/tech/20171010 In Device We Trust Measure Twice Compute Once with Xen Linux TPM 2.0 and TXT.md b/sources/tech/20171010 In Device We Trust Measure Twice Compute Once with Xen Linux TPM 2.0 and TXT.md index 3c61f6dd8f..20c14074c6 100644 --- a/sources/tech/20171010 In Device We Trust Measure Twice Compute Once with Xen Linux TPM 2.0 and TXT.md +++ b/sources/tech/20171010 In Device We Trust Measure Twice Compute Once with Xen Linux TPM 2.0 and TXT.md @@ -1,6 +1,3 @@ -ezio is translating - - In Device We Trust: Measure Twice, Compute Once with Xen, Linux, TPM 2.0 and TXT ============================================================ From 6a9aa20ea2b572c2bbd4104bebe9614dd3c8522a Mon Sep 17 00:00:00 2001 From: Raverstern <8509855+Raverstern@users.noreply.github.com> Date: Tue, 9 Apr 2019 21:04:26 +0200 Subject: [PATCH 4/6] translation finished --- ...407 Fixing Ubuntu Freezing at Boot Time.md | 186 ------------------ ...407 Fixing Ubuntu Freezing at Boot Time.md | 186 ++++++++++++++++++ 2 files changed, 186 insertions(+), 186 deletions(-) delete mode 100644 sources/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md create mode 100644 translated/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md diff --git a/sources/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md b/sources/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md deleted file mode 100644 index a55e46d83c..0000000000 --- a/sources/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md +++ /dev/null @@ -1,186 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (Raverstern) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fixing Ubuntu Freezing at Boot Time) -[#]: via: (https://itsfoss.com/fix-ubuntu-freezing/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Fixing Ubuntu Freezing at Boot Time -====== - -_**This step-by-step tutorial shows you how to deal with Ubuntu freezing at the boot by installing proprietary NVIDIA drivers. The tutorial was performed on a newly installed Ubuntu system but it should be applicable otherwise as well.**_ - -The other day I bought an [Acer Predator laptop][1] ([affiliate][2] link) to test various Linux distribution. It’s a bulky, heavy built laptop which is in contrast to my liking of smaller, lightweight laptops like the [awesome Dell XPS][3]. - -The reason why I opted for this gaming laptop even though I don’t game on PC is [NVIDIA Graphics][4]. Acer Predator Helios 300 comes with [NVIDIA Geforce][5] GTX 1050Ti. - -NVIDIA is known for it’s poor compatibility with Linux. A number of It’s FOSS readers asked for my help with their NVIDIA laptops and I could do nothing because I didn’t have a system with NVIDIA graphics card. - -So when I decided to get a new dedicated device for testing Linux distributions, I opted for a laptop with NVIDA graphics. - -This laptop comes with Windows 10 installed on the 120 GB SSD and 1TB of HDD for storing data. I [dual booted Windows 10 with Ubuntu 18.04][6]. The installation was quick, easy and painless. - -I booted into [Ubuntu][7]. It was showing the familiar purple screen and then I noticed that it froze there. The mouse won’ move, I couldn’t type anything and nothing else could be done except turning off the device by holding the power button. - -And it was the same story at the next login try. Ubuntu just gets stuck at the purple screen even before reaching the login screen. - -Sounds familiar? Let me show you how you can fix this problem of Ubuntu freezing at login. - -Don’t use Ubuntu? - -Please note that while this tutorial was performed with Ubuntu 18.04, this would also work on other Ubuntu-based distributions such as Linux Mint, elementary OS etc. I have confirmed it with Zorin OS. - -### Fix Ubuntu freezing at boot time because of NVIDIA drivers - -![][8] - -The solution I am going to describe here works for systems with NVIDIA graphics card. It’s because your system is freezing thanks the open source [NVIDIA Nouveau drivers][9]. - -Without further delay, let’s see how to fix this problem. - -#### Step 1: Editing Grub - -When you boot your system, just stop at the Grub screen like the one below. If you don’t see this screen, keep holding Shift key at the boot time. - -At this screen, press ‘E’ key to go into the editing mode. - -![Press ‘E’ key][10] - -You should see some sort of code like the one below. You should focus on the line that starts with Linux. - -![Go to line starting with Linux][11] - -#### Step 2: Temporarily Modifying Linux kernel parameters in Grub - -Remember, our problem is with the NVIDIA Graphics drivers. This incompatibility with open source version of NVIDIA drivers caused the issue so what we can do here is to disable these drivers. - -Now, there are several ways you can try to disable these drivers. My favorite way is to disable all video/graphics card using nomodeset. - -Just add the following text at the end of the line starting with Linux. You should be able to type normally. Just make sure that you are adding it at the end of the line. - -``` -nomodeset -``` - -Now your screen should look like this: - -![Disable graphics drivers by adding nomodeset to the kernel][12] - -Press Ctrl+X or F10 to save and exit. Now you’ll boot with the newly modified kernel parameters here. - -Explanation of what we did here (click to expand) - -So, what did we just do here? What’s that nomodeset thing? Let me explain it to you briefly. - -Normally, the video/graphics card were used after the X or any other display server was started. In other words, when you logged in to your system and see graphical user interface. - -But lately, the video mode settings were moved to the kernel. Among other benefits, it enables you to have a beautiful, high resolution boot splash screens. - -If you add the nomodeset parameter to the kernel, it instructs the kernel to load the video/graphics drivers after the display server is started. - -In other words, you disabled loading the graphics driver at this time and the conflict it was causing goes away. After you login to the system and see everything because the graphics card is loaded again. - -#### Step 3: Update your system and install proprietary NVIDIA drivers - -Don’t be too happy yet just because you are able to login to your system now. What you did was temporary and the next time you boot into your system, your system will still freeze because it will still try to load the Nouveau drivers. - -Does this mean you’ll always have to edit Kernel from the grub screen? Thankfully, the answer is no. - -What you can do here is to [install additional drivers in Ubuntu][13] for NVIDIA. Ubuntu won’t freeze at boot time while using these proprietary drivers. - -I am assuming that it’s your first login to a freshly installed system. This means you must [update Ubuntu][14] before you do anything else. Open a terminal using Ctrl+Alt+T [keyboard shortcut in Ubuntu][15] and use the following command: - -``` -sudo apt update && sudo apt upgrade -y -``` - -You may try installing additional drivers in Ubuntu right after the completion of the above command but in my experience, you’ll have to restart your system before you could successfully install the new drivers. And when you restart, you’ll have to change the kernel parameter again the same way we did earlier. - -After your system is updated and restarted, press Windows key to go to the menu and search for Software & Updates. - -![Click on Software & Updates][16] - -Now go to the Additional Drivers tab and wait for a few seconds. Here you’ll see proprietary drivers available for your system. You should see NVIDIA in the list here. - -Select the proprietary driver and click on Apply Changes. - -![Installing NVIDIA Drivers][17] - -It will take some time in the installation of the new drivers. If you have UEFI secure boot enabled on your system, you’ll be also asked to set a password. _You can set it to anything that is easy to remember_. I’ll show you its implications later in step 4. - -![You may have to setup a secure boot password][18] - -Once the installation finishes, you’ll be asked to restart the system to take changes into effect. - -![Restart your system once the new drivers are installed][19] - -#### Step 4: Dealing with MOK (only for UEFI Secure Boot enabled devices) - -If you were asked to setup a secure boot password, you’ll see a blue screen that says something about “MOK management”. It’s a complicated topic and I’ll try to explain it in simpler terms. - -MOK ([Machine Owner Key][20]) is needed due to the secure boot feature that requires all kernel modules to be signed. Ubuntu does that for all the kernel modules that it ships in the ISO. Because you installed a new module (the additional driver) or made a change in the kernel modules, your secure system may treat it as an unwarranted/foreign change in your system and may refuse to boot. - -Hence, you can either sign the kernel module on your own (telling your UEFI system not to panic because you made these changes) or you simply [disable the secure boot][21]. - -Now that you know a little about [secure boot and MOK][22], let’s see what to do at the next boot when you see the blue screen at the next boot. - -If you select “Continue boot”, chances are that your system will boot like normal and you won’t have to do anything at all. But it’s possible that not all features of the new driver work correctly. - -This is why, you should **choose Enroll MOK**. - -![][23] - -It will ask you to Continue in the next screen followed by asking a password. Use the password you had set while installing the additional drivers in the previous step. You’ll be asked to reboot now. - -Don’t worry! - -If you miss this blue screen of MOK or accidentally clicked Continue boot instead of Enroll MOK, don’t panic. Your main aim is to be able to boot into your system and you have successfully done that part by disabling the Nouveau graphics driver. - -The worst case would be that your system switched to the integrated Intel graphics instead of the NVIDIA graphics. You can install the NVIDIA graphics drivers later at any point of time. Your priority is to boot into the system. - -#### Step 5: Enjoying Ubuntu Linux with proprietary NVIDIA drivers - -Once the new driver is installed, you’ll have to restart your system again. Don’t worry! Things should be better now and you won’t need to edit the kernel parameters anymore. You’ll be booting into Ubuntu straightaway. - -I hope this tutorial helped you to fix the problem of Ubuntu freezing at the boot time and you were able to boot into your Ubuntu system. - -If you have any questions or suggestions, please let me know in the comment section below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/fix-ubuntu-freezing/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://amzn.to/2YVV6rt -[2]: https://itsfoss.com/affiliate-policy/ -[3]: https://itsfoss.com/dell-xps-13-ubuntu-review/ -[4]: https://www.nvidia.com/en-us/ -[5]: https://www.nvidia.com/en-us/geforce/ -[6]: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[7]: https://www.ubuntu.com/ -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/fixing-frozen-ubuntu.png?resize=800%2C450&ssl=1 -[9]: https://nouveau.freedesktop.org/wiki/ -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/edit-grub-menu.jpg?resize=800%2C393&ssl=1 -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue.jpg?resize=800%2C343&ssl=1 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue-2.jpg?resize=800%2C320&ssl=1 -[13]: https://itsfoss.com/install-additional-drivers-ubuntu/ -[14]: https://itsfoss.com/update-ubuntu/ -[15]: https://itsfoss.com/ubuntu-shortcuts/ -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/activities_software_updates_search-e1551416201782-800x228.png?resize=800%2C228&ssl=1 -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/install-nvidia-driver-ubuntu.jpg?resize=800%2C520&ssl=1 -[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/secure-boot-nvidia.jpg?ssl=1 -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/nvidia-drivers-installed-Ubuntu.jpg?resize=800%2C510&ssl=1 -[20]: https://firmware.intel.com/blog/using-mok-and-uefi-secure-boot-suse-linux -[21]: https://itsfoss.com/disable-secure-boot-in-acer/ -[22]: https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS -[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/MOK-Secure-boot.jpg?resize=800%2C350&ssl=1 diff --git a/translated/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md b/translated/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md new file mode 100644 index 0000000000..eed2f478ff --- /dev/null +++ b/translated/tech/20190407 Fixing Ubuntu Freezing at Boot Time.md @@ -0,0 +1,186 @@ +[#]: collector: (lujun9972) +[#]: translator: (Raverstern) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fixing Ubuntu Freezing at Boot Time) +[#]: via: (https://itsfoss.com/fix-ubuntu-freezing/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +解决 Ubuntu 在启动时冻结的问题 +====== + +_**本文将向您一步步展示如何通过安装 NVIDIA 专有驱动来处理 Ubuntu 在启动过程中冻结的问题。本教程仅在一个新安装的 Ubuntu 系统上操作验证过,不过在其他情况下也理应可用。**_ + +不久前我买了台[宏碁掠夺者][1](此为[广告联盟][2]链接)笔记本电脑来测试各种 Linux 发行版。这台庞大且笨重的机器与我喜欢的,类似[戴尔 XPS][3]那般小巧轻便的笔记本电脑大相径庭。 + +我即便不打游戏也选择这台电竞笔记本电脑的原因,就是为了 [NVIDIA 的显卡][4]。宏碁掠夺者 Helios 300 上搭载了一块 [NVIDIA Geforce][5] GTX 1050Ti 显卡。 + +NVIDIA 那糟糕的 Linux 兼容性为人们所熟知。过去很多 It’s FOSS 的读者都向我求助过关于 NVIDIA 笔记本电脑的问题,而我当时无能为力,因为我手头上没有使用 NVIDIA 显卡的系统。 + +所以当我决定搞一台专门的设备来测试 Linux 发行版时,我选择了带有 NVIDIA 显卡的笔记本电脑。 + +这台笔记本原装的 Windows 10 系统安装在 120 GB 的固态硬盘上,并另外配有 1 TB 的机械硬盘来存储数据。在此之上我配置好了 [Windows 10 和 Ubuntu 18.04 双系统][6]。整个的安装过程舒适,方便,快捷。 + +随后我启动了 [Ubuntu][7]。那熟悉的紫色界面展现了出来,然后我就发现它卡在那儿了。鼠标一动不动,我也输入不了任何东西,然后除了长按电源键强制关机以外我啥事儿都做不了。 + +然后再次尝试启动,结果一模一样。整个系统就一直卡在那个紫色界面,随后的登录界面也出不来。 + +这听起来很耳熟吧?下面就让我来告诉您如何解决这个 Ubuntu 在启动过程中冻结的问题。 + +要不您考虑考虑抛弃 Ubuntu? + +请注意,尽管是在 Ubuntu 18.04 上操作的,本教程应该也能用于其他基于 Ubuntu 的发行版,例如 Linux Mint,elementary OS 等等。关于这点我已经在 Zorin OS 上确认过。 + +### 解决 Ubuntu 启动中由 NVIDIA 驱动引起的冻结问题 + +![][8] + +我介绍的解决方案适用于配有 NVIDIA 显卡的系统,因为您所面临的系统冻结问题是由开源的 [NVIDIA Nouveau 驱动][9]所导致的。 + +事不宜迟,让我们马上来看看如何解决这个问题。 + +#### 步骤 1:编辑 Grub + +在启动系统的过程中,请您在如下图所示的 Grub 界面上停下。如果您没看到这个界面,在启动电脑时请按住 Shift 键。 + +在这个界面上,按“E”键进入编辑模式。 + +![按“E”按键][10] + +您应该看到一些如下图所示的代码。此刻您应关注于以 Linux 开头的那一行。 + +![前往 Linux 开头的那一行][11] + +#### 步骤 2:在 Grub 中临时修改 Linux 内核参数 + +回忆一下,我们的问题出在 NVIDIA 显卡驱动上,是开源版 NVIDIA 驱动的不适配导致了我们的问题。所以此处我们能做的就是禁用这些驱动。 + +此刻,您有多种方式可以禁用这些驱动。我最喜欢的方式是通过 nomodeset 来禁用所有显卡的驱动。 + +请把下列文本添加到以 Linux 开头的那一行的末尾。此处您应该可以正常输入。请确保您把这段文本加到了行末。 + +``` +nomodeset +``` + +现在您屏幕上的显示应如下图所示: + +![通过向内核添加 nomodeset 来禁用显卡驱动][12] + +按 Ctrl+X 或 F10 保存并退出。下次您就将以修改后的内核参数来启动。 + +对以上操作的解释(点击展开) + +所以我们究竟做了些啥?那个 nomodeset 又是个什么玩意儿?让我来向您简单地解释一下。 + +通常来说,显卡是在 X 或者是其他显示服务开始执行后才被启用的,也就是在您登录系统并看到图形界面以后。 + +但最近,视频模式的设置被移植进了内核。这么做的众多优点之一就是能您看到一个漂亮且高清的启动画面。 + +若您往内核中加入 nomodeset 参数,它就会指示内核在显示服务启动后才加载显卡驱动。 + +换句话说,您在此时禁止视频驱动的加载,由此产生的冲突也会随之消失。您在登录进系统以后,还是能看到一切如旧,那是因为显卡驱动在随后的过程中被加载了。 + +#### 步骤 3:更新您的系统并安装 NVIDIA 专有驱动 + +别因为现在可以登录系统了就过早地高兴起来。您之前所做的只是临时措施,在下次启动的时候,您的系统依旧会尝试加载 Nouveau 驱动而因此冻结。 + +这是否意味着您将不得不在 Grub 界面上不断地编辑内核?可喜可贺,答案是否定的。 + +您可以在 Ubuntu 上为 NVIDIA 显卡[安装额外的驱动][13]。在使用专有驱动后,Ubuntu 将不会在启动过程中冻结。 + +我假设这是您第一次登录到一个新安装的系统。这意味着在做其他事情之前您必须先[更新 Ubuntu][14]。通过 Ubuntu 的 Ctrl+Alt+T [系统快捷键][15]打开一个终端,并输入以下命令: + +``` +sudo apt update && sudo apt upgrade -y +``` + +在上述命令执行完以后,您可以尝试安装额外的驱动。不过根据我的经验,在安装新驱动之前您需要先重启一下您的系统。在您重启时,您还是需要按我们之前做的那样修改内核参数。 + +当您的系统已经更新和重启完毕,按下 Windows 键打开一个菜单栏,并搜索“软件与更新”(Software & Updates)。 + +![点击“软件与更新”(Software & Updates)][16] + +然后切换到“额外驱动”(Additional Drivers)标签页,并等待数秒。然后您就能看到可供系统使用的专有驱动了。在这个列表上您应该可以找到 NVIDIA。 + +选择专有驱动并点击“应用更改”(Apply Changes)。 + +![NVIDIA 驱动安装中][17] + +新驱动的安装会费点时间。若您的系统启用了 UEFI 安全启动,您将被要求设置一个密码。_您可以将其设置为任何容易记住的密码_。它的用处我将在步骤 4 中说明。 + +![您可能需要设置一个安全启动密码][18] + +安装完成后,您会被要求重启系统以令之前的更改生效。 + +![在新驱动安装好后重启您的系统][19] + +#### 步骤 4:处理 MOK(仅针对启用了 UEFI 安全启动的设备) + +如果您之前被要求设置安全启动密码,此刻您会看到一个蓝色界面,上面写着“MOK management”。这是个复杂的概念,我试着长话短说。 + +对 MOK([设备所有者密码][20])的要求是因为安全启动的功能要求所有内核模块都必须被签名。Ubuntu 中所有随 ISO 镜像发行的内核模块都已经签了名。由于您安装了一个新模块(也就是那额外的驱动),或者您对内核模块做了修改,您的安全系统可能视之为一个未经验证的外部修改,从而拒绝启动。 + +因此,您可以自己对系统模块进行签名(以告诉 UEFI 系统莫要大惊小怪,这些修改是您做的),或者您也可以简单粗暴地[禁用安全启动][21]。 + +现在你对[安全启动和 MOK ][22]有了一定了解,那咱们就来看看在遇到这个蓝色界面后该做些什么。 + +如果您选择“继续启动”,您的系统将有很大概率如往常一样启动,并且您啥事儿也不用做。不过在这种情况下,新驱动的有些功能有可能工作不正常。 + +这就是为什么,您应该**选择注册 MOK **。 + +![][23] + +它会在下一个页面让您点击“继续”,然后要您输入一串密码。请输入在上一步中,在安装额外驱动时设置的密码。 + +别担心! + +如果您错过了这个关于 MOK 的蓝色界面,或不小心点了“继续启动”而不是“注册 MOK”,不必惊慌。您的主要目的是能够成功启动系统,而通过禁用 Nouveau 显卡驱动,您已经成功地实现了这一点。 + +最坏的情况也不过就是您的系统切换到 Intel 集成显卡而不再使用 NVIDIA 显卡。您可以之后的任何时间安装 NVIDIA 显卡驱动。您的首要任务是启动系统。 + +#### 步骤 5:享受安装了专有 NVIDIA 驱动的 Linux 系统 + +当新驱动被安装好后,您需要再次重启系统。别担心!目前的情况应该已经好起来了,并且您不必再去修改内核参数,而是能够直接启动 Ubuntu 系统了。 + +我希望本教程帮助您解决了 Ubuntu 系统在启动中冻结的问题,并让您能够成功启动 Ubuntu 系统。 + +如果您有任何问题或建议,请在下方评论区给我留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fix-ubuntu-freezing/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[Raverstern](https://github.com/Raverstern) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://amzn.to/2YVV6rt +[2]: https://itsfoss.com/affiliate-policy/ +[3]: https://itsfoss.com/dell-xps-13-ubuntu-review/ +[4]: https://www.nvidia.com/en-us/ +[5]: https://www.nvidia.com/en-us/geforce/ +[6]: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[7]: https://www.ubuntu.com/ +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/fixing-frozen-ubuntu.png?resize=800%2C450&ssl=1 +[9]: https://nouveau.freedesktop.org/wiki/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/edit-grub-menu.jpg?resize=800%2C393&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue.jpg?resize=800%2C343&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue-2.jpg?resize=800%2C320&ssl=1 +[13]: https://itsfoss.com/install-additional-drivers-ubuntu/ +[14]: https://itsfoss.com/update-ubuntu/ +[15]: https://itsfoss.com/ubuntu-shortcuts/ +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/activities_software_updates_search-e1551416201782-800x228.png?resize=800%2C228&ssl=1 +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/install-nvidia-driver-ubuntu.jpg?resize=800%2C520&ssl=1 +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/secure-boot-nvidia.jpg?ssl=1 +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/nvidia-drivers-installed-Ubuntu.jpg?resize=800%2C510&ssl=1 +[20]: https://firmware.intel.com/blog/using-mok-and-uefi-secure-boot-suse-linux +[21]: https://itsfoss.com/disable-secure-boot-in-acer/ +[22]: https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/MOK-Secure-boot.jpg?resize=800%2C350&ssl=1 From da8c75ab9adc1a2081f6b4d7f89709828dde3d55 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 10 Apr 2019 08:52:27 +0800 Subject: [PATCH 5/6] translated --- ...l command line arguments with Fedora 30.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {sources => translated}/tech/20190327 Setting kernel command line arguments with Fedora 30.md (53%) diff --git a/sources/tech/20190327 Setting kernel command line arguments with Fedora 30.md b/translated/tech/20190327 Setting kernel command line arguments with Fedora 30.md similarity index 53% rename from sources/tech/20190327 Setting kernel command line arguments with Fedora 30.md rename to translated/tech/20190327 Setting kernel command line arguments with Fedora 30.md index caa8c1db59..da532df4ae 100644 --- a/sources/tech/20190327 Setting kernel command line arguments with Fedora 30.md +++ b/translated/tech/20190327 Setting kernel command line arguments with Fedora 30.md @@ -7,58 +7,58 @@ [#]: via: (https://fedoramagazine.org/setting-kernel-command-line-arguments-with-fedora-30/) [#]: author: (Laura Abbott https://fedoramagazine.org/makes-fedora-kernel/) -Setting kernel command line arguments with Fedora 30 +在 Fedora 30 中设置内核命令行参数 ====== ![][1] -Adding options to the kernel command line is a common task when debugging or experimenting with the kernel. The upcoming Fedora 30 release made a change to use Bootloader Spec ([BLS][2]). Depending on how you are used to modifying kernel command line options, your workflow may now change. Read on for more information. +在调试或试验内核时,向内核命令行添加选项是一项常见任务。即将发布的 Fedora 30 版本改为使用 Bootloader 规范([BLS] [2])。根据你修改内核命令行选项的方式,你的工作流可能会更改。继续阅读获取更多信息。 -To determine if your system is running with BLS or the older layout, look in the file +要确定你的系统是使用 BLS 还是旧的规范,请查看文件: ``` /etc/default/grub ``` -If you see +如果你看到: ``` GRUB_ENABLE_BLSCFG=true ``` -in there, you are running with the BLS setup and you may need to change how you set kernel command line arguments. +看到这个,你运行的是 BLS,你可能需要更改设置内核命令行参数的方式。 -If you only want to modify a single kernel entry (for example, to temporarily work around a display problem) you can use a grubby command +如果你只想修改单个内核条目(例如,暂时解决显示问题),可以使用 grubby 命令: ``` $ grubby --update-kernel /boot/vmlinuz-5.0.1-300.fc30.x86_64 --args="amdgpu.dc=0" ``` -To remove a kernel argument, you can use the +要删除内核参数,可以传递 ``` --remove-args ``` -argument to grubby +参数给 grubby ``` $ grubby --update-kernel /boot/vmlinuz-5.0.1-300.fc30.x86_64 --remove-args="amdgpu.dc=0" ``` -If there is an option that should be added to every kernel command line (for example, you always want to disable the use of the rdrand instruction for random number generation) you can run a grubby command: +如果有应该添加到每个内核命令行的选项(例如,你希望禁用 rdrand 指令生成随机数),则可以运行 grubby 命令: ``` $ grubby --update-kernel=ALL --args="nordrand" ``` -This will update the command line of all kernel entries and save the option to the saved kernel command line for future entries. +这将更新所有内核条目的命令行,并保存作为将来条目的命令行选项。 -If you later want to remove the option from all kernels, you can again use +如果你想要从所有内核中删除该选项,则可以再次使用 ``` --remove-args ``` -with +还有 ``` --update-kernel=ALL @@ -74,7 +74,7 @@ via: https://fedoramagazine.org/setting-kernel-command-line-arguments-with-fedor 作者:[Laura Abbott][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 67a0595661287a804cc5b1932c0d28d99d45351e Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 10 Apr 2019 08:55:31 +0800 Subject: [PATCH 6/6] translating --- .../tech/20190402 Parallel computation in Python with Dask.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190402 Parallel computation in Python with Dask.md b/sources/tech/20190402 Parallel computation in Python with Dask.md index 81a0bcb41f..61921f34d4 100644 --- a/sources/tech/20190402 Parallel computation in Python with Dask.md +++ b/sources/tech/20190402 Parallel computation in Python with Dask.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( )