download fomat install rootfs script
download.sh
#!/bin/sh
# check the network first
serverip=$(cat /tmp/serverip)
while true; do
ping -c 5 $serverip;
if [ $? = 0 ];then
break;
fi
done
# then disable the firewall
/etc/init.d/firewall stop
cd /tmp
tftp -g -r rootfs.tar.gz $serverip
cd /
format.sh
#!/bin/sh
mmcdev=/dev/mmcblk0
# check device
while true;do
if [ -e $mmcdev ];then
break;
else
sleep 1;
fi
done
echo "d
n
p
1
w" |/usr/sbin/fdisk $mmcdev
mmcpart=${mmcdev}p1
while true;do
if [ -e $mmcpart ];then
break;
else
sleep 1;
fi
done
echo "y
" | /usr/sbin/mkfs.ext4 $mmcpart
install.sh
#!/bin/sh
mmcpart=/dev/mmcblk0p1
if [ ! -e $mmcpart ];then
echo "format the eMMC device failed";
exit
fi
tarfile=/tmp/rootfs.tar.gz
if [ ! -f $tarfile ]; then
echo "download the armbian failed";
exit
fi
mount $mmcpart /mnt
if [ $? = 1 ];then
echo "format the eMMC device failed";
exit
fi
cd /mnt
tar vxzf $tarfile
cd /
umount /mnt
echo "install finish"
download fomat install rootfs script的更多相关文章
- Download and Install Apache Zookeeper on Ubuntu
http://www.techburps.com/misc/download-and-install-apache-zookeepr/36 In previous article of this Bi ...
- Erlang - Download and Install for Linux
1. 下载 Erlang [huey@huey-K42JE erlang]$ wget http://www.erlang.org/download/otp_src_R16B03.tar.gz 2. ...
- [Training Video - 1] [Selenium Basics] [Download and Install Selenium]
Download Selenium Jars Configure jars in eclipse Webdriver http://docs.seleniumhq.org/download/ Sele ...
- [BlueZ] 1、Download install and use the BlueZ and hcitool on PI 3B+
星期日, 02. 九月 2018 11:58下午 - beautifulzzzz 1. Introduction Bluez is the default Bluetooth protocol sta ...
- MD5 Checksums for R12.1.1 Rapid Install Media (文档 ID 802195.1)
Oracle EBusiness Suite R12.1.x Rapid Installmd5 Checksums November 2011 Section 1: Overview Sec ...
- Install Ansible on Mac OSX
from: https://devopsu.com/guides/ansible-mac-osx.html and : https://devopsu.com/guides/ansible-post- ...
- How to install and configure Azure PowerShell
https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/ In this artic ...
- How to install 64-bit Google Chrome 28+ on 64-bit RHEL/CentOS 6 or 7
How to install 64-bit Google Chrome 28+ on 64-bit RHEL/CentOS 6 or 7 The problem Google developers s ...
- Google Chrome 55 Released – Install on RHEL/CentOS 7/6 and Fedora 25-20
Google Chrome is a freeware web browser developed by Google Inc. Google Chrome team proudly announce ...
随机推荐
- SpringCloud请求响应数据转换(一)
异常现象 近期做Spring Cloud项目,工程中对Controller添加ResponseBodyAdvice切面,在切片中将返回的结果封装到ResultMessage(自定义结构),但在Cont ...
- JS高级语法与JS选择器
元素(element)和节点(node) childNode属性和children属性的区别 <!DOCTYPE html> <html lang="en"> ...
- linux下递归列出目录下的所有文件名(不包括目录)
1.linux下递归列出目录下的所有文件名(不包括目录) ls -lR |grep -v ^d|awk '{print $9}'2.linux下递归列出目录下的所有文件名(不包括目录),并且去掉空行 ...
- 移植openssh到arm linux
一.在移植之前需要准备做一些前期准备: 1.移植zlib库 1.1获取zlib源码 1.2解压 tar xvf zlib-1.2.11.tar.xz 1.3交叉编译 1.3.1 指定交叉编译器 exp ...
- axis2框架用wsdl文件生成的服务端MessageReceiveInOut文件注意事项
在用axis2生成服务端文件和客户端文件,当客户端文件调用服务端文件时,都是通过wsdl文件生成的 配置文件进行相互的调用. 在一开始做开发测试的时候,通过soapUI进行调用接口的时候,可以调用成功 ...
- samba基本应用24-4及示例
samba smb:service message block(137/udp, 138/udp, 139/tcp, 445/tcp) 协议是:CIFS:Common Internet File Sy ...
- HDU 6129 Just do it(杨辉三角)
http://acm.hdu.edu.cn/showproblem.php?pid=6129 题意: 给出数组a,并且bi=a1^a2^a3...^ai,并且现在会重复m次,求出最后的b数组. 思路: ...
- 关于Mybatis 的 Mapped Statements collection does not contain value for 异常 解决方案
查看堆栈信息: at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:595) at org.apac ...
- Linux——用户管理简单学习笔记(四)
主要讲两个用户管理的案例: 1: 限制用户su为root,只允许某个组的的用户su # groupadd sugroup 首先添加我们的用户组 # chmod 4550 /bin/su 改变命令的权限 ...
- Codeforces Round #303 (Div. 2)E. Paths and Trees 最短路
E. Paths and Trees time limit per test 3 seconds memory limit per test 256 megabytes input standard ...