落絮飞雁的个人网站

顺流而下,把梦做完

Mount external disk at Linux startup

It is generally acknowledged that most Chromebook has only 16GB ROM, which means if you install Linux on your Chromebook, the remaining free space will be very small. Taking into account the current SSD price, using external SD card is a very wise choice: Most Chromebook has an SD card slot and SD card is cheap nowadays —— I bought a 32GB class 10 SD card on eBay with only $8. So we need to mount that SD card (external disk) at Linux startup.

Firstly, plug your SD card in and get the UUID of your card by using blkid.

gao@galliumos:~$ sudo blkid
/dev/sda1: UUID="3eb91267-0533-40e9-8920-7f75aa752x61" TYPE="ext4" PARTUUID="9eeaa28a-01"
/dev/sda5: UUID="12e3bafb-0533-4964-805d-a4eab32c04c9" TYPE="swap" PARTUUID="9eeaa28a-05"
/dev/zram0: UUID="4xcb6882-a533-4d0a-8e1e-27a3dadf2fa0" TYPE="swap"
/dev/sdc: UUID="B615-73F1" TYPE="vfat"

Then create a directory for the partition in /media/[YOURNAME] , you can name it according to your own preferences.

sudo mkdir /media/gao/SD

Now, your can mount external disk at startup by editing /etc/fstab

sudo nano /etc/fstab

Add a line like that example below:

#My SD card Data partition
UUID=B615-73F1 /media/gao/SD vfat defaults,uid=gao,gid=gao,umask=000,rw 0 1
Don not forget grant permission for your directory if you got permission issue.
chgrp gao -R /media/gao
chmod 750 -R /media/gao
Reboot your Chromebook and you can see the external disk space :-)

原文标题:Mount external disk at Linux startup|落絮飞雁的个人网站
原文链接:https://www.luoxufeiyan.com/2017/10/28/mount-external-disk-linux-startup/
授权协议:创作共用 署名-非商业性使用 2.5 中国大陆
除注明外,本站文章均为原创;转载时请保留上述链接。