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 ...
随机推荐
- 20145319 《网络渗透》web安全基础实践
20145319 <网络渗透>web安全基础实践 问题回答 Sql注入攻击原理,如何防御 攻击原理:由于对于用户输入并没做出相应限制,因此可以通过构造特定的sql语句,达到自身的一些非法目 ...
- 求LCA练习+部分算法复习 2017.1.22
第一题就LCA即可.不过推荐用Tarjan(最快,常数很小).然后Tarjan的时候顺便就出一个dist[i],表示i节点到根节点的距离.求出了LCA,那么两点间的距离就为dist[u] + dist ...
- tomcat部署项目如何去掉项目名称
去掉项目名和端口: 首先,进入tomcat的安装目录下的conf目录,我的目录是 /usr/local/apache-tomcat-6.0.20/conf,编辑文件server.xml. 1.去除端口 ...
- python中的迭代器和生成器学习笔记总结
生成器就是一个在行为上和迭代器非常类似的对象. 是个对象! 迭代,顾名思意就是不停的代换的意思,迭代是重复反馈过程的活动,其目的通常是为了逼近所需目标或结果.每一次对过程的重复称为一次“迭代”,而 ...
- BZOJ 4552: [Tjoi2016&Heoi2016]排序 线段树 二分
目录 此代码是个假代码,只能糊弄luogu,以后再改,路过大佬也可以帮一下辣 update 10.6 此代码是个假代码,只能糊弄luogu,以后再改,路过大佬也可以帮一下辣 /* //fang zhi ...
- Msys2的安装,并整合到cmder中
下载:msys2-x86_64-20161025.exe 下载安装包,然后装上. 打开msys的shell之后首先升级一下pacman,然后就可以愉快地Syu了. $ pacman -Sy pacma ...
- java 如果仅输出一位和要输出多位格式的输出问题,利用boolean值.
package com.ykmimi.testtest; /** * 第七周第二题,来自网络 */ import java.util.Scanner; public class NumberPerfe ...
- C#在服务端验证客户端证书(Certificate)
使用https协议进行通讯的时候可以设置双向证书认证,客户端验证服务端证书的方法前面已经介绍过了,现在说一下在服务端验证客户端证书的方案. 这里给出的方案比较简单,只需要在Service端的配置文件中 ...
- Ubuntu16.04 安装 Django
pip2 install django==1.11 或者手动安装: 链接:https://pan.baidu.com/s/1uQJD-pON7gELoCC2TwYnEw 提取码:flgg cd Dja ...
- Codeforces 101487E - Enter The Dragon
101487E - Enter The Dragon 思路:做的时候两个地方理解错了,第一个事我以为龙吸了水,水就干了,其实龙是在下雨之前吸的,下雨时湖水又满了,所以湖水永远不会干:第二个是以为只要找 ...