0

Well, I'm a bit confused, so please, bear with me:

I have a Pi3 with Raspbian (huh, the latest one, can't remember the name) and an external HDD plugged to it. I've been doing tests and reading stuff, and noticed that I didn't really needed to run the desktop environment for the stuff I was using the pi, so I went sudo raspi-config and removed it (Boot Options -> Desktop/CLI -> Console Autologin) .

Now, for the record, this is the ls -l on the /media/pi folder before:

drwxr-xr-x 7 root root 4096 may  9  2014 RaspberryData

On reboot, I got a prompt telling me that "access denied". The ls -l is this:

drwx------ 2 root root 4096 oct 22 22:04 RaspberryData

Reading a bit, its telling me that when there's no Desktop, neither the "groups" triplet nor the "other" triplet don't have access. I guess the main problem is with the "groups" triplet, as with the Pixel environment I could read and execute stuff.

Now, I guess this could go with a chown on the folder/mountpoint, but before doing anything I would like to know the whys and hows, and if I'm mistaken, the whats (Then the whys and finally the hows).

0

It is unclear exactly what you are trying to do.

The automount is a feature of the GUI. This creates a directory under /media/pi and mounts external drives.

If you do not use the GUI NOTHING happens (although the directory may still exist in the filesystem from previous mounts). Modifying the permissions WON'T mount anything. It is possible to create automounts without the GUI but this is far from straightforward.

If you want to mount a drive (on boot or manually) you need to create an entry in /etc/fstab (the man gives examples, and there are lots of tutorials).

If this is what you want I strongly suggest avoiding /media and mount in /mnt - although you can create a mount point anywhere.

The following is a script I use to mount SD Cards as an example.

#!/bin/bash
# 2017-05-06

BOOT_MOUNT='/mnt/SDA1'
ROOT_MOUNT='/mnt/SDA2'

# Check/create Mount Points
if [ ! -e $BOOT_MOUNT ]; then
    mkdir $BOOT_MOUNT
fi
if [ ! -e $ROOT_MOUNT ]; then
    mkdir $ROOT_MOUNT
fi
    echo $BOOT_MOUNT  $ROOT_MOUNT
# Mount Partitions
if ! $(mountpoint -q $BOOT_MOUNT); then
    mount /dev/sda1 $BOOT_MOUNT # mount partition containing boot files
fi
if ! $(mountpoint -q $ROOT_MOUNT); then
    mount /dev/sda2 $ROOT_MOUNT # mount root partition containing OS files
fi
  • I was looking if Pixel did the automount (which looked like it) and, if it was doing it, how's that there was these differences on permissions between the pixel-started and the command line started permissions. Seems the best (and only) way to do it is through the fstab file, thanks! (Why would you suggest avoiding the /media/pi/ folder?) – Neuromante Oct 23 '18 at 11:47
  • @Neuromante Pixel is DEAD, Long Live RPD!. Automount presumably happens somewhere in LXDE but I don't know where. /media is used by this process, and can get confused if mount points are manually created. /mnt is the traditional Linux directory. – Milliways Oct 23 '18 at 22:57
  • Good to know, then. Thanks for the info, man! – Neuromante Oct 24 '18 at 8:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.