Kodi Community Forum

Full Version: How to add Windows Partition to XBMC ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys...

i have a little problem...

my xbmc works pefect... but i cant acces my internal windows partition when i booted up xbmc...

i only see the xbmc partition...

cann somebody help me please ? i´m an newbie in linux Huh


thank you very much!
adrj Wrote:Hey guys...

i have a little problem...

my xbmc works pefect... but i cant acces my internal windows partition when i booted up xbmc...

i only see the xbmc partition...

cann somebody help me please ? i´m an newbie in linux Huh


thank you very much!

you need to mount the ntfs filesystem somewhere.

do this: sudo fdisk -l
paste results here. you will probably have a /dev/sdaX where X is the partition number of your ntfs partition. You can then add an entry to mount that filesystem to a directory on your linux box. Once it's mounted, you can add it as a source in xbmc.
Code:
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x59c781d7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1275    10241406   83  Linux
/dev/sda2            1276       38912   302319202+   f  W95 Ext'd (LBA)
/dev/sda5            1276       38912   302319171    7  HPFS/NTFS

How to add ntfs partition to my xbmc?
I dont know where else to go..
I think i did some mess by following unclear instructions..
Help please..
Thanks..
You need to mount your ntfs drive outside of XBMC. You can manually use the mount command...
"man mount.ntfs" to see how

In your case something like this should work...
"sudo mount.ntfs /dev/sda5 /mnt/ntfs"
assuming /mnt/ntfs exists.

and/or setup /etc/fstab to automount it for you on startup. I'm sure google can help you find how to do that.
EDIT : did this guide in reversed order, for adding local hdd, see end of this post Smile

Alternatively you can make a script which mounts all your windows shares and have that script start up in rc.local
(this can even solve issues with fstab mounting before NIC initializes)..
Make sure to make the directories in which you would like to mount first.
Here is how I do step-by-step :


# ADDING NETWORK SHARES :

Making the dirs needed to mount in :

Quote:cd ~
sudo mkdir ~/media
sudo mkdir ~/media/movies
sudo mkdir ~/media/mp3
sudo mkdir ~/media/tvseries
sudo mkdir ~/media/tvseries2

^Give the dirs anyname you'd like or place them anywhere you want, this is just my config Smile

Making the script which mounts my win shares :

Quote:cd ~
mkdir scripts
cd scripts
sudo nano mount.sh

Paste the following and edit the lines to reflect your shares (you can find additional threads about a more secure way using smb credentials, but i run like this)

Quote:# windows shares to mount

sleep 5s
#mounting my movie folder
sudo mount -t cifs //10.0.0.2/movies /home/xbmc/media/movies -o username=*,password=*,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
#mounting tvseries folder from hdd1 on win comp
sudo mount -t cifs //10.0.0.2/tvseries /home/xbmc/media/tvseries -o username=*,password=*f,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
#mounting tvseries2 folder from hdd2 on win comp
sudo mount -t cifs //10.0.0.2/tvseries2 /home/xbmc/media/tvseries2 -o username=*,password=*,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
#mounting mp3 folder
sudo mount -t cifs //10.0.0.2/mp3 /home/xbmc/media/mp3 -o username=*,password=*,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
#mounting tools folder which i use for transferring misc files to htpc
sudo mount -t cifs //10.0.0.2/tools /home/xbmc/media/tools -o username=*,password=*,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
#mounting folder from laptop, also transfer folder
sudo mount -t cifs //10.0.0.4/temp /home/xbmc/media/laptop -o username=*,password=*,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Change user/pass or just delete it if you don't use any to your windows shares.
The sleep command is to make sure NIC is initialized before mounting.

Edit rc.local :

Quote:sudo nano /etc/rc.local

Paste this into the last section of the file :

Quote:./home/xbmc/scripts/mount.sh
exit 0

^make sure path is correct if you changed script path above.

and do a reboot to make sure everything is loaded on startup

Quote:sudo reboot


Hope this helps. Works flawlessly for me on my asrock 330 Smile

Some good info about mounting shares can be found here as well

# ADDING INTERNAL HDD :

Adding internal hdd can be done via fstab, this is my line :
(Of course make the mount dir first, same way as described above, in this case my mount dir is /home/xbmc/media/asrockhdd)

Quote:sudo nano /etc/fstab

add a line similar to this (make sure to ID the hdd first with fdisk -l as described in previous post):

Quote:/dev/sda3 /home/xbmc/media/asrockhdd ntfs user,auto,exec,utf8 0 0
I'm using the Live version on USB. Since it seems to recreate the file "/etc/fstab" each time you reboot, is there a trick? It's kind of annoying mounting it everytime I reboot.


-- edit --
I found an alternative. It seems that if you remove the "nodiskmount" option in the config file (.cfg) of the live launcher, it automount the local disks.
Where's the exact location of the .cfg file?