'ntfs-3g'에 해당되는 글 2건

  1. 2010.01.07 ntfs-3g 크로스 컴파일 하기 (ntfs-3g cross compile)
  2. 2010.01.06 ntfs-3g at Tuxera
Linux2010. 1. 7. 14:23
이녀석.. 미운 4살도 아닌데 크로스 컴파일 대책이 제대로 안되어 있는지 한큐에 안된다 ㄱ-

i686 linux에서는 참 쉽게 한다.

./configure
make
make install

[링크 : http://www.tuxera.com/community/ntfs-3g-download/]

세줄 끝.. 참 쉽죠잉~



그.런.데 크로스컴파일은 악몽의 시작이었다.
sh4-linux 에서 크로스컴파일은 산넘어 산이었는데..

crash 1.
# export CC=gsh4-linux-gcc
# ./configure --host-=i686 --target=sh4-linux
..
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
..
# make
...
Making install in libntfs-3g
test -z "/usr/local/lib" || /bin/mkdir -p "/home/morpheuz/st7109/target/usr/local/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c  'libntfs-3g.la' '/home/morpheuz/st7109/target/usr/local/lib/libntfs-3g.la'
/usr/bin/install -c .libs/libntfs-3g.lai /home/morpheuz/st7109/target/usr/local/lib/libntfs-3g.la
/usr/bin/install -c .libs/libntfs-3g.a /home/morpheuz/st7109/target/usr/local/lib/libntfs-3g.a
chmod 644 /home/morpheuz/st7109/target/usr/local/lib/libntfs-3g.a
ranlib /home/morpheuz/st7109/target/usr/local/lib/libntfs-3g.a
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
make  install-exec-hook
test -z "/lib" || /bin/mkdir -p "/home/morpheuz/st7109/target/lib"
if [ ! "/lib" -ef "/usr/local/lib" ]; then \
/bin/mv -f "/home/morpheuz/st7109/target//usr/local/lib"/libntfs-3g.so* "/home/morpheuz/st7109/target//lib";  \
fi
/bin/mv: cannot stat `/home/morpheuz/st7109/target//usr/local/lib/libntfs-3g.so*': No such file or directory
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

머.. 간단해 보이지만 대책이 안선다 ㄱ-
일단은 so 파일도 생성하지 못하면서, so 파일을 옮길려고 하면서 죽는다..
미네랄!

아무튼 해결책은 아래와 같다.

Step 1. 혹시 모르니 liunx kernel의 FUSE 지원여부를 확인한다.
Step 2. 환경설정
# unset CC
# ./configure

# vi Makefile
# vi src/Makefile
# vi libntfs-3g/Makefile
# vi libfuse-lite/Makefile

에서
AR = ar
CC = gcc
CPP = gcc -E
CXX = g++
CXXCPP = g++ -E
ac_ct_CC = gcc
ac_ct_CXX = g++
를 찾아 sh4-linux- 접두를 붙여준다.

# vi libtool
에서
AR="ar"
LTCC="gcc"
CC="gcc"
OBJDUMP="objdump"
AS="as"
를 찾아 sh4-linux- 접두를 붙여준다.

이렇게 수정후에는 마음 편하게

# make

만약 make 시에 secaudio.c 에러가 발생하면
<attr/xattr.h> 를 <sys/xattr.h>로 수정한다.

# vi src/secaudit.c
 261 #ifdef HAVE_SETXATTR
 262 #include <sys/xattr.h>
 263 #else
 264 #warning "The extended attribute package is not available"
 265 #endif /* HAVE_SETXATTR */

아무래도 target 경로가 다를테니 DESTDIR을 넣고 목적지를 정해준다.

# make DESTDIR={target path} install

설치후 생성되는 파일목록
/sbin/mount.ntfs-3g -> /bin/ntfs-3g
/bin/ntfs-3g
/usr/local/bin/ntfs-3g.probe
/usr/local/bin/ntfs-3g.secaudit
/usr/local/bin/ntfs-3g.usermap

/lib/libntfs-3g.so -> libntfs-3g.so.71.0.0
/lib/libntfs-3g.so.71 -> libntfs-3g.so.71.0.0
/lib/libntfs-3g.so.71.0.0

/usr/local/share/man/man8/mount.ntfs-3g.8 -> ntfs-3g.8
/usr/local/share/man/man8/ntfs-3g.8
/usr/local/share/man/man8/ntfs-3g.probe.8
/usr/local/share/man/man8/ntfs-3g.secaudit.8
/usr/local/share/man/man8/ntfs-3g.usermap.8

/usr/local/lib/libntfs-3g.a
/usr/local/lib/libntfs-3g.la
/usr/local/lib/libntfs-3g.so -> /lib/libntfs-3g.so


실행결과
# mount -t ntfs-3g /dev/sda1 /root/sda1
mount: mounting /dev/sda1 on /root/sda1 failed: No such device

# ntfs-3g /dev/sda1 /root/sda1
WARNING: Deficient Linux kernel detected. Some driver features are
         not available (swap file on NTFS, boot from NTFS by LILO), and
         unmount is not safe unless it's made sure the ntfs-3g process
         naturally terminates after calling 'umount'. If you wish this
         message to disappear then you should upgrade to at least kernel
         version 2.6.20, or request help from your distribution to fix
         the kernel problem. The below web page has more information:
         http://ntfs-3g.org/support.html#fuse26

# mount
rootfs on / type rootfs (rw)
/dev/root on / type nfs (rw,noatime,vers=2,rsize=4096,wsize=4096,hard,nolock,proto=tcp,timeo=600,retrans=2,addr=192.168.10.10)
proc on /proc type proc (rw)
usbfs on /proc/bus/usb type usbfs (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /root/sda1 type fuse (rw,user_id=0,group_id=0,allow_other)

'Linux' 카테고리의 다른 글

fork-exec 종료시 리턴값  (0) 2010.01.11
mount.cifs mount.ntfs 등 자동연결의 비밀(?)  (0) 2010.01.08
FUSE 넌 머냐?  (0) 2010.01.07
ntfs-3g at Tuxera  (0) 2010.01.06
웹캠 VLC에서 테스트(Ubuntu 9.10)  (0) 2009.12.29
Posted by 구차니
Linux2010. 1. 6. 13:54
음.. NTFS 드라이버라는데
신기하게(?)도 리부팅 없이, FC6 에서 바로 사용이 가능하다.

특이하게(?)도 FS는 mount 후에 fuseblk로 인식한다.

# mount -t ntfs-3g /dev/sda1 /mnt/old
# mount
/dev/hda5 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda3 on /var type ext3 (rw)
/dev/hdb on /home/samba type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sda1 on /mnt/old type fuseblk (rw,allow_other,blksize=4096)

Stable Source Release 2009.11.14 << 소스 다운로드

[링크 : http://www.tuxera.com/community/ntfs-3g-download/]


Can I use NTFS-3G on Linux 2.4 kernels?

Yes. You need to use NTFS-3G 1.2506 or later and the FUSE kernel module from the FUSE 2.5.3 package. Please see more details in the FUSE README file.

[링크 : http://www.tuxera.com/community/ntfs-3g-faq/#kernel24]

Posted by 구차니