から「“Flasher” Debian images」の「AM3358 Debian10.32020-04-064GB eMMCIoT Flasher image」からイメージをダウンロード
$ wget -c https://debian.beagleboard.org/images/bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz $ sha256sum ./bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz e339459077b83f6458cb3432494954582aedad897b9f3b62fa390dfdb010a9df ./bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz
イメージをmicroSD cardに書き込み.
$ sudo wipefs -a /dev/sdc $ xzcat ./bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz | pv | sudo dd of=/dev/sdc bs=4M ;sync $ sudo eject /dev/sdc
電源の入っていない BBB にmicroSDを接続して user/boot ボタン(microSDの上のあたりのS2のシルクのボタン)を押しながら電源を接続する.書き込みが終わるまで待つ.
書き込み中はminiUSBの上のUSR LEDが左右に順に光る.
USR LEDx4が同時に2回づつ点滅すると書き込み終了の合図.電源を切り,microSD cardを取り出し再度電源を接続する.
……手元のBBBのeMMCは2GBのモデルなので容量不足で書き込みに失敗
「Debian console images」は1GBなんだけど,
Debian console images via microSD card (without flashing the eMMC)
でmicroSD card で運用になりそう
手元のBBBはeMMCが2GBで最近のイメージは4GB〜のよう.古いイメージは使いたくない. 1GBのイメージは 「without flashing the eMMC」となっているけどこれをeMMC に書き込めないか試してみた.
の
Debian console images via microSD card (without flashing the eMMC)
から 「AM3358 Debian 10.3 2020-04-06 1GB SD console」をダウンロード.
$ wget -c https://debian.beagleboard.org/images/bone-debian-10.3-console-armhf-2020-04-06-1gb.img.xz $ sha256sum bone-debian-10.3-console-armhf-2020-04-06-1gb.img.xz 0fd458c8eb7854478426b671d1b8318553e4569e8ca15cff66e4bfb438343c10 bone-debian-10.3-console-armhf-2020-04-06-1gb.img.xz
このイメージをmicroSD に書き込み
$ sudo wipefs -a /dev/sdc $ xzcat ./bone-debian-10.3-console-armhf-2020-04-06-1gb.img.xz | pv | sudo dd of=/dev/sdc bs=4M ;sync $ sudo eject /dev/sdc
電源の入っていない BBB にmicroSDを接続して電源を接続する. しばらく待って接続.
以下のようにパーティションを設定してフォーマットする.
$ sudo fdisk -l /dev/mmcblk1 Disk /dev/mmcblk1: 1.79 GiB, 1920991232 bytes, 3751936 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 Disklabel type: dos Disk identifier: 0xc306743f Device Boot Start End Sectors Size Id Type /dev/mmcblk1p1 * 2048 34815 32768 16M e W95 FAT16 (LBA) /dev/mmcblk1p2 34816 3751935 3717120 1.8G 83 Linux $ sudo mkfs.vfat -F 16 /dev/mmcblk1p1 $ sudo mkfs.ext4 /dev/mmcblk1p2
mmcblk1p1 を mount して /opt/backup/uboot/MLO と /opt/backup/uboot/u-boot.img をcp,
mmcblk1p2(/) に sudo cp -ax / ${TARGET}
でイメージをコピー
完了したらアンマウントしてシャットダウン.microSD card を取り外して起動
$ pfetch _____ debian@beaglebone / __ \ os Debian GNU/Linux 10 (buster) | / | host TI AM335x BeagleBone Black | \___- kernel 4.19.94-ti-r42 -_ uptime 3m --_ pkgs 258 memory 51M / 483M
$ pfetch _____ debian@beaglebone / __ \ os Debian GNU/Linux 11 (bullseye) | / | host TI AM335x BeagleBone Black | \___- kernel 5.10.65-ti-r28 -_ uptime 43m --_ pkgs 287 memory 53M / 480M
参考URL
* 第4章 Debian 10 \(buster\) からのアップグレード
不必要なパッケージがあれば削除する.今回無線を使う予定はないので削除.
$ sudo apt purge wireless-tools wpasupplicant bluez firmware-brcm80211 $ sudo apt autoremove
$ sudo apt edit-sourcces
で /etc/apt/sources.list
を修正して bullseye
用にする.※bullseye-security に注意
deb http://deb.debian.org/debian bullseye main contrib non-free #deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free #deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free deb http://deb.debian.org/debian-security bullseye-security main contrib non-free #deb-src http://deb.debian.org/debian-security bullseye-security main contrib non-free #Kernel source (repos.rcn-ee.com) : https://github.com/RobertCNelson/linux-stable-rcn-ee # #git clone https://github.com/RobertCNelson/linux-stable-rcn-ee #cd ./linux-stable-rcn-ee #git checkout `uname -r` -b tmp # deb [arch=armhf] http://repos.rcn-ee.com/debian/ bullseye main #deb-src [arch=armhf] http://repos.rcn-ee.com/debian/ buster main
※http://repos.rcn-ee.com/debian/
は独自リポジトリのようだが,2021-11-15時点でbullseye, bookworm, そしてsid も存在するよう.
パッケージ情報を更新
$ sudo apt update
ディスク容量が足りるか確認
$ sudo apt -o APT::Get::Trivial-Only=true full-upgrade
システムの最小アップグレード
$ sudo apt upgrade --without-new-pkgs
システムのアップグレード
$ sud apt full-upgrade
kernel を確認
$ apt-cache search linux-image
現在のkernel
$ dpkg -l | grep linux ii libselinux1:armhf 3.1-3 armhf SELinux runtime shared libraries ii linux-base 4.6 all Linux image base package ii linux-image-4.19.94-ti-r42 1buster armhf Linux kernel, version 4.19.94-ti-r42 ii util-linux 2.36.1-8 armhf miscellaneous system utilities $ uname -a Linux beaglebone 4.19.94-ti-r42 #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020 armv7l GNU/Linux
現在のkernelの後継の最新のような linux-image-5.10.65-ti-r28
を導入
$ sudo apt install linux-image-5.10.65-ti-r28
もし起動しなくなった場合はmicroSD から起動してeMMC をchroot してkernel を差し替えると治せると思う.
コメント