LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-24-2004, 09:33 PM   #1
aXoneX
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware, SuSE
Posts: 23

Rep: Reputation: 15
Smile mounting a binary file thats not on any file system!?!!?


Hello peeps,

I've been creating my own OS for a little bit now and i've finally come to the point where I'm sick of rebooting my computer all the time to see if the code i wrote works.

Until I reach the point where i can work in my own system to work on my own system, i'm stuck having to reboot.

I downloaded BOCHS to solve the problem and it probably would work if i could mount my floppy disk.

The problem is I directly write to the floppy disk using dd for now. There is no file system whatsoever on the floppy. So what do i *mount* as?

As funny as it may sound i looked around quite a bit and i haven't found the information i need. I looked in man too and didn't see anything that would allow me to mount something that doesn't have any file system. Maybe i'm going blind . If my memory is correct, there IS a *mount binary*, but it doesn't seem to work straight off the back. Maybe i'm going numb .

Thanks in advance for your help.
aXoneX
 
Old 10-24-2004, 10:06 PM   #2
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
so what your saying s you dd a binary onot the floppy disk ?
well you cant mount anything.

you cant execute a block device, so you will have to dd the file from the floppy to a hard disk.
 
Old 10-25-2004, 12:38 AM   #3
aXoneX
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware, SuSE
Posts: 23

Original Poster
Rep: Reputation: 15
Well, that might be a problem because the first sector on the disk that is loaded by the BIOS at its usual loading spot loads the second sector of my floppy into memory address 0x10000.

Its not just one binary file; its actually 2. A bootloader and a kernel.

If i transfer the file to disk, then all my references to floppy reading and loading up sectors are out the window and my code just plain won't work.

What i have on the floppy is a bootloader in the first 512 bytes and a small forth kernel that isn't finished just yet in the second sector.

Or maybe it doesn't make any difference and i can make a single binary file out of my 2 binary outputs as if it was ready to be written as a single binary file to a floppy disk and i can tell BOCHS to treat the binary file in question as if it were a floppy disk?

aXoneX
 
Old 10-25-2004, 08:45 AM   #4
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
can you not split the 2 binary's with the commands head and tail ?
just a thought.

seems what you are working on is over my head... hopefully someone else with more expertese will find this thead

good luck.
 
Old 10-25-2004, 10:57 AM   #5
aXoneX
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware, SuSE
Posts: 23

Original Poster
Rep: Reputation: 15
Hehehe,

No, the files are already 2 separate binary files. Hmm well in any case, i'll take care of the binary fusion if need be but, do you know if it's possible to mount a floppy as pure binary ( no file system )???

aXoneX
 
Old 10-25-2004, 12:35 PM   #6
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
i dont understand what you mean...
to mount a disk is to attach its file system to the root firesystem.

to mount a disk with no file system is a paradox.

you can access raw data via its block device, but thats it.
 
Old 10-25-2004, 01:21 PM   #7
aXoneX
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware, SuSE
Posts: 23

Original Poster
Rep: Reputation: 15
Alright, all this gave me a few ideas

Thanks for your help .

aXoneX
 
Old 10-26-2004, 02:21 AM   #8
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
Mounting means making it appear as part of the filesystem. So mounting a binary with no filesystem simply is a nonsense.

In your case, your only solution is to access the file /dev/fd0. *This* is your binary. And if bochs has a problem with /dev/fd0 being a special file, then simply dd it to a file in your home, and run bochs on this copy... if it is possible at all.

Good luck.

Yves.
[edit]Oops, already said, as I see it...

Last edited by theYinYeti; 10-26-2004 at 02:22 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting file system in a file with mount Denes Programming 6 11-11-2005 12:04 PM
can't see file system after mounting in Debian subjazz Linux - Newbie 2 06-27-2005 06:49 PM
Automatically tell text file from binary file? Hosiah Linux - Software 3 05-31-2005 05:22 AM
convert text file to binary excel file ust Linux - General 2 11-23-2004 02:33 AM
Mounting problems in local file system svyshna Linux - General 3 08-06-2003 10:58 AM


All times are GMT -5. The time now is 01:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration