BFS access in windows

Forum thread started by Darkness on Fri, 2007-06-08 00:39

As I mentioned on IRC, I have been working lately on reading the contents of a BFS partition in windows.

Right now this is only limited to a userland application, but adding more functionality and converting this to a filesystem driver is on the roadmap. However there is still a long way to go.

Current status:
* mount multiple partitions
* browse files
* copy files to windows

some screenshots:
http://nexornet.com/darkness/images/skyfs2.png
http://nexornet.com/darkness/images/skyfs-bfs4.png
http://nexornet.com/darkness/images/skyfs3.png

You may notice SkyFS in those screenshots. That's because I started this to access skyfs partitions (skyfs is based on bfs) and as you can see, I can read both types.

I will keep you guys updated on my progress.

Peter

Comments

Re: BFS access in windows

This IS good!

Such feature would encourange users to spend time using Haiku in more productive way without the fear that some required reboot to Windows would render their files inaccessble.

Keep it up!

Re: BFS access in windows

This is exciting news, Peter. Good job on the work you've done, and good luck on continuing it. :) Are there any plans to be able to write to BFS volumes, or will it be read-only, or have you not decided?

I hope when you get a driver finished, you will release the source code (preferably under the MIT license). :D

Re: BFS access in windows

Actually, because I have been using quite some Haiku code, it already includes a lot of code for handling writing. But some parts of the code are still missing. I'm still testing read support and adding more features like getting the attributes. I will definately try writing though.

I haven't decided about the code yet, but I will probably open source it in the end.

Re: BFS access in windows

Darkness wrote:

I haven't decided about the code yet, but I will probably open source it in the end.

Well, i hope you'll decide to "port" it on ReactOS... ;)

Marco Ravich
--
>>Forward Agency

In progress we (always) trust.

Re: BFS access in windows

Looks nice, and of course I will find some uses for it when released :), but... wouldn't be nicer to use a similar approach to EXT2IFS?

Links:
http://www.fs-driver.org/ (closed source)

With Source:
http://ext2fsd.sourceforge.net/
http://uranus.it.swin.edu.au/~jn/linux/ext2ifs.htm
http://freesourcecodes.tripod.com/ext2.htm

GPL virus, granted, but... :)

Re: BFS access in windows

a filesystem driver is the final goal but a userspace application is much easier to work on and do testing without bringing down windows.

I already looked into those ext2 drivers but I first want to make the interesting stuff work before I attempt any driver stuff.

As a side note, I made some progress:
the application can now read attributes as well. It has been tried on both SkyFS and BFS partitions and appears to be working as expected :)

Re: BFS access in windows

Kernel/User space: totally understandable, been there too :)
Glad to know the end goal is a fs driver, and happy to read about your progress.

Thanks for your work!

Re: BFS access in windows

Very nice Peter. I don't think anyone else has mentioned that once this is fully working (even if just in a userland app), it makes the prospect of a Windows-based Haiku installer more realistic. I know some of the Linux distributions are moving in this direction (at least as another option to a LiveCD install), so it would be good to at least have some prospect of this for us as well.

Plus it is very handy to be able to access BFS files from Windows. Even if you eventually make a FS driver, a FTP-like app for reading (and maybe writing) files would be very useful.

Re: BFS access in windows

windows based installers, now there is an idea I didn't think of yet :)

some new screenshots here:
http://www.bebug.be/newsitem.php?index=440&language=3

Re: BFS access in windows

This is great! Whatever happened to it?

Re: BFS access in windows

Sorry for the long silence, I'm still alive!

I'm a little busy at the moment, mostly with some other SkyOS related projects and a full time job.

I really should look into the write support one day. Biggest todo for that is implement proper locking and a function to actually write to the raw disk.

I still have to see if I can compile this in visual studio 2008, I guess it might need a little tweaking.
I don't know yet when there will be another update but I will certainly let you guys know.

At last

I alwas wanted this, BFS always seemed a much better filesystem for storing media (read mp3 music) but by not wanting a duplicate copy I left everyting on NTFS :( for years now

Re: BFS access in windows

Will it only access partitions or will it be able to access images as well? I've ran into nothing but trouble when trying to transfer information to/from an image used for VM and thought it would be an iteresting learning experience to try to write a program to do that. With as good as this program looks I might need to consider learning something else or some other way!

Re: BFS access in windows

Someone reminded me again of this project...

Since SkyOS seems more or less dead these days, I haven't really continued on this.
However, I am willing to donate my code to the haiku community.

There is some ugly code in there but I'm sure there are some bright people here that may be able to sync this again with the current BFS code and make it a little more usefull (windows bfs driver anyone?)

Anyone interested?

Peter

Re: BFS access in windows

I think that is a great offer. You should probably restate that offer to the haiku-development mailing list, where most of the core developers reside. Even if it isn't worked on immediately, it will be good to have your code in SVN, so that volunteers can pick it up. Maybe it could be a GSOC candidate? (I'm just guessing)
Regards,
Pieter

Re: BFS access in windows

BFS under windows sounds great.
Thank you that you want to donate your code to haiku.

But PieterPan is right, the mailing list is a better place for such offers.
Please post this on the mailinglist again, there is the place where the developers are.

Re: BFS access in windows

I already launched an email on the 3rd party developer mailing list, but there was not so much response so far.

