#// # 2024-05-06 # use tar Extract to memstick img # # write by lsl #/ #// #: 2.1 ls list directory contents #! # ls -al /tmp/memstick.img/ #! #/ #// #: 2.2 tar boot_re.tar #! # tar -C /mnt/md0/s2a/boot/ -xvzf /tmp/memstick.img/boot_re.tar #! #/ #// # #: 2.3 tar etc # #: 2.3.1 tar etc_passwd.tar #! # tar -C /mnt/md0/s2a/etc/ -xvzf /tmp/memstick.img/etc_passwd.tar #! # #: 2.3.2 tar etc_rc.local.tar #! # tar -C /mnt/md0/s2a/etc/ -xvzf /tmp/memstick.img/etc_rc.local.tar #! #/ #// #: 2.4 tar pkg_memstick.tar #! # mkdir -p /tmp/memstick.img/pkg_memstick/ # tar -C /tmp/memstick.img/pkg_memstick/ -zxvf /tmp/memstick.img/pkg_memstick.tar # ls -al /tmp/memstick.img/pkg_memstick/var/cache/pkg/ #! #/ #// #: 2.5 tar pkg # #: pkg info -d realtek-re-kmod-199.00_1 #: 2.5.1 realtek-re-kmod Kernel driver for Realtek PCIe Ethernet Controllers #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/realtek-re-kmod-199.00_1.pkg # kldxref /mnt/md0/s2a/boot/kernel /mnt/md0/s2a/boot/modules #! #: pkg info -d joe-4.6_1,1 #: 2.5.2 joe Joe's Own Editor #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/joe-4.6_1,1.pkg #! #: pkg info -d rsync-3.3.0 #: 2.5.3 rsync Network file distribution/synchronization utility #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/rsync-3.3.0.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/xxhash-0.8.2_1.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/libiconv-1.17_1.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/zstd-1.5.6.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/liblz4-1.9.4_1,1.pkg #! #: pkg info -d lsblk-3.8 #: 2.5.4 lsblk Lists information about block devices in the system #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/lsblk-3.8.pkg #! #: pkg info -d smartmontools-7.4_2 #: 2.5.5 smartmontools S.M.A.R.T. disk monitoring tools #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/smartmontools-7.4_2.pkg #! #: pkg info -d fusefs-exfat-1.4.0_1 #: 2.5.6 fusefs-exfat Full-featured exFAT FS implementation as a FUSE module #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/fusefs-exfat-1.4.0_1.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/fusefs-libs-2.9.9_2.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/libublio-20070103_3.pkg #! #: pkg info -d fusefs-ntfs-2022.10.3_1 #: 2.5.7 fusefs-ntfs Mount NTFS partitions (read/write) and disk images #! # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/fusefs-ntfs-2022.10.3_1.pkg #/ tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/fusefs-libs-2.9.9_2.pkg # tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/e2fsprogs-libuuid-1.47.0.pkg #/ tar -C /mnt/md0/s2a/ -xvzf /tmp/memstick.img/pkg_memstick/var/cache/pkg/libublio-20070103_3.pkg #! #/ #// #: 2.6 sysctl get or set kernel state #! # sysctl kern.disks #! kern.disks: da0 ada1 ada0 nda0 #/ #// #: 2.7 dd convert and copy a file #: 2.7.1 Write to File #! # dd if=/dev/md0 of=/tmp/memstick.img/md0.img bs=1m conv=noerror,sync status=progress #! # #: 2.7.2 Write to USB #! # dd of=/dev/da0 if=/tmp/memstick.img/md0.img bs=1m conv=noerror,sync status=progress #! #/