Root access with SMB

Hey,

i installed the SMB server through store and it works well.
But i can just see the OSMC folder and the folders inside.

I would like to see the content of the root folder to see my mounted drive in /media/ .

Is there a way to to this ?

thx

All drives that are automounted under /media will be available as separate shares via SMB if you installed the version from the App Store

If i understood this right, you are trying to access that shared folder from another computer?
osmc automatically shares external HDs…Its weird that you dont see it.

try: sudo net usershare info what does it say ?
Worst case scenario do this: sudo nano /etc/samba/smb-shares.conf
Then paste this inside (tweak it first according to your needs)

[Media]
path=/media/Media
comment=Auto-mount Volume
usershare_acl=OSMC\osmc:F,
guest_ok=n

Media: The name of the shared folder
path: where that folder is.

Save with Ctrl+X and then restart samba with : sudo service samba restart wait for a bit and check again if you can see it.

when i type sudo net usershare info , nothing happens.

is it a problem that i mounted my exfat drive by myself with the fstab file ?
i wrote this inside of

sudo nano -w /etc/fstab

this inside my file

/dev/mmcblk0p1 /boot vfat defaults,noatime 0 0 /dev/mmcblk0p2 / ext4 defaults,noatime 0 0 UUID=56D2-F93F /media/festplatte/ exfat utf9,uid=osmc,gid=osmc,noatime 0

every time i restart my Pi, i have to unplug my hdd an put it back in. only than it osmc boots correct.

What happens if you reverse all changes you’ve made and just reboot the pi…Doesnt it automount the HD ?

Also…does your hd have a label on it ? cause i see you are using its UID. Set a label on it. Maybe that’s what’s causing you problems with automount

okay, i cleand my fstab, and restarted. osmc doesnt recognize my hdd.

and i need a fix folder for another app on my external hdd.
like

/media/myhdd

does osmc boot the hdd by itself always to the same place ?
why does it not boot ?

I assume you wanted to ask if OSMC mounts the hdd it auto mounts always to the same place and the answer is yes. OSMC will always mount the partitions as /media/

Also if you want to mount a parition via fstab then you have to do it in /mnt as /media will be cleaned on shutdown.

Suggest you take the entries out of fstab, reboot and upload logs with grab-logs -A.

Also ensure you have a good power supply and added max_usb_current=1 to /boot/config.txt

should i also delete

/dev/mmcblk0p1 /boot vfat defaults,noatime 0 0 /dev/mmcblk0p2 / ext4 defaults,noatime 0 0

inside my fstab ?

because i didnt set them

NO!!

Those ones which you didn’t add you really need to leave there :slight_smile:

okay, so i cleand my fstab. i just left the two entries i didnt made.

i rebooted -> hdd isnt mounted
plug hdd off and on -> hdd is mounted

now reboot

-> hdd isnt mounted

this is my log file: http://paste.osmc.io/owalixagap

my power suplly has 2.4 A.

so the hdd only works when i plug it out and in again.
any ideas?

I’m sure someone with OSMC specific knowledge will give you an answer at some point, but from a quick look at your log files I did see:

Mär 14 12:06:36 osmc kernel: scsi 0:0:0:0: Direct-Access Hitachi HTS723225L9SA62 PQ: 0 ANSI: 2 CCS
Mär 14 12:06:36 osmc kernel: sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
Mär 14 12:06:36 osmc kernel: sd 0:0:0:0: [sda] Write Protect is off
Mär 14 12:06:36 osmc kernel: sd 0:0:0:0: [sda] Mode Sense: 34 00 00 00
Mär 14 12:06:36 osmc kernel: sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn’t support DPO or FUA

Mär 14 12:06:36 osmc kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Mär 14 12:06:36 osmc kernel: usb 1-1.4: reset high-speed USB device number 6 using dwc_otg
Mär 14 12:06:36 osmc kernel: sda: sda1 sda2
Mär 14 12:06:36 osmc kernel: sd 0:0:0:0: [sda] Attached SCSI disk

Mär 14 12:06:36 osmc kernel: usb 1-1.4: USB disconnect, device number 6
Mär 14 12:06:36 osmc kernel: scsi 0:0:0:0: rejecting I/O to offline device
Mär 14 12:06:36 osmc kernel: scsi 0:0:0:0: [sda] killing request
Mär 14 12:06:36 osmc kernel: scsi 0:0:0:0: [sda] UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
Mär 14 12:06:36 osmc kernel: scsi 0:0:0:0: [sda] CDB: opcode=0x28 28 00 1d 1c 57 20 00 00 08 00
Mär 14 12:06:36 osmc kernel: blk_update_request: I/O error, dev sda, sector 488396576
Mär 14 12:06:36 osmc kernel: Buffer I/O error on dev sda, logical block 61049572, async page read

I.e., an unreadable sector on your disc, so the system took it offline.

I’m actually perhaps a little more surprised that it then works when you plug it in :slight_smile:

You might want to run the manufacturer’s low-level disc utilities on the drive and re-map that bad sector, or of course replace the drive …

Hope that helps!

thanks for your help. Which kind of format should i use for my hd ?

exfat , ntfs, hfs+ ? im using a mac

I’m afraid I have no idea which would work best for OSMC. I’d say avoid anything unnecessarily complicated (E.g., NTFS!) - so either wait for a comment from someone more knowledgeable than I or just try exfat as it should work fine :slight_smile:

ext4, there no point in using windows filesystem on a linux platform

Yes, but it is supported, and do you want to explain to @drchiller how to create an EXT4 filesystem on a Mac.?

why plug it in on the raspberry google how to format a disk to ext4 linux terminal and voila or RTFM isnt that much harder having users use non linux filesystems and not having them learn the platform they are using is bad practice …

Here is a cheatsheet for how to navigate in a Linux shell: Cheatsheets and Tutorials for users new to Linux based operating systems

OSMC (esp., for example, the “Vero 2”) is meant to be a consumer “black box” item (at least as I understand it - someone from OSMC may wish to correct me). There should not be any need to learn a new underlying operating system to use a media player.

Plus, he doesn’t just need to partition and “mkfs”, this is a disc with corrupted sectors which may well need mapping out via the drive’s internal bad block map.

Fancy getting someone with a Mac. and apparently little to no Unix experience to do that via ssh to a media player?

Yes, what you’re saying is correct in computing terms. These are supposed to be end-user boxes - someone should be able to plug in a USB drive and play media from it without having to learn how to perform device level bad block mapping …

i would try to format it with the Pi. But than i can not use it with the mac.

What did you mean with low level formatting, i googled it, and it looks like that formatting the disk a few times with 0 is nearly the same. Or do you know a tool for Mac ?

But which format should i use now ?

bah still call bullshit on that argument there is a shell and a user can use it without destroying anything and formating a drive isnt rocket science plus there are tools for creating ext4 under mac too if that such a huge issue, tools like fuse its better for a user to learn to do it correctly then to drag and do half fixes for their installation.

@drchiller fuse is such a tool

if you could tell me how to do it with the command line at pi. i would do it