Making custom FS is ****!!!!
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Making custom FS is ****!!!!
I have made my own detailed File System(Random Stuff is there).I have the code for it, but I want to make a disk image(*.img) with my File System and I want to copy the kernel files into it.But (I use Windows)Windows dose not recognise such partitions.
My QUestion!
Can i use the FS Code in my OS and complie it for Windows so that Windows supports my FS and also I can copy,delete files(Function are there to delete,create,copy,etc).
Or is there another way?
I am just aiming to prepare a disk image with my FS installed.
(1 thing my friend told was to make the partition and save it to HDD while I run my OS, I am tooooo(100 'o's) far back to read HDD, but I want to use my FS Only)
EDIT: (The four *s are "S H I T", I dont use any low-level words except S HIT)
My QUestion!
Can i use the FS Code in my OS and complie it for Windows so that Windows supports my FS and also I can copy,delete files(Function are there to delete,create,copy,etc).
Or is there another way?
I am just aiming to prepare a disk image with my FS installed.
(1 thing my friend told was to make the partition and save it to HDD while I run my OS, I am tooooo(100 'o's) far back to read HDD, but I want to use my FS Only)
EDIT: (The four *s are "S H I T", I dont use any low-level words except S HIT)
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
Re: Making custom FS is ****!!!!
Sure, consult Windows DDK or FUSE for detail. However I think writing windows driver or FUSE develpment is out of this forum scope.LindusSystem wrote:My QUestion!
Can i use the FS Code in my OS and complie it for Windows so that Windows supports my FS and also I can copy,delete files(Function are there to delete,create,copy,etc).
Most people use existing tool or write their own tool to manipulate the raw image; or better yet, use a supported file systems(FAT,EXT2, SFS, or even tar) in early stage of development.LindusSystem wrote:Or is there another way?
To manipulate a raw image, you just fread/fwrite with the proper offset.
Re: Making custom FS is ****!!!!
The file system API in your OS and the one used by other operating systems are most likely too different from each other to make this a simple task, unless you actively designed your FS code in such a modular way as to allow optimal re-use of components.
If I were you, I'd write up a tool that can do basic operations on "image with CustomFS" - list, delete-from, copy-into - in portable C/C++. That way, anyone on any OS in the world can handle images with CustomFS, and you don't have to bother with any specific OS' FS API.
If I were you, I'd write up a tool that can do basic operations on "image with CustomFS" - list, delete-from, copy-into - in portable C/C++. That way, anyone on any OS in the world can handle images with CustomFS, and you don't have to bother with any specific OS' FS API.
Every good solution is obvious once you've found it.
Re: Making custom FS is ****!!!!
I've created a very simple tool written in C to manage disk images with my fs. It's called mkfs (what a surprise). You can use it like
To create given partitions (MBR+GPT), to create a directory, copy a file into it etc. I call it from Makefiles after link, like
So when an object file is recompiled, it will be updated in image immediately.
Code: Select all
mkfs create (partitiondefs)
mkfs mkdir (path/name)
mkfs addfile (path/name) (local file)
mkfs addsymlink (path/name) (linked)
mkfs addhardlink (path/name) (linked)
...etc.
Code: Select all
@${CC} ${OBJS} -o myfile.bin
@mkfs addfile /bin/myfile myfile.bin
Re: Making custom FS is ****!!!!
Pretty much exactly what I had in mind. Since this doesn't require anything beyond fopen() / fread() / fwrite() / fseek() / fclose(), you can write this tool once and use it on whatever host OS you please.
Every good solution is obvious once you've found it.
Re: Making custom FS is ****!!!!
There is another solution for accessing image under Windows. If you use Total Commander, then you can write a simple plugin for it for accessing your image file with your own FS. I mean "packer plugin API", but actually it doesn't need to pack anything. There is demo code also for download. http://www.ghisler.com/plugins.htm
- pauldinhqd
- Member
- Posts: 37
- Joined: Tue Jul 12, 2011 9:14 am
- Location: Hanoi
- Contact:
Re: Making custom FS is ****!!!!
Build yourself a specific FS binding tool since the FS you created is not understood by any other software.LindusSystem wrote:I have made my own detailed File System(Random Stuff is there).I have the code for it, but I want to make a disk image(*.img) with my File System and I want to copy the kernel files into it.But (I use Windows)Windows dose not recognise such partitions.
My QUestion!
Can i use the FS Code in my OS and complie it for Windows so that Windows supports my FS and also I can copy,delete files(Function are there to delete,create,copy,etc).
Or is there another way?
I am just aiming to prepare a disk image with my FS installed.
(1 thing my friend told was to make the partition and save it to HDD while I run my OS, I am tooooo(100 'o's) far back to read HDD, but I want to use my FS Only)
EDIT: (The four *s are "S H I T", I dont use any low-level words except S HIT)
The same thing to my case, I'm creating a custom FS, and so, I create a binding tool for joining the files in an NTFS folder to put into the image file.
AMD Sempron 140
nVidia GTS 450
Transcend DDR2 2x1
LG Flatron L1742SE
nVidia GTS 450
Transcend DDR2 2x1
LG Flatron L1742SE
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Re: Making custom FS is ****!!!!
I made my tool, it just writes sectors to an image file, but it skips the first 5 sectors(That is my FS stuff there) and adds an entry to the 5 sectos of the new file.
One disadvantage of my FSis it suports maximum of 16 folders and 128 files.I never read any book of FS,I randomly made it.
One disadvantage of my FSis it suports maximum of 16 folders and 128 files.I never read any book of FS,I randomly made it.
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
- pauldinhqd
- Member
- Posts: 37
- Joined: Tue Jul 12, 2011 9:14 am
- Location: Hanoi
- Contact:
Re: Making custom FS is ****!!!!
That is a big drawback. Consider re-designing the FS for extensibility.LindusSystem wrote: One disadvantage of my FSis it suports maximum of 16 folders and 128 files.I never read any book of FS,I randomly made it.
AMD Sempron 140
nVidia GTS 450
Transcend DDR2 2x1
LG Flatron L1742SE
nVidia GTS 450
Transcend DDR2 2x1
LG Flatron L1742SE