最新版はこちら。 いろいろ危ない世の中になってきたので、static に生成した html での公開に切り替えました。ご了承ください。
| 先月 | 2025年11月 | 来月 | ||||
|---|---|---|---|---|---|---|
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||
sudo mount -rt ext4 /dev/sdc2 /mnt/mnt_sdc2でマウントし、
sudo rsync -aHAXv --numeric-ids --info=progress2 \ --ignore-errors --partial --dry-run \ --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*' \ --exclude='/run/*' --exclude='/tmp/*' --exclude='/mnt/*' \ --exclude='/lost+found/*' --exclude='/home/nakano/Dropbox/*' \ /mnt/mnt_sdc2/ /opt/backup_atom/で中身をバックアップ。
sudo mount -rwt vfat /dev/sdc1 /mnt/mnt_sdc2/boot/efichroot する
sudo mount --bind /dev /mnt/mnt_sdc2/dev sudo mount --bind /proc /mnt/mnt_sdc2/proc sudo mount --bind /sys /mnt/mnt_sdc2/sys sudo mount --bind /run /mnt/mnt_sdc2/run sudo chroot /mnt/mnt_sdc2 /bin/bashその後 grub-install を実行
# grub-install --target=x86_64-efi --efi-directory=/boot/efi \ --bootloader-id=debian --recheck Installing for x86_64-efi platform. grub-install: warning: EFI variables cannot be set on this system. grub-install: warning: You will have to complete the GRUB setup manually. Installation finished. No error reported.この段階で chroot を抜け、下流から /mnt/mnt_sdc2 まで umount し、 SSD を取り外して NUC に再接続。
update-grubしておき、usb を抜いて NUC を起動したら、grub コンソールが立ち上がった。
grub> ls (hd0) (hd0,gpt1) (hd0,gpt2) (hd0,gpt3)という具合で、
grub> ls (hd0,gpt2)/でちゃんと /etc や /boot が見えて、 /boot に vmlinuz-*-amd64 と initrd.img-*-amd64 が入っていることも確認できた。
grub> set root=(hd0,gpt2) grub> linux /boot/vmlinux-6.12.57+deb13-amd64 root=/dev/sda2 ro grub> initrd /boot/initrd.img-6.12.57+deb13-amd64 grub> bootすると、ちゃんと trixie のシステムが起動した。
sudo grub-install --target=x86_64-efi \ --efi-directory=/boot/efi --bootloader-id=debian --recheck sudo update-grub sudo efibootmgr -c -d /dev/sda -p 1 -L "debian" -l '\EFI\debian\grubx64.efi'して installer usb も抜いて再起動したら、 普通に debian のログインプロンプトが出た。やれやれ。
sudo grub-efi-check.sh pre (upgrade) sudo grub-efi-check.sh postという感じで使うとよいそうです。