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 commandslist all available drives#fdisk -lChoose the drive you want to make changes to (e.g. sda):#fdisk /dev/sdause "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/sda1Copying RootfsWe assume that, /dev/sda is the hard drive we want to install$sudo su - root#dd if=/dev/nandb of=/dev/sda1 bs=1MChanging Boot Parameters$sudo su - root#mount /dev/nanda /mnt#vi /mnt/uEnv.txtChange the contents of uEnv.txt toroot@cubietruck:~# cat /mnt/uEnv.txt console=tty0extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rootfstype=ext4 rootflags=discardnand_root=/dev/sda1#sync#umount /mnt#reboot3、解决问题按照官网的方法重启后发现根系统容量2G,但根文件系统的确位于硬盘,容量和分区大小相差很大。
经过咨询
修改 /mnt/uEnv.txt 仍然用nand_root=/dev/nandb 用原flash启动(卸载了sda1 才能resize2fs /dev/sda1)。
resize2fs /dev/sda1
可能会提示一个前置操作,按照提示来。然后resize2fs。