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 ...
随机推荐
- Android项目开发一
Android项目开发一 进度计划 1.第一周 开源中国注册账号:http://my.oschina.net/u/2511208,并上传Android HelloWorld程序代码 搭建Andro ...
- 如何修改ls命令列出来的目录颜色
答:默认为蓝色,在黑色背景下无法看清楚,因此以以下方法修改; 1.往~/.bash_profile文件中添加以下内容: export LS_COLORS='no=00:fi=00:di=01;33:l ...
- 递增三元组|2018年蓝桥杯B组题解析第六题-fishers
标题:递增三元组 给定三个整数数组 A = [A1, A2, ... AN], B = [B1, B2, ... BN], C = [C1, C2, ... CN], 请你统计有多少个三元组(i, j ...
- ZOJ 2083 Win the Game(SG函数)题解
题意:给一端n块的板,两人玩,每次能涂相邻两块没涂过的板,不能涂的人为输,先手赢输出yes 思路:sg函数打表,练习题 代码: #include<queue> #include<cs ...
- SPOJ - POLYNOM Polynomial(数论乱搞)题解
题意 :给你n个数,问你是否存在一个多项式(最多三次方)满足f(i)= xi. 思路:讲一个神奇的思路: x3 - (x - 1)3 = 3x2 - 3x + 1 x2 - (x - 1)2 = 2x ...
- CSS3屏幕密集媒体查询
html { font-size: 50px; } body { font-size: 24px; } @media screen and (max-width: 359px) { html { fo ...
- session的理解和使用
Session的使用与Session的生命周期 1.HttpSession的方法 Object getAttribute(String); Enumeration<String> getA ...
- UVa 140 带宽
题意:给出一个n个结点的图G和一个结点的排列,定义结点的带宽为i和相邻结点在排列中的最远距离,求出让带宽最小的结点排列. 思路:用STL的next_permutation来做确实是很方便,适当剪枝一下 ...
- 生信软件的好帮手-bioconda--转载
http://mp.weixin.qq.com/s/nK1Kkf9lfZStoX25Y7SzHQ 这篇文章主要适用于Linux平台,当然MacOS也行,不过它有更好安装方法. 此外网上也会许多更好的关 ...
- 已使用 163 邮箱测试通过,且支持 SSL 连接。 发送邮件
示例:Jack 发送一封邮件给 Rose. public class SendMail { public static void main(String[] args) { b ...