InitRD, HELP!!!
InitRD, HELP!!!
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!
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!
Re: InitRD, HELP!!!
Well,
No.
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.
No.
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!
Re: InitRD, HELP!!!
Well, at least I understand much better where you are right now
(For me "initrd" only means "that stuff which has to run before the kernel may execute properly", unless you're thinking about an OS in particular)
As for an example of VFS&associated initrd code implementation, JamesM's tutorials contain one, if it can help you.
(For me "initrd" only means "that stuff which has to run before the kernel may execute properly", unless you're thinking about an OS in particular)
As for an example of VFS&associated initrd code implementation, JamesM's tutorials contain one, if it can help you.
Re: InitRD, HELP!!!
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.
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!
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: InitRD, HELP!!!
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?roelforg wrote:I know that people use cpio and other stuff,
maybe something like 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.
And your attempts at narrowing down the problem taught you what?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
Re: InitRD, HELP!!!
Let's see...
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... ).
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!
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: InitRD, HELP!!!
You made the ramdisk right? Did you use CPIO?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?
Who told you that? And continuing from #1, what indexing system are you actually using that makes it unable to do that?2. The problem: there's no way to store what nodes are directories and no way to say this file in that dir
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.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... ).
Re: InitRD, HELP!!!
I did not create the file.
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.
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!
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: InitRD, HELP!!!
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 did not create the file.
I hope you can figure out from my other questions what you were supposed to know.
Re: InitRD, HELP!!!
I wrote a tutorial on how to use tar as an initrd if that helps. http://forum.osdev.org/viewtopic.php?f=8&t=23339
To create a virtual filesystem you are on your own though but the basics are very easy (and actually well described in JamesM's tutorial).
To create a virtual filesystem you are on your own though but the basics are very easy (and actually well described in JamesM's tutorial).
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
http://github.com/Jezze/fudge/
Re: InitRD, HELP!!!
@Jezze:
Looks good, i'll give it a try
Looks good, i'll give it a try
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!
Re: InitRD, HELP!!!
Jezze's tut really works!!!
THX.
I declare this topic SOLVED!!!
@Moderators: close this topic pls
THX.
I declare this topic SOLVED!!!
@Moderators: close this topic pls
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!
Re: InitRD, HELP!!!
Hi,
Have locked the topic as I don't see it going anywhere, but there are a couple of things that are slightly worrying:
Cheers,
Adam
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.
Cheers,
Adam