0

I've just installed Ubuntu 14.04. Besides of default hard drive, I got also external hard drive on which I would like to install Google Drive. How can I do it?

I've read Is there a Google Drive client available? but I don't know how to change the location (from internal hard drive to external)?

Result of:

sudo blkid; sudo parted -l

please find below. It's in polish ;)

/dev/sda1: UUID="98c61393-a17a-4c01-ab52-49b62a33a3ff" TYPE="ext4" 
/dev/sda5: UUID="cefb2e69-872b-4832-9ef5-7576d5082af9" TYPE="swap" 
/dev/sdb1: LABEL="DATA" UUID="6A5AA8035AA7CA61" TYPE="ntfs"  

Model: ATA PLEXTOR PX-128M6 (scsi) 
Dysk /dev/sda: 128GB 
Rozmiar sektora (logiczny/fizyczny): 512B/512B Tablica partycji: msdos

Numer  Początek  Koniec  Rozmiar  Typ       System plików   Flaga  1  
1049kB    120GB   120GB    primary   ext4            ładowalna  2    
120GB     128GB   8479MB   extended  5     120GB     128GB   8479MB  
logical   linux-swap(v1)


Model: ASMT 2105 (scsi) Dysk /dev/sdb: 1000GB Rozmiar sektora
(logiczny/fizyczny): 512B/512B Tablica partycji: msdos

Numer  Początek  Koniec  Rozmiar  Typ      System plików  Flaga  1    
1049kB    1000GB  1000GB   primary  ntfs

result of

cat /etc/fstab

# /etc/fstab: static file system information.

# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).

#<file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation 
UUID=98c61393-a17a-4c01-ab52-49b62a33a3ff /               ext4   errors=remount-ro 0       1
# swap was on /dev/sda5 during installation 
UUID=cefb2e69-872b-4832-9ef5-7576d5082af9 none            swap    sw   0       0 
UUID=6A5AA8035AA7CA61 /home/suzk/Drive ntfs-3g rw,exec,uid=,gid=,umask=0022 
UUID=6A5AA8035AA7CA61 /home/suzk/Drive ntfs-3g rw,exec,uid=,gid=,umask=0022 
UUID=6A5AA8035AA7CA61 /home/suzk/Drive ntfs-3g rw,exec,uid=,gid=,umask=0022
UUID=6A5AA8035AA7CA61 /home/suzk/Drive ntfs-3g rw,exec,uid=1000,gid=1000,umask=0022 
UUID=6A5AA8035AA7CA61 /home/suzk/Drive ntfs-3g rw,exec,uid=1000,gid=1000,umask=0022 
UUID=6
13
  • Post the output of sudo blkid; sudo parted -l after connecting the external disk. Please add it in the question.
    – muru
    Aug 12, 2014 at 15:48
  • @muru, I did it.
    – suz
    Aug 13, 2014 at 8:20
  • I updated the answer.
    – muru
    Aug 13, 2014 at 8:41
  • Here, run this command: sudo sed -i '/UUID=6/d' /etc/fstab. Then run the complete set of commands in my answer after that. I have update my answer to use the ~/Google Drive path.
    – muru
    Aug 13, 2014 at 15:29
  • @muru but catalog Google Drive already exists. Should I remove it be removed before I run the command from your answer below? 2. What about privileges? Currently only root can create files on the external hdd
    – suz
    Aug 13, 2014 at 15:31

1 Answer 1

0

From what I understand, the Grive application uses ~/Google Drive (i.e., something like /home/suz/Drive) as the sync folder. You can mount the external disk at ~/Drive (or some folder within that folder). You will need to edit /etc/fstab for that, and make sure the external disk is connected whenever grive starts up.

You can mount your external drive to ~/Google Drive using the following commands:

mkdir -p ~/Google\ Drive
sudo umount /dev/sdb1
sudo sed -i.bak '/6A5AA8035AA7CA61/d' /etc/fstab
sudo tee -a /etc/fstab <<EOF
UUID=6A5AA8035AA7CA61 $HOME/Google\040Drive ntfs-3g rw,exec,uid=$(id -u),gid=$(id -u),umask=0022
EOF
sudo mount ~/Google\ Drive

This will mount your external disk on ~/Google Drive with correct permissions.

11
  • Hi, first of all thak you for helping me. When I run these commans I receive: uid: nie znaleziono gid: błędna opcja -- 'u' Try gid --help' for more information. It means: 'uid: command not found' and 'gid: wrong option'
    – suz
    Aug 13, 2014 at 9:52
  • @suz Sorry, I made a typo. I had written uid and gid instead of id. Fixed,
    – muru
    Aug 13, 2014 at 9:55
  • Great. So after that I should just install Grive like it is described here: webupd8.org/2012/05/grive-open-source-google-drive-client.html And the data will be stored on external drive. Correct?
    – suz
    Aug 13, 2014 at 9:59
  • @suz grive has changed a bit since that post, and I don't know if webupd8 have updated their PPA. You might want to check noobslab.com/2014/02/unofficial-google-drive-grive-tools.html
    – muru
    Aug 13, 2014 at 10:06
  • catalog Google Drive has been created in localization /home/Google drive/, not on the external drive... Plus, I cannot add any file to this external drive right now.
    – suz
    Aug 13, 2014 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .