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 :-)

发表评论

您的电子邮箱地址不会被公开。