码迷,mamicode.com
首页 > 其他好文 > 详细

【cb2】扩展硬盘

时间:2014-11-18 13:05:36      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:http   io   ar   os   sp   for   文件   on   art   

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。

【cb2】扩展硬盘

标签:http   io   ar   os   sp   for   文件   on   art   

原文地址:http://www.cnblogs.com/colipso/p/4105331.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!