I installed OSMC to a USB stick and I tried accessing the ATV1 internal HD with same commands as I used for Crystalbuntu. Unfortunately it didn’t work. Any suggestions?
We need more details.
What exact commands did you use ?
How many partitions do you have on the HDD ?
Currently, the HDD mount points /dev/sda# will need to added to /etc/fstab or mounted manually.
I figured out this worked:
logging in from terminal:
sudo nano /etc/fstab
then adding this line:
/dev/sda4 /home/atv/ATVHDD auto rw,auto,user 0 0
(it has to be with journaling off )
FYI DO NOT add this line:
/dev/sda4 /mnt/media defaults 0 0
(it works with Crystalbuntu but it causes a fatal boot lock with OSMC).
Thank you for the advice.
Good to hear.
Does your HDD still have the original ATV partitions ?
Unfortunately the linux kernel currently doesn’t have a stable HFSplus driver that handles journaled partitions, While you can mount a journaled HFSplus partition by using “force”, the partition needs to be considered clean by the OS or checked with fsck first to confirm it’s clean for it to work. Even then, doing so can lead to data corruption, so journaling off is the best option.
Yes, it still has the original AVT partition.
I’m running OSMC on a thumb drive, the ATV has the last version of Crystalbuntu installed on the hard drive. OSMC is running and working fine, I can map to a network drive and stream from my local network. However, for the life of me, I cannot figure out how to access the files on the ATV’s internal hard drive from the KODI interface on the ATV or by FTP. All I seem to see is the folder structure for OSMC that is on the thumb drive? Would someone kindly provide an Idiot’s guide to accessing the files on the internal drive? I can follow instructions but, they need to be step-by-step from start to end because I have no idea how to begin. Many thanks!
Post moved to existing thread with same topic.
Well, I started here but, since this topic already shows as answered, I opened a new topic. So, is there a tutorial or FAQ someone can point me to? I’ve looked around the OSMC site and not found anything. The previous posts in this topic are not detailed enough for me to understand what it is I need to do.
Mounting a drive is basic linux and not specific to osmc.
Basically you need to do the following from the command line or via ssh:
- create the directory
sudo mkdir /mnt/atvhdd
- edit the /etc/fstab file with nano and add the following line to it.
/dev/sda4 /mnt/atvhdd auto rw,auto,user 0 0
A websearch will show you hundreds of tutorials on how to add entries to fstab.
If you need more detailed instructions, you’ll have to wait until another user has time to write up a full tutorial and post it here in the thread.
As for the thread being tagged as “solved”, it’s mainly so other people can look to those threads first for advice. Your question, and any followup answers will help improve the solution for some users.
OK, thanks. I will look up SSH and figure out how to do that. Once I have created the directory and edited the fstab file, what do I look for in KODI when adding Music? I’ve only ever added Windows shares before.
I wasn’t sure if it was customary here for a “solved” thread to be appended to. I’m good with that and will keep in mind in the future. Thanks again.
basic ssh info is in the osmc wiki.
FWIW I’m in the process of making a gif movie that shows how it is done.
After that I plan on making a tutorial on how to edit the X11 configuration file.
fstab would be edited the same way.
adding music is like adding any other source.
Of course that’s for a separate thread
Cheers !
Yep, found that right away, downloaded PuTTY, connected and ran the commands you provided. Got no errors so, I assume I did it right. I’m actually doing this remotely with Teamviewer from work so, I’m not in front of my ATV. I will check once I get home and see if I can find the directory I just created.
The system needs to reboot before it loads fstab
or you can simply run the command
sudo mount /mnt/atvhdd
(use whatever path you set in fstab. It looks in the fstab for the entry, and uses that info to mount the partition)
To check to see if it mounted just use
mount
(That will list all the mounted partitions)
You would then need to add /mnt/atvhdd to the sources in kodi.
OK, here’s what I have done so far using PuTTY:
osmc@ATV:~$ sudo mkdir /mnt/atvhdd
osmc@ATV:~$ sudo nano /etc/fstab
This is what my etc/fstab file looks like after editing:
GNU nano 2.2.6 File: /etc/fstab Modified
/dev/sdb1 /boot hfsplus defaults,noatime 0 0
/dev/sdb2 / ext4 defaults,noatime 0 0
/dev/sda4 /mnt/atvhdd auto rw,auto,user 0 0
osmc@ATV:~$ sudo mount /mnt/atvhdd
mount: special device /dev/sda4 does not exist
And, this is the result of the mount command:
osmc@ATV:~$ mount
/dev/sdb2 on / type ext4 (rw,noatime,stripe=1024,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=122340k,nr_inodes=30585,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /boot type hfsplus (ro,noatime,umask=22,uid=0,gid=0,nls=utf8)
sysfs on /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=24512k,mode=700,uid=1000,gid=1000)
I assume from the message “special device /dev/sda4 does not exist” that something went wrong?
djrichiep:
Looks like you may not have the original ATV1 partition configuration
try the command
fdisk -l
and post the result
I don’t, I have the last version of Crystalbuntu installed on the HD. Here’s the result of fdisk -l:
osmc@ATV:~$ fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FDF1EF8F-E859-48AF-ABFE-AB46475214BE
Device Start End Sectors Size Type
/dev/sda1 40 97656 97617 47.7M Apple TV recovery
/dev/sda2 102400 488396799 488294400 232.9G Microsoft basic data
Disk /dev/sdb: 1.9 GiB, 2016411648 bytes, 3938304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FE7C2D43-D2E2-48C5-9B69-0C09A7985258
Device Start End Sectors Size Type
/dev/sdb1 40 500000 499961 244.1M Apple TV recovery
/dev/sdb2 503808 3936255 3432448 1.7G Microsoft basic data
osmc@ATV:~$
I replaced sda4 with sda2 and all is well. Found it in KODI and via FTP. Many thanks for the guidance.
Glad I could help
Well, spoke too soon, I just tried to delete some files from that drive via FTP and got an error:
rm /mnt/atvhdd/home/atv/Music/anyartist/anyalbum/00 anytrack.mp3: permission denied
Permissions obviously. How do I rectify that?
P.S.: logged in via Filezilla as osmc/osmc
try the command
mount
while ssh’d into the ATV1 and see if the line for the partition says ro or rw.
if RO, it’s likely that the drive is read only because it’s wasn’t cleanly unmounted at some point.
if so… then
umount /mnt/atvhd
fsck /dev/sda2
mount /mnt/atvhd
EDIT: Fixed typo