LoginSignup
1
1

More than 5 years have passed since last update.

失敗:CoreOSをXFS上にインストールしたいけど

Posted at

結局起動に失敗。

CoreOS isoをダウンロード。
https://coreos.com/os/docs/latest/booting-with-iso.html

Virtual Boxで起動。
ユーザー名core (パスワードなし)でログイン

sudo passwd core

てきとうにかえる

sshでアクセス(sshdはたちあがっている)

パスワード作成
CoreOS上で

mkpasswd --method=SHA-512 --rounds=4096

例:「入力値はcore」

bash-4.3# mkpasswd --method=SHA-512 --rounds=4096
Password: 
$6$rounds=4096$wJoay94miFr$Dm7ag3dNrhWVe7lBoEwjklJtTs7sBFV1KKz/XPGju/Q6FnkU8iFVZoORJ/TL7Lg9ZJgwv6PoApRUuzBCsfSGu.
bash-4.3# mkpasswd --method=SHA-512 --rounds=4096
Password: 
$6$rounds=4096$B./GBnd5uZ$hJ2lF5YNeFSun5Sd5DJtDww6TwXpi0D6OFMmljUXdiQNFQcczlGsjzmE9lP7vXVnriqrRU3YeMBapdO/DD95./
bash-4.3# 

これは毎回違ってもいいのですか...?

ignitionのjsonを書きます。適宜修正してください。

vi ign.json
ign.json
{
  "ignition": {
    "config": {},
    "timeouts": {},
    "version": "2.1.0"
  },
  "networkd": {},
  "passwd": {
    "users": [
      {
        "groups": [
          "wheel",
          "plugdev"
        ],
        "homeDir": "/home/core",
        "name": "core",
        "noCreateHome": false,
        "passwordHash": "$6$rounds=4096$wJoay94miFr$Dm7ag3dNrhWVe7lBoEwjklJtTs7sBFV1KKz/XPGju/Q6FnkU8iFVZoORJ/TL7Lg9ZJgwv6PoApRUuzBCsfSGu.",
        "sshAuthorizedKeys": [
          "てきぎおきかえてください"
        ],
        "shell": "/bin/bash"
      }
    ]
  },
  "systemd": {},
  "storage": {
     "disks": [{
      "device": "/dev/sda",
      "wipeTable": true,
      "partitions": [{
        "label": "ROOT",
        "number": 0,
        "size": 0,
        "start": 0
      }]
    }],
    "filesystems": [{
      "mount": {
        "device": "/dev/sda1",
        "format": "xfs",
        "wipeFilesystem": true,
        "options": [ "-L", "ROOT" ]
      }
    }]
  }
}

正当なものであるか、確認できます
https://coreos.com/validate/

インストール

sudo coreos-install -d /dev/sda -i ign.json -v

再起動すればめでたしのはずが、journalctlがお出ましして失敗。

参考文献

https://qiita.com/gasegi/items/2b79eac4110a6ac8972d
https://coreos.com/ignition/docs/latest/
https://coreos.com/os/docs/latest/clc-examples.html
https://coreos.com/ignition/docs/latest/examples.html
http://virtualelephant.com/2017/11/16/infrastructure-as-code-understanding-coreos-ignition/

参考しなかった文献

https://qiita.com/a-killer-bee/items/564d51034c125d192df3
https://aoshimak.hatenadiary.jp/entry/20170114/p1

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1