1 Star 3 Fork 2

eem/Deepin

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mk-persistence.sh 681 Bytes
一键复制 编辑 原始数据 按行查看 历史
#! /bin/sh
if [ -z "$@" ] ; then
cat << EOF
Usage:
% ${0} block-device-name
e.g. block-device-name is sda.
EOF
exit
fi
if [ ! -b /dev/${1} ] ; then
cat << EOF
/dev/${1} does not exist.
EOF
exit
fi
parted /dev/${1} mklabel gpt
parted /dev/${1} mkpart persistence ext4 2048s -- -34s
partprobe
sync
mkfs.f2fs -l persistence /dev/${1}1
mntdir=$(mktemp -d /tmp/tmp.XXXXXXXX)
mount /dev/${1}1 ${mntdir}
cat > ${mntdir}/persistence.conf << "EOF"
/etc link,source=etc
/home bind,source=home
/export bind,source=export
/build bind,source=build
/var/xdroid/common bind,source=xdroid
EOF
for i in etc home export build common ; do
mkdir ${mntdir}/${i}
done
umount ${mntdir}
sync
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/de-eem/deepin.git
git@gitee.com:de-eem/deepin.git
de-eem
deepin
Deepin
master

搜索帮助