WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: automount ntfs patition on startup  (Read 5652 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
automount ntfs patition on startup
« on: February 23, 2013, 11:46:35 PM »
hi , i am using tiny core 4.7.3.
I added to /opt/bootlocal.sh
mount /dev/sdb1 /mnt/sdb1
I found that the mounted ntfs partition has option ro & also belongs to root:root
Quote
/dev/sdb1 on /mnt/sdb1 type ntfs (ro,relatime,uid=0,gid=0,fmask=0177,dmask=077,nls=iso8859-1,errors=continue,mft_zone_multiplier=1)
dr-x------ 1 root root 32.0k feb 17 13:56 sdb1/

Thus I am not able to access mountpoint as normal user , also cannot edit files on it as root.
What should I do ?
« Last Edit: February 24, 2013, 12:19:46 AM by manit123 »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: automount ntfs patition on startup
« Reply #1 on: February 24, 2013, 01:05:41 AM »
You need to install ntfs-3g and read the info file.
You might also want ntfsprogs.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: automount ntfs patition on startup
« Reply #2 on: February 24, 2013, 02:54:08 AM »
Code: [Select]
mount -o 'uid=1001,gid=50' /mnt/sda2works for me wrt ownership, though that's with vfat.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: automount ntfs patition on startup
« Reply #3 on: February 24, 2013, 06:58:37 AM »
already ntgs-3g & ntfsprogs are installed on boot
Quote
df | grep -i ntfs
/dev/loop11 512.0K 512.0K 0 100% /tmp/tcloop/ntfs-3g
/dev/loop12 464.0K 464.0K 0 100% /tmp/tcloop/ntfsprogs

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: automount ntfs patition on startup
« Reply #4 on: February 24, 2013, 07:40:19 AM »
i added following to bootlocal.sh (inspired by tinypoodle & the way mountool does)
Quote
mount -o 'rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize-4096' /mnt/sdb1

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: automount ntfs patition on startup
« Reply #5 on: February 24, 2013, 10:17:43 AM »
You did not read the info file.  It tells you how to mount ntfs3g.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: automount ntfs patition on startup
« Reply #6 on: February 24, 2013, 10:55:16 AM »
Hi gerald_clark
I'm not sure you even need ntfs-3g. I have ntfsprogs installed since gparted needs it for NTFS anyway, and I
can mount and access drives:
Code: [Select]
tc@box:~$ sudo ntfsmount /dev/sdb6 /mnt/sdb6
tc@box:~$ cat /etc/mtab | grep sdb6
/dev/sdb6 /mnt/sdb6 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
tc@box:~$ cp ledcontrol.c /mnt/sdb6
tc@box:~$ ls -l /mnt/sdb6
total 4
-rw-rw-rw- 1 root root 3114 Feb 24 10:45 ledcontrol.c
tc@box:~$ rm /mnt/sdb6/ledcontrol.c
rm: remove regular file `/mnt/sdb6/ledcontrol.c'? y
tc@box:~$ sudo umount /mnt/sdb6
« Last Edit: February 24, 2013, 11:28:44 AM by Rich »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: automount ntfs patition on startup
« Reply #7 on: February 24, 2013, 10:59:24 AM »
You don't need ntfs-3g unless you want to write, which was the original complaint.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: automount ntfs patition on startup
« Reply #8 on: February 24, 2013, 11:28:21 AM »
Hi gerald_clark
But I was able to write. My previous posts shows a file being copied to sdb6 (NTFS). Mtab shows it as rw.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: automount ntfs patition on startup
« Reply #9 on: February 24, 2013, 11:41:44 AM »
/dev/sdb6 /mnt/sdb6 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

That fuseblk leads me to believe it is mounted ntfs-3g.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: automount ntfs patition on startup
« Reply #10 on: February 24, 2013, 11:50:25 AM »
Hi gerald_clark
I don't have  ntfs-3g.tcz  or  ntfs-3g-adv.tcz  installed, only  ntfsprogs.tcz.

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: automount ntfs patition on startup
« Reply #11 on: February 24, 2013, 05:33:22 PM »
Rich - you wouldn't happen to be loading ntfs3g.gz along with core.gz, would you?  That would bring ntfs3g in  - I think even if you specified "base".
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: automount ntfs patition on startup
« Reply #12 on: February 24, 2013, 08:46:57 PM »
Hi Lee
No, this is on a plain vanilla TC4.1 system.

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: automount ntfs patition on startup
« Reply #13 on: February 24, 2013, 10:10:01 PM »
Hi gerald_clark
I'm not sure you even need ntfs-3g. I have ntfsprogs installed since gparted needs it for NTFS anyway, and I
can mount and access drives:
Code: [Select]
tc@box:~$ sudo ntfsmount /dev/sdb6 /mnt/sdb6
tc@box:~$ cat /etc/mtab | grep sdb6
/dev/sdb6 /mnt/sdb6 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
tc@box:~$ cp ledcontrol.c /mnt/sdb6
tc@box:~$ ls -l /mnt/sdb6
total 4
-rw-rw-rw- 1 root root 3114 Feb 24 10:45 ledcontrol.c
tc@box:~$ rm /mnt/sdb6/ledcontrol.c
rm: remove regular file `/mnt/sdb6/ledcontrol.c'? y
tc@box:~$ sudo umount /mnt/sdb6

If memory serves, you are correct up to a point. Fairly sure that if the NTFS disk wasn't properly unmounted (Say you forgot to safely remove it, your you crashed windows), you need ntfs-3g or ntfs-tools to successfully mount RW

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: automount ntfs patition on startup
« Reply #14 on: February 25, 2013, 01:07:36 AM »
Hi althalus
Google didn't return any packages called ntfs-tools. Looking at the file names, except for ntfsmount, ntfs-3g appears
to contain all the programs provided by ntfsprog.