I am rather occupied at the moment, but perhaps I could already upload the code somewhere so people can already have a first look. (think sourceforge)

Re: BFS access in windows

I think OSDrawer would be an excellent site for this, as it is meant for Haiku development, probably leading to exposure to the right people. This way it will not be forgotten.

Re: BFS access in windows

It might also be a good idea to pass this past the ReactOS devs. They have a lot of experince with freeware Windows drivers, and there's the possibility it could get taken up by one of them.

Re: BFS access in windows

Yes, I also think that OsDrawer is a good place for your Code.

Re: BFS access in windows

For anyone finding this page from a Google search, the source is now available here:

https://github.com/HaikuArchives/ReadBFSWindows

Re: BFS access in windows

Thanks, I can use this code myself.

Not for Windows but hopefully to help my recovery program.

Re: BFS access in windows

Earl Colby Pottinger wrote:

Thanks, I can use this code myself.

Not for Windows but hopefully to help my recovery program.

If you're not on Windows I doubt this codebase will be helpful. It's largely Haiku BFS code modified to get it to compile in Windows.

In practice as actual BeOS systems die out the Haiku codebase is effectively authoritative, any bugs in it are baked into all the extant Haiku systems, so compatibility with those bugs is more important than accurately reproducing Be's design.

Re: BFS access in windows

Nice. I also got the files from him and made it build and change the projekt to vs2010. :)

Re: BFS access in windows

If it builds in VS2010, can you open a Pull Request with that so I can merge it? Thanks.

FYI, he emailed me a newer version of the code that he found -- I updated the GitHub repo with the newer code.

Re: BFS access in windows

Wow - this is a pretty old thread to have come back to life.

E.P: I wonder what other uses you'd been thinking about (for the Windows BFS code?)

I'd been looking for a way to cross-access bfs and ffs (freebsd) partitions. I started investigating the FreeBSD side, but was told to use FUSE there, especially if using FreeBSD versions >= 10. I guess that could work OK. For accessing data in the other direction, I wondered if I could use FUSE on Haiku. I haven't seen much activity on the FUSE implementation since the summer of code Haiku FUSE grant, What's the status of FUSE on Haiku?

There's always the idea of building a regular FFS driver for Haiku, but that's a learning curve ... :-)

Re: BFS access in windows

ronald-scheckelhoff wrote:

Wow - this is a pretty old thread to have come back to life.

E.P: I wonder what other uses you'd been thinking about (for the Windows BFS code?)

Go to Haikuware.com

Download "The Rocky Horror Recovery Tools".

Read my code and observe my coding style.

Wipe the tears and blood from your eyes.

Yes, my programming is that bad. My code works,but reading it hurts other programmers/developers. I need sample code to guide me away from my bad habits.

Re: BFS access in windows

Hello Earl:

I meandered over to Haikuware and downloaded your rescue bits. You know, it's a pretty good idea you have developed as the main purpose of your project. It seems to be one of those slightly arcane utilities that, when you happen to have a need for it ... is puurrrrfect! I'm sure it's quite useful, in the right situation.

As far as the code goes - that's the way almost everybody coded C for 1987 DOS. Right? Whatever ... the main point being your stuff is working!

Re: BFS access in windows

My problem is I came late to 'C', aside from the self-designed machine I built in 1974, I started with machine language on a KIM-1(notice no assembler just hex codes). Then when I got Commodore Transactor I decided to write my own Assembler in Basic and yes it did not follow MOS-Tech format. By the time I got an Amiga I had my own way of coding.

My younger brother loved 'C' on the Amiga, but I did not like the style of the code, worse I wrote my own pre-processor for Matt Dillion's Assembler which again meant I was not writing to the same standard as everybody else!

By the time I started 'C' and 'C++' on BeOS I was damaged goods for sure. Still I am only about 60 years old. I still may have time to learn. I have learnt Fortran-77, Focal, APL-80, and others but 'C' just not flow for me.

Re: BFS access in windows

Finaly I have made what I said :)

- It's build
- Renamed To BFSViwer
- "Clean" Haiku BFS files are moved to Haiku folder

You can download a test exe from FileToTest but it's build on Windows 7 and I don't Think it's working on anyting newer than Windows XP. So if you have Windows XP and Haiku, pleas test :)

https://github.com/ModeenF/ReadBFSWindows

Re: BFS access in windows

Hi there,
I've been working with SkyFS Viewer code from Peter too. My attempt was to create a Total Commander filesystem plugin, since Total Commander brings all the necessary GUI stuff and has a lean plugin API, so I could concentrate on the core task.
Unfortunately spare time became rare and at one point I stopped further development. If you want I could give you the project as is. It is compilable in VS2010 and has seen some clean up and refactoring. I believe it'd be easy to rework this project so as to create an ordinary windows filesystem plugin.

Regards,
Juergen

Re: BFS access in windows

Yes that would be Nice. If nothing else to see some one elses work :)

Re: BFS access in windows

How hard is it to make it work in Windows 7?

Re: BFS access in windows

In the Total Commander BFS plugin I reworked the raw disk access procedures which made it work nicely in Win7.

Re: BFS access in windows

Did I se a mail from you (can't find it now.)

You can mail me the source to [firstname]@[lastnam].se