Difference between revisions of "EBC Exercise 04 Mounting OneDrive"

From eLinux.org
Jump to: navigation, search
m (Installing rclone: Added fuse)
m (Configuring rclone)
Line 68: Line 68:
 
  chunk_size>
 
  chunk_size>
 
Leave blank
 
Leave blank
 +
The ID of the drive to use
 +
Enter a string value. Press Enter for the default ("").
 +
drive_id>
 +
Leave blank
 +
The type of the drive ( personal | business | documentLibrary )
 +
Enter a string value. Press Enter for the default ("").
 +
drive_type> '''business'''
 +
Enter '''business''' to get to your Rose OneDrive
 +
Set to make OneNote files show up in directory listings.
 +
 +
By default rclone will hide OneNote files in directory listings because
 +
operations like "Open" and "Update" won't work on them.  But this
 +
behaviour may also prevent you from deleting them.  If you want to
 +
delete OneNote files or otherwise want them to show up in directory
 +
listing, set this option.
 +
Enter a boolean value (true or false). Press Enter for the default ("false").
 +
expose_onenote_files>
 +
Hit Enter for the default
 +
 +
Remote config
 +
Use auto config?
 +
  * Say Y if not sure
 +
  * Say N if you are working on a remote or headless machine
 +
y) Yes
 +
n) No
 +
y/n> '''n'''
 +
Here is where the host vs bone install differs.  If you are on your host enter '''y'''.
 +
The Bone is headless, so enter '''n'''.  Let's follow the Bone path since it's requires a bit more work.
 +
 +
For this to work, you will need rclone available on a machine that has a web browser available.
 +
Execute the following on your machine (same rclone version recommended) :
 +
rclone authorize "onedrive"
 +
Then paste the result below:
 +
result>
 +
So, when installing on the Bone you need to run '''rclone authorize "onedrive"''' on your host.
 +
  
  
 
{{YoderFoot}}
 
{{YoderFoot}}

Revision as of 09:38, 10 October 2019

thumb‎ Embedded Linux Class by Mark A. Yoder


Here are instructions on how to mount your Rose OneDrive files on your Beagle via rclone.

rclone is a command line program to sync files and directories to and from many different services, one of which is OneDrive.

Installing rclone

Install rclone on both your host and your Bone (https://rclone.org/downloads/):

bone$ curl https://rclone.org/install.sh | sudo bash
bone$ apt update
bone$ apt install fuse
host$ curl https://rclone.org/install.sh | sudo bash
bone$ apt update
host$ apt install fuse

Configuring rclone

Next configure on the machine you want to run it on. I'll show doing it on the Bone since it's a bit more involved.

bone$ rclone config
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

We're starting a new remote, so enter n

name> onedrive

Call it whatever you want, I'm using onedrive.

Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / 1Fichier
   \ "fichier"
...
12 / Google Drive
   \ "drive"
13 / Google Photos
   \ "google photos"
...
20 / Microsoft OneDrive
  \ "onedrive"
...
Storage> 20

There are many choices, we want onedrive. Here's it's numbered 20, it may be different on yours.

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> 

Leave this blank

Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> 

This blank too

Edit advanced config? (y/n)
y) Yes
n) No
y/n> y

We want y here

Chunk size to upload files with - must be multiple of 320k.

Above this size files will be chunked - must be multiple of 320k. Note
that the chunks will be buffered into memory.
Enter a size with suffix k,M,G,T. Press Enter for the default ("10M").
chunk_size>

Leave blank

The ID of the drive to use
Enter a string value. Press Enter for the default ("").
drive_id> 

Leave blank

The type of the drive ( personal | business | documentLibrary )
Enter a string value. Press Enter for the default ("").
drive_type> business

Enter business to get to your Rose OneDrive

Set to make OneNote files show up in directory listings.

By default rclone will hide OneNote files in directory listings because
operations like "Open" and "Update" won't work on them.  But this
behaviour may also prevent you from deleting them.  If you want to
delete OneNote files or otherwise want them to show up in directory
listing, set this option.
Enter a boolean value (true or false). Press Enter for the default ("false").
expose_onenote_files> 

Hit Enter for the default

Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> n

Here is where the host vs bone install differs. If you are on your host enter y. The Bone is headless, so enter n. Let's follow the Bone path since it's requires a bit more work.

For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine (same rclone version recommended) :
	rclone authorize "onedrive"
Then paste the result below:
result> 

So, when installing on the Bone you need to run rclone authorize "onedrive" on your host.





thumb‎ Embedded Linux Class by Mark A. Yoder