0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Fedora Workstation Live から Silverblue をインストールする

Last updated at Posted at 2021-07-10

諸事情 により、Fedora のインストール・メディアからのインストールではインストーラがクラッシュするので、
Live イメージで起動して ostree コマンドで Sliverblue をインストールしてみた。

前提

  • 対象 PC に新規パーティション(/sysroot 用と /var 用)を作成してそこにインストールする。
    • /sysroot は md raid1
    • /var は LVM2 mirror で btrfs
  • /boot は既存のものを流用
  • 用意したファイルシステムにはラベルを付けておくと便利
    • /sysroot に SB-sysroot
    • /var に SB-var

手順

  • Fedora Workstation Live で起動する
  • ostree 関連のモジュールのインストール
# dnf install fedora-repos-ostree greenboot-rpm-ostree-grub2 osbuild-ostree ostree ostree-grub2 ostree-tests rpm-ostree
  • 用意したファイルシステムの mount
# mkdir /sysroot
# mount -L SB-sysroot /sysroot
# mount -L SB-var /sysroot/var
  • /sysroot の初期化
# ostree admin init-fs /sysroot
# cd /; ln -s sysroot/ostree .
  • Fedora 34 の場合には鍵の追加が必要

  • /boot の既存フォルダを退避

# cd /boot
# mv grub2 grub2-
# mv loader loader-
# mv loader.0 loader.0-
# mv loader.1 loader.1-
  • Silverblue イメージの取得
# ostree pull fedora:fedora/34/x86_64/silverblue
  • deploy時のエラー回避の為に次を実行
# touch /etc/default/grub
  • md raid1 で作成した /sysroot のメンバー・パーティションのものを調べておく
# blkid | fgrep SB-sysroot
/dev/md3: LABEL="SB-sysroot" UUID="c20bb89b-3552-4b71-9b83-f666decdd42c" TYPE="ext4" 
# mdadm -Ds /dev/md3
# mdadm -Ds /dev/md3 |tail -5

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       8       20        1      active sync   /dev/sdb4
       2       8       33        2      active sync   /dev/sdc1
# blkid /dev/sdc1
/dev/sdc1: UUID="6af04dcd-6224-2033-f61b-cc926fd3b549" TYPE="linux_raid_member"
  • Silverblue のインストール
    • 調べておいた uuid を下記で使用。
# ostree admin os-init fedora
# ostree admin deploy --os=fedora fedora/34/x86_64/silverblue --karg-append=root=LABEL=SB-sysroot --karg-append=rd.md.uuid=6af04dcd-6224-2033-f61b-cc926fd3b549
  • インストール先の環境を幾つか事前に修正しておく

    • cd /ostree/deploy/fedora/deploy/<今回の環境>
      • etc/selinux/config ... SELINUX=permissive とでもしておく
      • etc/fstab ... 正しく mount されるよう記述
      • etc/mdadm.conf ... SB-sysroot の記載
      • etc/shadow ... root のパスワード削除
    • cd /boot/grub2
      • grubenv ... menu_auto_hide=0
  • reboot すると無事に Silverblue が起動する筈なので、追加の環境設定を実施

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?