NTFS and Anaconda

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

First time posting, so please bear with me.

I'm thinking that for ntfs support I just have to
compile a kernel with NTFS support, add the ntfs tools
to my rpms and modify anaconda's fsset.py to support
NTFS. Do I seem on the right track, or am I miserably
lost?
I have no python experience but have programmed in C,
C++, Java, various BASIC dialects, Delphi, perl and
php, so the python code is pretty understandable. I
figure the following would get NTFS recognised 

[Code]

class NTFSFileSystem(FileSystemType):
    def __init__(self):
        FileSystemType.__init__(self)
        self.partedFileSystemType =
parted.file_system_type_get("ntfs")
        self.formattable = 1
        self.checked = 0
        self.name = "ntfs"

        # this is totally, 100% unsupported.  Boot
with "linux ntfs"
        # at the boot: prompt will let you make new
ntfs filesystems
        # in the installer.  Bugs filed when you use
this will be closed
        # WONTFIX.

        try:
            f = open("/proc/cmdline")
            line = f.readline()
            if string.find(line, " jfs") != -1:
                self.supported = -1
            else:
                self.supported = 0
            del f
        except:
            self.supported = 0


        self.name = "ntfs"

        self.maxSizeMB = 1024 * 1024


	# I have no idea what the ntfs tool is called,
calling it mkfs.ntfs
    def formatDevice(self, entry, progress,
chroot='/'):
        devicePath = entry.device.setupDevice(chroot)

        rc =
iutil.execWithRedirect("/usr/sbin/mkfs.ntfs",
                                    ["mkfs.ntfs",
"-q",
                                     devicePath ],
                                    stdout =
"/dev/tty5",
                                    stderr =
"/dev/tty5")
        
        if rc:
            raise SystemError
                                  


fileSystemTypeRegister(NTFSFileSystem())

[/Code]

So by this time I'm able to use NTFS partitions and if
I use "linux ntfs" at boot I can even create them.
Reading code from FileSystemSet: it seems that for
inclusion into fstab I must have a mount point, so if
I set the mount point for this somewhere under e.g.
"/mnt/windows" it should then be added to my fstab
file, right? Ditto for vfat?

I'm tracking rawhide and aiming for FC2 with this, so
I'll be using the 2.6 kernel and will enable both read
and write support for NTFS (already done this on my
test machine, using Arjan's 2.6 kernels). I've noticed
that if I list vfat and ntfs filesystems in fstab as
"users,umask=xxx" under mount options I get drive
icons for them on my desktop (Gnome 2.5.2) as well as
is "Computer", which I think is pretty cool. Any
reasons (security etc) why this might be a bad idea?
If it's not a bad idea I want to get anaconda to use
that as the default when writing out fstab.

Sorry if this seems all over the place, 3 hrs sleep
does not make you the most coherent person around.

Thanks

dl



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/




[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux