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 5 years have passed since last update.

いま再びのシステムまぎちゃんへの道〜Fedora を頑張る〜

Posted at

CentOS版のまぎちゃんが使われなくなって幾星霜。
なんかこの話すると知人が馬鹿にするんです。
CentOSなんかもうオワコンなんだそうです。
しかも、ラズパイ用に出ているCentOSは32ビットなので、そこでまた知人に失笑されるわけですよ。

…というわけで、

システムまぎちゃん〜Fedora奮闘編〜そのいち、OSを入れる。

です。目的は64bit環境の取得です。

そこで今回は、ドキュメントを読みながらFedoraをインスコしてみたいと思います。
ドキュメントは以下のURLにあります。
https://fedoraproject.org/wiki/Architectures/ARM/Raspberry_Pi
とりあえず今日のところは、Fedora Workstationを入れて操作ができるかどうか
試してみたいと思います。

では、必要なもから。
ラズパイ(今回はまぎちゃんのうち一番害のなさそうなものを使用)一個
クオリティーの高いSDカード(ってドキュメントに書いてあるんですおそらく)一枚
HDMI端子付きのディスプレイかTVとUSBキーボードとマウス

でSDカードに必要なもの
カードリーダー/ライター
パソコン(Linuxでもよし)

気をつけよう、毎日通る道だけど…。

ということで、まずは下ごしらえから。
ダウンロードするのは64ビットのものです。32ビットを入れるとCentOSと同じことになってしまいます。
aarch64 supported images for Raspberry Pi 3
の中から Workstation をダウンロードします。

で、ダウンロードしてる間に次に何をするか、ドキュメントを読み進めます。
の前に、SDカードをフォーマットしておきます。本当はしなくてもいいかも。

[root@misumi dev]# fdisk /dev/sdc 
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sdc: 31.0 GB, 30953963520 bytes, 60456960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x05343952

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      411647      204800    6  FAT16
/dev/sdc2          411648     2508799     1048576   83  Linux
/dev/sdc3         2508800    23068671    10279936   83  Linux

Command (m for help): d
Partition number (1-3, default 3): 
Partition 3 is deleted

Command (m for help): d
Partition number (1,2, default 2): 
Partition 2 is deleted

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): p

Disk /dev/sdc: 31.0 GB, 30953963520 bytes, 60456960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x05343952

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@misumi dev]# mkfs.ext4  /dev/sdc
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1892352 inodes, 7557120 blocks
377856 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2155872256
231 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

[root@misumi dev]# 

今回は
Linuxで
マニュアルで
インストールをします。
Wikiでは

$ xzcat Fedora-IMAGE-NAME.raw.xz | sudo dd status=progress bs=4M of=/dev/XXX #  場所に合わせてXXXは書き換える。

となっていますので、/dev/XXXのところを書き換えてSDカードにカキコします。

おっと、イメージが落とせたようですので、書き込みますが、これはしばらくかかります。
で、書き込みが終わったらパーティションを拡張せよとWikiには書いております。
拡張はふたパターンあり、ブートする前に拡張する方法と、ブート後に行う方法とあるみたいです。
前者をおこなうときには、先にdnfコマンドで

# dnf install -y arm-image-installer

とするところから始めるみたいです。ところがどっこい、私のマシンではdnfが使えないみたいなので後者を選択して拡張してみたいと思います。

とりあえず、書き込みが終わったので、ラズパイにキーボードとマウスとLANケーブルを差して
電源を入れます。

うーん、最初の機動に20分以上かかっています。何も悪いことしていないのに…。

さすがにこれは掛かりすぎと思ったので、今日のところは Workstation はあきらめ、Minimalをインストールしました。

ではパーティションの拡張

[evakichi@localhost ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        417M     0  417M   0% /dev
tmpfs           476M     0  476M   0% /dev/shm
tmpfs           476M  724K  476M   1% /run
/dev/mmcblk0p3  3.3G  1.3G  1.9G  40% /
tmpfs           476M   40K  476M   1% /tmp
/dev/mmcblk0p2  976M   71M  839M   8% /boot
/dev/mmcblk0p1  599M   32M  568M   6% /boot/efi
tmpfs            96M     0   96M   0% /run/user/0
tmpfs            96M     0   96M   0% /run/user/1000

[root@localhost ~]# growpart /dev/mmcblk0 3
CHANGED: partition=3 start=3328000 old: size=7157760 end=10485760 new: size=57128927 end=60456927
[root@localhost ~]# resize2fs /dev/mmcblk0p3
resize2fs 1.45.3 (14-Jul-2019)
Filesystem at /dev/mmcblk0p3 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
The filesystem on /dev/mmcblk0p3 is now 7141115 (4k) blocks long.

[root@localhost ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        417M     0  417M   0% /dev
tmpfs           476M     0  476M   0% /dev/shm
tmpfs           476M  732K  476M   1% /run
/dev/mmcblk0p3   27G  1.5G   25G   6% /
tmpfs           476M   40K  476M   1% /tmp
/dev/mmcblk0p2  976M   71M  839M   8% /boot
/dev/mmcblk0p1  599M   32M  568M   6% /boot/efi
tmpfs            96M     0   96M   0% /run/user/0
tmpfs            96M     0   96M   0% /run/user/1000

これで拡張は終了。

初期設定も終わったので、次に進みますが、今日はここまで。

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?