-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
235 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ sudo: false | |
|
||
rvm: | ||
- 2.3.0 | ||
- 2.0.0 | ||
|
||
branches: | ||
only: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ collections: | |
# comment | ||
comments: | ||
duoshuo: | ||
name: havanna | ||
name: | ||
rcomments: | ||
num: 10 | ||
avatar: 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
layout: post | ||
title: "Systemd 232 导致 Docker container 启动问题" | ||
category: Linux | ||
tags: [Systemd, Docker] | ||
--- | ||
|
||
#### 问题 | ||
|
||
近期又一次在 Gentoo 下做了一个升级维护,期间遇到了一个问题,Docker container 死活启动不起来,有点懵逼。 | ||
|
||
回想近期做的维护更新,无非 kernel 从 4.4.* LTS 升级到 4.9.* LTS,docker 从 1.11 升级到 1.13,还有一些系统级的维护。发生这个问题,有点让人猝不及防。问题总是要解决的,于是一点点排查起来。 | ||
|
||
$ docker-compose up -d | ||
Creating redis | ||
|
||
ERROR: for redis Cannot start service redis: containerd: container not started | ||
ERROR: Encountered errors while bringing up the project. | ||
|
||
查看一下日志 `systemctl status docker`: | ||
|
||
<!-- more --> | ||
|
||
...... | ||
Jan 21 13:52:32 iMac dockerd[16269]: time="2017-01-21T13:52:32.431087496+08:00" level=warning msg="failed to retrieve docker-init version: unknown output format: tini version 0.13.2\n" | ||
Jan 21 13:52:32 iMac dockerd[16269]: time="2017-01-21T13:52:32.823126391+08:00" level=error msg="containerd: start container" error="containerd: container not started" id=a863dc7a53c2ad23020187161f8f782072061550a7834b2a542e7d5a05584e47 | ||
Jan 21 13:52:32 iMac dockerd[16269]: time="2017-01-21T13:52:32.823493109+08:00" level=error msg="Create container failed with error: containerd: container not started" | ||
Jan 21 13:52:33 iMac dockerd[16269]: time="2017-01-21T13:52:33.150447827+08:00" level=error msg="Handler for POST /v1.21/containers/a863dc7a53c2ad23020187161f8f782072061550a7834b2a542e7d5a05584e47/start returned error: containerd: container not started" | ||
...... | ||
|
||
看不出错误,只有一个警告。 | ||
|
||
那么直接 `docker run` 看输出呢: | ||
|
||
$ docker run --rm hello-world | ||
container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:53: mounting \\\"cgroup\\\" to rootfs \\\"/var/lib/docker/overlay/700b3203dc8c3f997c72ab6fcb10000b5d9a64401c0ec7524cfb1ca4a7b7a876/merged\\\" at \\\"/sys/fs/cgroup\\\" caused \\\"no subsystem for mount\\\"\"" | ||
docker: Error response from daemon: containerd: container not started. | ||
|
||
OK,找到了,十有八九是 cgroup 问题: | ||
|
||
> container init caused "rootfs_linux.go:53: mounting "cgroup" to rootfs "/var/lib/docker/overlay/700b3203dc8c3f997c72ab6fcb10000b5d9a64401c0ec7524cfb1ca4a7b7a876/merged" at /sys/fs/cgroup caused "no subsystem for mount" | ||
以此为关键词,直接去 github issues 搜,终于找到问题根源,果然是最新的 systemd 232 的问题,然后才想到这次维护中有 systemd 的更新,具体来说,就是 systemd v32 以 cgroup v2 结构层次挂载导致 runc 出现错误提示 **“no subsystem for mount”**,[systemd/systemd#3965](https://github.com/systemd/systemd/pull/3965)。 | ||
|
||
#### 解决方案 | ||
|
||
既然根源找到了,那么解决方案也就明确了。共两种解决方案,任选其一: | ||
|
||
- 所有 container 启动时添加一个参数 `-v /sys/fs/cgroup:/sys/fs/cgroup:ro` | ||
- 添加 `systemd.legacy_systemd_cgroup_controller=yes` 到你的 grub2、syslinux 等启动器的内核启动参数中 | ||
|
||
我使用的是第二种方案。 | ||
|
||
参考: | ||
|
||
- <https://github.com/docker/docker/issues/28109> | ||
- <https://github.com/systemd/systemd/pull/3965> |
104 changes: 104 additions & 0 deletions
104
_posts/2017-01-24-macos-installation-guide-for-thinkpad-x230.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
layout: post | ||
title: "ThinkPad X230 安装黑苹果" | ||
category: Mac | ||
tags: [ThinkPad] | ||
--- | ||
|
||
用 [ThinkPad X220]({% post_url 2015-11-22-os-x-el-capitan-installation-guide-for-thinkpad-x220 %}) 跟人家替换了 ThinkPad X230,也有一段时间了,这不,快年底了,终于闲下来,然而耐不住骚动的心,又开始入了黑苹果的坑。 | ||
|
||
首先要说明的是,X230 以后,就不存在 BIOS 白名单了,所以,要么上烧录夹硬刷 BIOS 芯片,要么就换个白名单中在黑果上免驱的无线网卡。我采用的是后者,淘宝上淘了块 ar9285 无线网卡。 | ||
|
||
#### 一. BIOS 设置 | ||
|
||
首先,直接去官网下载最新版的 BIOS 来升级:[BIOS Update Utility V2.67](http://support.lenovo.com/us/zh/products/Laptops-and-netbooks/ThinkPad-X-Series-laptops/ThinkPad-X230/downloads/DS029187) | ||
|
||
然后按照如下 BIOS 设置: | ||
|
||
<!-- more --> | ||
|
||
``` | ||
Config | ||
Network | ||
Wake On Lan: Disabled | ||
USB | ||
USB UEFI BIOS Support: Enabled | ||
Always On USB: Disabled | ||
USB 3.0 Mode: Enabled | ||
Serial ATA (SATA) | ||
Serial SATA Controller Mode Option: AHCI | ||
Power | ||
Intel (R) Rapid Start Technology: Disabled | ||
Security | ||
Fingerprint | ||
Predesktop Authentication: Disabled | ||
Security Chip | ||
Security Chip: Disabled | ||
Memory Protection | ||
Execution Prevention: Enabled | ||
Virtualization | ||
Intel (R) Virtualization Technology: Disabled | ||
Intel (R) VT-d Feature: Disabled | ||
I/O Port Access | ||
Fingerprint Reader: Disabled | ||
Anti-Theft | ||
Current Setting: Disabled | ||
Computrace | ||
Current Setting: Disabled | ||
Secure Boot | ||
Secure Boot: Disabled | ||
Startup | ||
Network Boot: PCI LAN | ||
UEFI/Legacy Boot: UEFI Only | ||
CSM Support: no | ||
Boot Mode: Quick | ||
``` | ||
|
||
#### 二. CLOVER | ||
|
||
同样,usb安装盘的制作以及如何安装就不说了,太多的文章。Clover 相关的配置,可以直接从这里提取:[EFI for macOS Sierra on ThinkPad X230](https://pan.baidu.com/s/1pLLZGRD)(2017-11-10 更新),解压开,将EFI 目录直接拷贝至你的 U 盘安装盘的 EFI 分区,或者拷贝至你系统盘的 EFI 分区。 | ||
|
||
##### EFI | ||
|
||
我的 EFI 目录树,所有驱动都通过 dsdt 与 clover 来解决。 | ||
|
||
``` | ||
EFI | ||
├── BOOT | ||
│ └── BOOTX64.efi | ||
└── CLOVER | ||
├── ACPI | ||
│ ├── WINDOWS | ||
│ ├── origin | ||
│ │ ├── Clean DSDT.dsl | ||
│ │ └── ssdt.dsl | ||
│ └── patched | ||
│ ├── DSDT.aml | ||
│ └── SSDT.aml | ||
├── CLOVERX64.efi | ||
├── config.plist | ||
├── drivers64UEFI | ||
├── kexts | ||
│ └── Other | ||
│ ├── ACPIBatteryManager.kext | ||
│ ├── ACPISensors.kext | ||
│ ├── AppleALC.kext | ||
│ ├── AppleIntelE1000e.kext | ||
│ ├── BrcmFirmwareRepo.kext | ||
│ ├── BrcmPatchRAM2.kext | ||
│ ├── CPUSensors.kext | ||
│ ├── FakeSMC.kext | ||
│ ├── GPUSensors.kext | ||
│ ├── HibernationFixup.kext | ||
│ ├── IntelGraphicsFixup.kext | ||
│ ├── LPCSensors.kext | ||
│ ├── Lilu.kext | ||
│ └── VoodooPS2Controller.kext | ||
├── themes | ||
│ └── embedded | ||
└── tools | ||
``` | ||
|
||
暂停更新... | ||
|
||
参考:<https://github.com/Bizzaro/x230-osx/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Archive | ||
title: "归档" | ||
layout: page | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Categories | ||
title: "目录" | ||
layout: page | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Tags | ||
title: "标签" | ||
layout: page | ||
--- | ||
|
||
|