Page 1 of 2

get floppy sector filename

Posted: Wed Apr 11, 2007 7:47 am
by matias_beretta
Hello, i am making a real mode os and i would like to know how can i get the filename of a disk sector. lots of thanks. MATI argentina

Posted: Wed Apr 11, 2007 7:57 am
by xsix
Are you stupid? Before you ask out, THINK about a question a little bit. Ok, i think you want a filename of any file on the floppy yeah? so Floppy has 2 heads, each of them has 80cylinders, each cylinder has 18 sectors in it. Sector size is 512bytes so 2*80*18*512 / 1024 = 1.44mb capacity. I'm talking about 1.44mb 3.5inches floppy. Files exists only virtually, really filesystem owns them. Filesystem is in the beginning of the floppy, probably FAT12, cause nobody uses anothers FS for floppies. Now, you must to calculate the addresses of where filenames in the FS header structure are, and where data begins. If you are a newbie, don't hope to get answer like "oh yeah it's easy as a piece of ****, just send filename to the floppy and it will read it. Floppy is difficult to programm device and FAT12 filesystem is simple, but NOT FOR NEWBIES so maybe get out to work on something easier, like writing Hello world from bootsector ah?

thanks

Posted: Wed Apr 11, 2007 8:00 am
by matias_beretta
thanks for the answer

Posted: Wed Apr 11, 2007 8:27 am
by Brynet-Inc
That was rather blunt.... xsix..:lol:

Although I can't say I agree with this:
xsix wrote:cause nobody uses anothers FS for floppies..
I won't comment on your lack of English skills, But I will say.. Not everyone uses FAT on floppies.

I myself have no desire to use such a limited file system, Even on floppy disks..

Posted: Wed Apr 11, 2007 11:02 am
by xsix
any other ideas? floppy is not big enough for a file system with advanced features. I haven't seen that anyone else used another filesystem than FAT12 on standart floppy. Oh no, i saw, RAW filesystem when only head:track:sector is loaded when needed. Anyway you can create your own, or just modificate FAT12 as you wish

Posted: Wed Apr 11, 2007 11:11 am
by Alboin
xsix wrote:any other ideas?
mke2fs /dev/fd0

Posted: Wed Apr 11, 2007 11:17 am
by Brynet-Inc
xsix wrote:any other ideas? floppy is not big enough for a file system with advanced features. I haven't seen that anyone else used another filesystem than FAT12 on standart floppy. Oh no, i saw, RAW filesystem when only head:track:sector is loaded when needed. Anyway you can create your own, or just modificate FAT12 as you wish
People format floppies using the EXT2 file system all the time.. Taking advantage of things like permissions.

I myself have formatted a few disks using OpenBSD's FFS many times..

So stop spreading lies..
xsix wrote:Are you stupid? Before you ask out, THINK about a question a little bit.
Good advice, Try following it... :lol:

Posted: Wed Apr 11, 2007 11:40 am
by mystran
I personally rarely bother to mount floppies at all. I use mtools to deal with them instead, if I'm on Linux..

Posted: Wed Apr 11, 2007 11:25 pm
by B.E
xsix wrote:cause nobody uses anothers FS for floppies.
This is because all the floppies that you have ever handled, are used on OSes made by companies that are ignorant and don't support any other filesystem except their own hacks.

Posted: Wed Apr 11, 2007 11:37 pm
by AndrewAPrice
I used to use ext2, but I switched to FAT12. My reason for this is so other people can download a floppy image and add their own modules under any operating system (ext2 would require Windows users to download an ext2 IFS).

Posted: Thu Apr 12, 2007 7:21 am
by Brynet-Inc
MessiahAndrw wrote:(ext2 would require Windows users to download an ext2 IFS)
Oh no!! We wouldn't want them to break a sweat or anything...

Seriously, Why do people accommodate "Windows" users.. It's silly.

Posted: Thu Apr 12, 2007 8:14 am
by xsix
oh yes, i haven't grown up on the computer, i own it just a few years but that's not a point. use another filesystem on floppy to set permissions or whatever. I don't know, maybe in the past this was usable i don't think that 1.44megabytes floppy disk is a perfect storage which needs advanced filesystem. I love floppies, but get with the times, now there are DVDs up to 20gb(or much more) and there is no reason to use floppies for information storage imho.

Posted: Thu Apr 12, 2007 9:27 am
by Brynet-Inc
xsix wrote:oh yes, i haven't grown up on the computer, i own it just a few years but that's not a point. use another filesystem on floppy to set permissions or whatever. I don't know, maybe in the past this was usable i don't think that 1.44megabytes floppy disk is a perfect storage which needs advanced filesystem. I love floppies, but get with the times, now there are DVDs up to 20gb(or much more) and there is no reason to use floppies for information storage imho.
I don't think you know very much about filesystems or storage mediums..
Using ext2 on a floppy would be helpful for someone doing work on an OS that supports file permissions.

And there are not any 20gb DVD's.. So you're dreaming..

DVD is 4.7 GB (single layer), 8.5 GB (dual layer)
HDDVD is 15 GB (single layer) and 30 GB (dual layer)..
Blu-Ray is 25 GB (single layer), 50 GB (dual layer)..

HDDVD and Blu-Ray have much higher capacities.. But writers and blank disks are not widely available or cheap.

Posted: Thu Apr 12, 2007 11:38 am
by xsix
i wrote in () "or much more" 20 was just a big number of gigabytes to imagine how much it is bigger that a 1.44mb floppy :D

Posted: Thu Apr 12, 2007 1:13 pm
by Tyler
Brynet-Inc wrote:
MessiahAndrw wrote:(ext2 would require Windows users to download an ext2 IFS)
Oh no!! We wouldn't want them to break a sweat or anything...

Seriously, Why do people accommodate "Windows" users.. It's silly.
I know, its not like Windows has at least 90% market share... And it defiently isn't that computers are designed for ease of use and not so evey end user is forced to find, comiple, understand and install every little piece of code they need to use. So definetly crazy to suppor those 20 ignorant windows users whose lifes don't revolve around wanting to know all the details of computers.

The Windows philosophy might suck, but there is definetly not one better, the UNIX-likes are just not user friendly, however many Windows look alike desktops you throw over them.