作者: admin
mount: wrong fs type, bad option, bad superblock on
报错:mount: wrong fs type, bad option, bad superblock on
apt-get install nfs-common
mkfs -t ext4 /dev/sdb2
具体参数要根据实际环境微调
virtualbox 共享目录不生效
原因是guest addistions 没生效。
解决:
将virtualbox安装目录下的VBoxGuestAdditions.ios 加载到第一主光驱,然后重启:
然后运行:
cd /media/xxx/VBox_GAs_7.0.8
sudo shell VboxLinuxAdditions.run
执行完成后,再重新配置共享目录,发现确定是有更新的效果了,再去看挂载目录,就会发发现成功了
virtalbox 无法找到usb sd
安装了virtualbox的ubuntu,也在usb设备中选择了设备,但是就是在ubuntu中无法找到sd:
解决:
记得,开启virtual disk后记得重启virtalbox,就可以检测到sd了。
从0开玩lichee zero-3-rootfs编译
build
apt-get install linux-headers-$(uname -r)
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
make menuconfig
make
troubleshoot
- host-m4 版本问题:c-stack.c:55:26: error: missing binary operator before token "("
解决: 由m4-1.4.18升级为m4-1.4.19。修改package/m4下的m4.mk和m4.hash
m4.mk:M4_VERSION = 1.4.19
m4.hash:
sha256 63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96 m4-1.4.19.tar.xz
- bison: Please port gnulib fseterr.c to your platform
解决:cd output/build/host-bison-3.0.4sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
- libfakeroot.c:99:40: error: '_STAT_VER' undeclared
#ifndef _STAT_VER #if defined (__aarch64__) #define _STAT_VER 0 #elif defined (__x86_64__) #define _STAT_VER 1 #else #define _STAT_VER 3 #endif #endif
从0开玩lichee zero-2-kernel编译
系统
为了支持 rtl8723 我们需要新较新的分支:
git clone https://github.com/Lichee-Pi/linux.git
git checkout -b nano-5.2-flash origin/nano-5.2-flash
cd linux
make ARCH=arm licheepi_zero_defconfig
make ARCH=arm menuconfig #add bluethooth, etc.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules_install
支持 rtl8723BS
make menuconfig => Device Drivers => Staging drivers
选择rtl8723BS 为 M
troubleshoot
-
multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
解决:vi ./scripts/dtc/dtc-parser.tab.c
,将YYLTYPE yylloc
这一行注释掉 -
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
解决:sudo apt install openssl libssl-dev -
libz.so.1
解决:apt-get install lib32z1 -
其他指令问题 ,比如 "cpsid i","isb" 等
解决:更换编译器,比如:
https://releases.linaro.org/components/toolchain/binaries/
https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-i686_arm-linux-gnueabihf.tar.xz
unraid扩展虚拟机磁盘
unraid使用的是qcow2,超过最大空间后,提供提示空间不够了。
如何在不影响内容的情况下扩容?
扩展虚拟空间
qemu-img resize test.qcow2 +100G
qemu-img info test.qcow2
执行完以上动作后,内部的逻辑空间并没有增大,还需要继续调整
通过LVM扩展虚拟磁盘
https://www.codewoody.com/posts/18238/
https://fabianlee.org/2016/07/26/ubuntu-extending-a-virtualized-disk-when-using-lvm/
这里需要注意的是扩展LVM逻辑卷时,需要根据自己的实际卷来调整:
- 要么扩展现有的卷,查看逻辑卷:
root@ubuntu:/data# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert ubuntu-lv ubuntu-vg -wi-ao---- <118.00g
如上所示就一个 Ubuntu-lv卷
- 要么自己创建新卷:
lvcreate -n newlv -L 100G newvg
newvg是 卷组名称
背景知识
https://linux.cn/article-12670-1.html
PV =>pvs
VG =>vgs
LV -lvs
lichee zero如何进入fel模式
当我们烧录了uboot后,系统默认不会再进入fel模式,这样我们就想反复更新uboot或者其他分区,那么
如何进入fel模式?
Zero有一个usb下载模式称为fel模式,进入fel模式有下面几种方式:
- TF卡和spi flash 同时没有可启动镜像;
也就是说你不插卡,且焊接的是新的或者没有有效镜像的spi flash,那就上电自动进入fel下载模式 - TF卡中有进入fel模式的特殊固件 fel-sdboot.sunxi
如果你的spiflash已经有了启动镜像,那么需要在TF卡中烧入一个sunxi提供的 启动工具 (dd if=fel-sdboot.sunxi of=/dev/mmcblk0 bs=1024 seek=8
), 那么插入该TF卡启动会进入fel模式; - 上电时SPI_MISO拉低到地
该引脚为boot引脚,上电时出于低电平即会进入fel下载模式。
关于windows下如何写入fel-sdboot.sunxi,可以参看 https://goodmemory.cc/use-dd-cmd-in-windows/
windows下使用dd命令
"D:\Program Files\Git\usr\bin\dd.exe" if="J:\devolep\sunxi-tools-fel-win\bin\fel-sdboot.sunxi" of=/dev/sde bs=1024 seek=8
8+0 records in
8+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 0.086727 s, 94.5 kB/s
说明:需要在git bash中才能访问虚拟磁盘路径/dev/sde。具体为什么是sde,需要自己仔细核对,不要搞错了,可以通过ls /dev/sd*
来查看所有的磁盘
xftp 找不到匹配的host key 算法
在 /etc/ssh/sshd_config 尾部添加:
HostKeyAlgorithms +ssh-rsa
PubKeyAcceptedKeyTypes +ssh-rsa
systemctl restart sshd
注意是sshd_config ,不是ssh_config