升级树莓派archlinux系统到新sd卡
由于之前把树莓派系统安装在4gb的sd卡上,随着系统的更新及安装了一大堆软件包之后,系统提示空间不足了。网上搜索了下,把所有数据迁移到新的sd卡上还是比较简单的。
克隆sd卡:
1,关闭树莓派电源,取出sd卡。插入到电脑的读卡器插槽中。
2,安装并运行Win32DiskImager。
3,在"Image File"选择框中,输入克隆的新文件路径。 例如,我放在"C:\Users\Yvan\Documents\archlinux.img"。
4, 在"Device"下拉框中,选择sd卡的盘符。
5,点击"Read"按钮,从sd卡中克隆新的镜像文件。
6,完成之后,插入新的sd卡,点击"Write",把之前生成的镜像文件写入到新的sd卡中。
克隆完之后,需要扩展分区。
步骤如下:
1. After logging in you view the status of filesystem:
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.7G 444M 1.2G 28% /
devtmpfs 83M 0 83M 0% /dev
tmpfs 231M 0 231M 0% /dev/shm
tmpfs 231M 236K 231M 1% /run
tmpfs 231M 0 231M 0% /sys/fs/cgroup
tmpfs 231M 0 231M 0% /tmp
/dev/mmcblk0p1 90M 24M 67M 27% /boot
2. Using the command fdisk will edit the filesystem /dev/mmcblk0:
[root@alarmpi ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.23.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):
3. List the information and delete partition 2
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 3667967 1740800 5 Extended
/dev/mmcblk0p5 188416 3667967 1739776 83 Linux
Command (m for help): d
Partition number (1,2,5, default 5): 2
Partition 2 is deleted
Command (m for help):
4. Create a new extended partition a logical volume
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): e
Partition number (2-4, default 2): 2
First sector (186368-15564799, default 186368):
Using default value 186368
Last sector, +sectors or +size{K,M,G} (186368-15564799, default 15564799):
Using default value 15564799
Partition 2 of type Extended and of size 7.3 GiB is set
Command (m for help): n
Partition type:
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 5
First sector (188416-15564799, default 188416):
Using default value 188416
Last sector, +sectors or +size{K,M,G} (188416-15564799, default 15564799):
Using default value 15564799
Partition 5 of type Linux and of size 7.3 GiB is set
Command (m for help):
5. !! Check whether top block starts in the same place as the original (start)
Command (m for help): p
Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes, 15564800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00057540
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 15564799 7689216 5 Extended
/dev/mmcblk0p5 188416 15564799 7688192 83 Linux
Command (m for help):
6. If it starts again (in this case on 186368 p2 a 188416 p5) write changes and reboot.
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@alarmpi ~]# reboot
7. After booting the system we online enlarge root partitions
[root@alarmpi ~]# resize2fs /dev/mmcblk0p5
resize2fs 1.42.8 (20-Jun-2013)
Filesystem at /dev/mmcblk0p5 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p5 is now 1922048 blocks long.
8. Check and it is done :-)
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.3G 447M 6.5G 7% /
devtmpfs 83M 0 83M 0% /dev
tmpfs 231M 0 231M 0% /dev/shm
tmpfs 231M 236K 231M 1% /run
tmpfs 231M 0 231M 0% /sys/fs/cgroup
tmpfs 231M 0 231M 0% /tmp
/dev/mmcblk0p1 90M 24M 67M 27% /boot 参考:http://lifehacker.com/how-to-clone-your-raspberry-pi-sd-card-for-super-easy-r-1261113524
http://raspberry-hosting.com/faq/how-expand-arch-linux-root-partition
http://elinux.org/RPi_Easy_SD_Card_Setup#Manually_resizing_the_SD_card_on_Raspberry_Pi
升级树莓派archlinux系统到新sd卡的更多相关文章
- ZYNQ的Linux Linaro系统镜像制作SD卡启动
ZYNQ的Linux Linaro系统镜像制作SD卡启动 0. 概述 ZYNQ生成uboot的时候和正常的ARM设备不太一样,ZYNQ属于二次辅助启动uboot然后由uboot启动内核,大概意思就是 ...
- 荣品RP4412开发板烧写Ubuntu系统应注意SD卡内存大些
问:RP4412开发板用SD卡烧写光盘中的fastboot失败,现在如何补救呢? 答:INAND格式化, 利用usb来升级啊, 也有文档,看升级文档. 问: 这个是怎么回事? 答:你是升级什么系统? ...
- ZYNQ的Linux Linaro系统镜像制作SD卡启动(仅使用mkfs部分,其他部分待看)
0. 概述 ZYNQ生成uboot的时候和正常的ARM设备不太一样,ZYNQ属于二次辅助启动uboot然后由uboot启动内核,大概意思就是 ZYNQ内部有一个机制,该机制不可修改,可以通过拨码开关控 ...
- 不从SD卡启动树莓派2
本文你可以学到: berryboot使用,kali安装,开挂的MobaXterm,以及关于通过LABEL和UUID挂载的小技巧. 本文默认你有一定Linux基础,同时针对刚入门的水平,因为这是我的折腾 ...
- 不下软件,照样可以完美正确格式化树莓派SD卡!(恢复U盘/SD卡到满容量)
树莓派作用千千万,系统崩溃的理由也数不胜数(不要问我为啥知道),所以系统的重装和sd卡的格式化也在所难免.顺便给大家看一下我今天的成果,我不就是不小心摔了一下我的树莓派...我和sd卡一定是冤家! 捡 ...
- SD卡与FAT32系统学习
2011-06-06 23:04 前2天,我了解了一下SD卡驱动的原理及FAT32文件系统的结构.接着准备主要已移植为主.通过LCD显示SD卡中的图片.但我需要分步进行. 0,使sd卡能读写数据.1, ...
- 树莓派2系统DietPi简单安装配置使用介绍
DietPi在Raspberrypi.org上的原帖:http://dwz.cn/HSrmY 版本发布很频繁,给原作者们点个赞.功能会越来越多,而且作者的定制观点很明确,适合树莓派的使用. 之前关于D ...
- raspberry 烧写镜像到SD卡
刚开始接触树莓派,需要烧写系统镜像到SD卡,网上找了些资料,记录于此. raspberry镜像下载: https://www.raspberrypi.org/downloads/ 烧写工具: wid3 ...
- 第36章 SDIO—SD卡读写测试
第36章 SDIO—SD卡读写测试 全套200集视频教程和1000页PDF教程请到秉火论坛下载:www.firebbs.cn 野火视频教程优酷观看网址:http://i.youku.com/f ...
随机推荐
- [翻译]Behavior-Driven Development (BDD)行为驱动开发(一)
简单而言,BDD是一系列基于TDD的工具和方法集发展而来的开发模式,一般不认为是一种新的开发模式,而是作为TDD的补充.因此,首先对TDD的概念进行进行. 测试驱动开发(TDD) TDD模式采取的是迭 ...
- windows 7 获取SYSTEM权限
当Adobe Reader 9.0卸载之后,你会发现原来的C:\Program Files\Adobe\Reader 9.0\Resource\CMap文件夹下的一些文件无法删除,提示你需要SYSTE ...
- 关于Unity
14年左右的时候开始学习了Unity,一直没有时间总结一些东西,框架机制啥的都不用说了,网上到处都有,虽然Unity是脚本机制,但是熟悉编程的人只要理解透了拿面向对象的思维编码也完全没有问题,这里重新 ...
- php二叉树算法
二叉树的每个结点至多只有二棵子树(不存在度大于2的结点),二叉树的子树有左右之分,次序不能颠倒.二叉树的第i层至多有2^{i-1}个结点:深度为k的二叉树至多有2^k-1个结点:对任何一棵二叉树T,如 ...
- 在CentOS 5.8上搭建PPTP VPN服务
在天朝上网,vpn已经是必备之物了,我也记录一下搭建vpn服务的方法. 1. 确认内核是否支持MPPE模块MPPE用来支持Microsoft Point to Point Encryption, 包括 ...
- Unity3d:延迟加载ScrollView的内容
问题描述:在一个scrollview中加载了大量的数据,有文字.图片.视频等等,首次加载的时候会很慢很卡,而且加载出来后,内存占用很大.解决方案1:思:固定一块区域,当物体滚动到这区域的时候再加载物体 ...
- Hibernate 与 Spring 的整合
刚刚学习了hibernate和Spring的整合,现在来总结一下. 以实现一个功能为例,与大家分享一下整个过程. 需要实现的功能:建立一个Person类,该类包括name,sex,age,birtha ...
- MON166 FAQ
MON166: SOFTWARE RESET USING THE MONITOR QUESTION What happens when debugging using MON166 and my pr ...
- 使用 preferredStatusBarStyle 设置状态栏颜色
iOS9之前,在plist文件中 插入一个新的key,名字为View controller-based status bar appearance,并将其值设置为NO. 然后敲入代码: [UIAppl ...
- 记一次Time-Wait导致的问题
去年(2014年)公司决定服务框架改用Finagle(后续文章详细介绍),but 公司业务系统大部分是C#写的,然后 finagle只提供了 scala/java 的Client 于是 只能自己动手丰 ...