zoukankan      html  css  js  c++  java
  • 【cb2】扩展硬盘

    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。

  • 相关阅读:
    gvim在windows下的一些小技巧
    解决eclipse在ubuntu下无法找到jdk方法
    ubuntu 12.04 下安装wireshark
    使用坚果云同步数据
    Windows WMIC命令详解 (Windows Management Instrumentation Commandline)
    ubuntu 12.04 配置指南
    CHROME自定义样式扩展 —— STYLISH
    地漏
    卫生间装修,想要坐便改成蹲便,地面需要加高多少?
    不锈钢橱柜
  • 原文地址:https://www.cnblogs.com/colipso/p/4105331.html
Copyright © 2011-2022 走看看