BeagleBone Blackをoverlayroot化

先日ひさしぶりに火を入れたBeagleBone Blackをoverlayroot化してみました。BeagleBone Blackの場合にはhttps://github.com/chesty/overlayroot を使えば非常に簡単でした。

インストール

https://github.com/chesty/overlayroot をcloneしてきて、install.sh をルート権限で実行すると勝手にやってくれます。最初の initramfs を作るあたりが何も表示が出ないので心配になりますが。

debian@beaglebone:~$ git clone https://github.com/chesty/overlayroot
Cloning into 'overlayroot'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 92 (delta 2), reused 4 (delta 2), pack-reused 84
Unpacking objects: 100% (92/92), done.
debian@beaglebone:~$ cd overlayroot/
debian@beaglebone:~/overlayroot$ sudo ./install.sh 
grep: /boot/config.txt: No such file or directory
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  busybox
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 419 kB of archives.
After this operation, 630 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main armhf busybox armhf 1:1.30.1-4 [419 kB]
Fetched 419 kB in 0s (4518 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "ja_JP.UTF-8",
	LC_MONETARY = "ja_JP.UTF-8",
	LC_ADDRESS = "ja_JP.UTF-8",
	LC_TELEPHONE = "ja_JP.UTF-8",
	LC_NAME = "ja_JP.UTF-8",
	LC_MEASUREMENT = "ja_JP.UTF-8",
	LC_IDENTIFICATION = "ja_JP.UTF-8",
	LC_NUMERIC = "ja_JP.UTF-8",
	LC_PAPER = "ja_JP.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package busybox.
(Reading database ... 73157 files and directories currently installed.)
Preparing to unpack .../busybox_1%3a1.30.1-4_armhf.deb ...
Unpacking busybox (1:1.30.1-4) ...
Setting up busybox (1:1.30.1-4) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for initramfs-tools (0.133+deb10u1) ...
update-initramfs: Generating /boot/initrd.img-4.19.94-ti-r42
debian@beaglebone:~/overlayroot$ 

これで再起動するとoverlayroot化されていますが、再起動する前に .bashrc をRaspberry Piの時と同様に修正して区別が付くようにしておきます。

アップデートの適用などが必要な場合にはroot権限でoverlay/rootworkを実行するとchrootによってoverlay無しの環境で作業できます。

~ $ ssh debian@beaglebone.local
Debian GNU/Linux 10
BeagleBoard.org Debian Buster IoT Image 2020-04-06
Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
default username:password is [debian:temppwd]

debian@beaglebone.local's password: 
Last login: Thu Dec 17 13:01:28 2020 from 192.168.1.252

*CAUTION*: overlayfs enabled
debian@beaglebone:~ $ sudo overlayroot/rootwork 
root@beaglebone:/# mount               
/dev/mmcblk0p1 on / type ext4 (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=49504k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
sysfs on /sys type sysfs (rw,relatime)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=218800k,nr_inodes=54700,mode=755)
root@beaglebone:/# sudo apt update
(中略)
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@beaglebone:/# sudo apt upgrade
(中略)
root@beaglebone:/# exit
mount: /overlay/lower: mount point is busy.
Failed to remount /overlay/lower read-only, possibly because of an open file.
The best thing to do would be to reboot now
debian@beaglebone:~ $ sudo reboot
debian@beaglebone:~ $ 

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)