CubieTruck:使用SATA硬盘

来自WHY42
imported>Soleverlee2016年8月30日 (二) 07:13的版本 →‎磁盘分区
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

硬件连接

磁盘分区

使用parted分区

apt-get install gparted
parted -a optimal /dev/sda
#(parted)
#使用gpt分区
mklabel gpt
#删除所有分区
#rm 2
unit mib

mkpart primary 1 -1
print

完成后q退出,格式化分区:

mkfs.ext4 /dev/sda1
root@cubietruck:/nas# mkfs.ext4 /dev/sda1
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
61054976 inodes, 244190208 blocks
12209510 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
7453 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

挂载分区

mkdir /nas
mount /dev/sda1 /nas

需要修改/etc/fstab

# UNCONFIGURED FSTAB FOR BASE SYSTEM
/swap/swapfile swap swap defaults 0 0
tmpfs    /tmp        tmpfs    defaults    0 0
tmpfs    /var/tmp    tmpfs    defaults    0 0
/dev/sda1       /nas    ext4    defaults 0 0