博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【cb2】扩展硬盘
阅读量:6688 次
发布时间:2019-06-25

本文共 1327 字,大约阅读时间需要 4 分钟。

1、硬盘为sata串口

2、参考 http://docs.cubieboard.org/tutorials/ct1/installation/moving_rootfs_from_nandflash_to_hard_drive

Prepeare the drive for rootfs

The drive must have a primary partition (for example with 10 GByte) formated with filesystem "ext4". You can use the Linaro user interface DISK app, gparted or use the following shell commands
list all available drives
#fdisk -l
Choose the drive you want to make changes to (e.g. sda):
#fdisk /dev/sda
use "p" (print partition of a drive), "d" delete a partition or "n" (create new partition). The partition should be of type "83"
Format the partition for rootfs with EXT4 filesystem
#mkfs.ext4 /dev/sda1
Copying Rootfs
We assume that, /dev/sda is the hard drive we want to install
$sudo su - root
#dd if=/dev/nandb of=/dev/sda1 bs=1M
Changing Boot Parameters
$sudo su - root
#mount /dev/nanda /mnt
#vi /mnt/uEnv.txt
Change the contents of uEnv.txt to
root@cubietruck:~# cat /mnt/uEnv.txt
console=tty0
extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rootfstype=ext4 rootflags=discard
nand_root=/dev/sda1
#sync
#umount /mnt
#reboot
3、解决问题

按照官网的方法重启后发现根系统容量2G,但根文件系统的确位于硬盘,容量和分区大小相差很大。

经过咨询

修改 /mnt/uEnv.txt 仍然用nand_root=/dev/nandb 用原flash启动(卸载了sda1 才能resize2fs /dev/sda1)。

resize2fs /dev/sda1

可能会提示一个前置操作,按照提示来。然后resize2fs。

转载地址:http://muhao.baihongyu.com/

你可能感兴趣的文章
Unity3D常用网络框架与实战解析 学习
查看>>
继承(原型链继承)
查看>>
如何利用 Visual Studio 自定义项目或工程模板(转载)
查看>>
java.lang.Object底层代码分析-jdk1.8
查看>>
获取函数所在模块的方法
查看>>
Linux信号处理
查看>>
VS预定义宏
查看>>
QtTableView
查看>>
*****运维人员如何最大限度避免误删除文件?
查看>>
Android应用开发基础--Adapter
查看>>
条件随机场
查看>>
别人要访问我的电脑上部署的tomcat,必须关闭防火墙吗?
查看>>
位运算的基本操作【转载】
查看>>
关系型数据库设计——E-R图
查看>>
作业六
查看>>
c++ 二叉树打印节点路径
查看>>
BOS中常用方法和类
查看>>
append的问题
查看>>
git &github 快速入门
查看>>
JS中的几种函数
查看>>