0%

开机启动磁盘挂载

1
2
3
4
5
6
7
8
sudo fdisk -l

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 249735167 249733120 119.1G 7 HPFS/NTFS/exFAT

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 8192 524287 516096 252M c W95 FAT32 (LBA)
/dev/mmcblk1p2 524288 60460639 59936352 28.6G 83 Linux
1
sudo mount /dev/mmcblk0p1 /mnt/data/
1
2
sudo blkid /dev/mmcblk0p1

/dev/mmcblk0p1: UUID=”4bc3058b-5625-6d4b-99ff-ef5c39db5d2b” TYPE=”ext4” PTUUID=”d7103b28” PTTYPE=”dos” PARTUUID=”d7103b28-01”

1
2
3
4
5
6
7
vim /etc/fstab

# <file system> <mount point> <type> <options> <dump> <pass>
tmpfs /tmp tmpfs defaults,nosuid 0 0
UUID=6C09-2957 /boot vfat defaults 0 2
UUID=df88ae35-8ffc-450d-a059-7a8decacdcb7 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hide 0 1
UUID=4bc3058b-5625-6d4b-99ff-ef5c39db5d2b /home/khadas/sdcard ext4 rw,defaults 0 2
1
2
3
4
[UUID=************]     [挂载磁盘分区]           [挂载磁盘格式]                     0 2

UUID=4bc3058b-5625-6d4b-99ff-ef5c39db5d2b /home/khadas/sdcard ext4 rw,defaults 0 2

  • 第一个数字:0表示开机不检查磁盘,1表示开机检查磁盘;
  • 第二个数字:0表示交换分区,1代表启动分区(Linux),2表示普通分区