sd卡 升级 linux,升级树莓派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

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卡与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 ...

第36章 	SDIO—SD卡读写测试—零死角玩转STM32-F429系列

第36章     SDIO—SD卡读写测试 全套200集视频教程和1000页PDF教程请到秉火论坛下载:www.firebbs.cn 野火视频教程优酷观看网址:http://i.youku.com/f ...

随机推荐

HDU 4627 E(Contest #3)

Description There are many unsolvable problem in the world.It could be about one or about zero.But t ...

【CentOS】搭建git服务器

参考资料: https://github.com/jackliu2013/recipes/blob/master/doc/linux/CentOS_6.4_git服务器搭建.md http://blo ...

C#中的多态现象

面向对象的特征封装.继承和多态.Polymorphism(多态性)来源于希腊单词,指“多种形态”.多态性的一个重要特征是方法的调用是在运行时确定而不是编译时.在.NET中用于实现多态性的关键词有vir ...

linux下获取ip

如果打开虚拟机 没有ip置灰显示了 lo 可以使用dhclient自动获取ip 如果想开机就自动获取ip: vim /etc/rc.d/rc.local 在这里插入dhclient命令

hdu4764 Stone 博弈

题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4764 很水的博弈题目 代码: #pragma comment(linker, "/STAC ...

Swoole笔记(四)

Process Process是swoole内置的进程管理模块,用来替代PHP的pcntl扩展. swoole_process支持重定向标准输入和输出,在子进程内echo不会打印屏幕,而是写入管道,读 ...

C#访问C++动态分配的数组指针

项目中遇到C#调用C++算法库的情况,C++内部运算结果返回矩形坐标数组(事先长度未知且不可预计),下面方法适用于访问C++内部分配的任何结构体类型数组.当时想当然的用ref array[]传递参数, ...

Python之禅及释义

在python shell中敲 import this会触发一个彩蛋,神奇的打印下面一段话: The Zen of Python, 即python之禅, 1999年Tim Peters大牛总结的&qu ...

html学习之简单注册表单

新用户注册 &l ...

举例跟踪linux内核系统调用

学号351+ 原创作品转载请注明出处 + 中科大孟宁老师的linux操作系统分析: https://github.com/mengning/linuxkernel/ 实验要求: 编译内核5.0 qem ...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Go语言(也称为Golang)是由Google开发的一种静态强类型、编译型的编程语言。它旨在成为一门简单、高效、安全和并发的编程语言,特别适用于构建高性能的服务器和分布式系统。以下是Go语言的一些主要特点和优势: 简洁性:Go语言的语法简单直观,易于学习和使用。它避免了复杂的语法特性,如继承、重载等,转而采用组合和接口来实现代码的复用和扩展。 高性能:Go语言具有出色的性能,可以媲美C和C++。它使用静态类型系统和编译型语言的优势,能够生成高效的机器码。 并发性:Go语言内置了对并发的支持,通过轻量级的goroutine和channel机制,可以轻松实现并发编程。这使得Go语言在构建高性能的服务器和分布式系统时具有天然的优势。 安全性:Go语言具有强大的类型系统和内存管理机制,能够减少运行时错误和内存泄漏等问题。它还支持编译时检查,可以在编译阶段就发现潜在的问题。 标准库:Go语言的标准库非常丰富,包含了大量的实用功能和工具,如网络编程、文件操作、加密解密等。这使得开发者可以更加专注于业务逻辑的实现,而无需花费太多时间在底层功能的实现上。 跨平台:Go语言支持多种操作系统和平台,包括Windows、Linux、macOS等。它使用统一的构建系统(如Go Modules),可以轻松地跨平台编译和运行代码。 开源和社区支持:Go语言是开源的,具有庞大的社区支持和丰富的资源。开发者可以通过社区获取帮助、分享经验和学习资料。 总之,Go语言是一种简单、高效、安全、并发的编程语言,特别适用于构建高性能的服务器和分布式系统。如果你正在寻找一种易于学习和使用的编程语言,并且需要处理大量的并发请求和数据,那么Go语言可能是一个不错的选择。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值