Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hello everyone,
I'm creating my own os,
it's almost done, the biggest problem is that i can't get initrd working.
I can't find any information on how to implement the initrd.
Yes, i have read the wiki and several other documents.
Theory enough...
Now to put it in to practice.
Basicly: Does anyone have a c/c++ sample of how to implement an initrd???
I do know from the multiboot pointer where the initrd is.
I always find it more informative to see a working example and then comparing it to the theory to see exactly which call does what.
Please help!!!
PS: Nice smilies, where did they get them? I want them to!
Last edited by roelforg on Mon Aug 08, 2011 11:56 am, edited 1 time in total.
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
The os is almost done, it already has multitasking, paging, advanced mmu, login, ring 3, etc
The great wall where i can't get through is VFS/FS (but since it should run from cd, FS isn't important),
That's because to me, it's not clear how i'm supposed to implement VFS.
Besides dynamic loading and a few bugs in my VGA driver (it crashed when you press the reset button instead of the power button), i have it almost done.
The kernel itself is 95% done.
I'm already working on gui since the mouse/keyboard are already done.
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
Thanx for the fast reply...
But i already tried, although it loads and i can access files, it won't recorgnise directory's and messes up any files not in ascii, and is really unstable .
I know that people use cpio and other stuff,
maybe something like that
Also,
The initRD will be the primary fs.
The problem is just the lack of documentation and examples.
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
roelforg wrote:I know that people use cpio and other stuff,
maybe something like that
Since you started about it: Do you know what cpio is? How may it be relevant to your situation? Does it apply in your case? Was it therefore necessary to post that?
It's not a good practice to post some random keywords and hope that some of us will magically fix your problem. Right now you make me believe you either neglected your own research or worse.
although it loads and i can access files, it won't recorgnise directory's and messes up any files not in ascii, and is really unstable
And your attempts at narrowing down the problem taught you what?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
1. I know what cpio is, i just don't know if it is what i need or do i need something else?
2. The problem: there's no way to store what nodes are directories and no way to say this file in that dir
which is a problem since the initrd is the main FS (it's supposed to only run from cdrom/floppy, so no use for normal fs drivers , for now... ).
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
roelforg wrote:1. I know what cpio is, i just don't know if it is what i need or do i need something else?
You made the ramdisk right? Did you use CPIO?
2. The problem: there's no way to store what nodes are directories and no way to say this file in that dir
Who told you that? And continuing from #1, what indexing system are you actually using that makes it unable to do that?
since the initrd is the main FS (it's supposed to only run from cdrom/floppy, so no use for normal fs drivers , for now... ).
That's nonsesne. FS drivers don't need to know that the storage is in RAM rather than persistent storage. Many will even go as far as that the FS driver should not know.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
And i was telling you in point 2 about the problems i had with the initrd-system from the article you linked.
Also i meant that there is no need for drivers for hd's since it will only use a ramfs.
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
That basically confirmed the worst case: you didn't actually know what you were doing. Well, at least we have something you can fix now. I hope you learnt now not to simply copy other's people stuff without knowing the specifications and then just expecting it to just work.
I hope you can figure out from my other questions what you were supposed to know.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
Jokes:
Q. Why did the scarecrow got promoted?
A. Because he was OUTSTANDING in his field!
=====================
Q. What's blue and isn't heavy?
A. Lightblue!
Have locked the topic as I don't see it going anywhere, but there are a couple of things that are slightly worrying:
You have declared your kernel 95% complete but are unable to work out how to make a FS work or carry out basic debugging / research.
You may well have 'solved' your problem by copying more code from a tutorial.
You are about to start on the GUI despite the above 2 points.
Can I suggest that now is the time to do some more research, go back through your kernel and do general debugging and ensure that you understand every line of code in your kernel before continuing. Also, ensure that the design of your kernel is up to scratch from the outset. You don't want to spend time on a GUI, find that the kernel does not have the required support to make it all work nicely and end up deciding to write everything from scratch later on...