-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for initramfs #1
Comments
To my knowledge there is no difference for the bootloader. What's the problem you're experiencing? |
Thanks for your answer :-) I haven't had the problem myself, but I have asked for more details on the issue I've linked you. Being different formats, shouldn't they be loaded differently? (I ignore it...) |
Initrd is a typo in the readme. It was tested with an initramfs image. In either case the bootloader doesn't do any processing on it. |
Maybe @sbuller could give you more details about the problems he has had, he's the guy that was experimenting with |
That was a week or two ago during a whirlwind tour of whatever options I could dig up. All I ever got was
I made a show of trying to dig through things with gdb, but I didn't really get anywhere. There was also no indication of x86_64 support, which I find somewhat important. |
Hi There's little point in supporting uefi because the kernel itself can be setup to act as the bootloader. Happy to look at your disk image for you. Best |
I'm not interested in uefi support either. It's 64bit support I need. I'm not sure if it's the bootloader or the kernel that handles that transition. Anyhow, the disk image I produced using build.sh is below, along with the two files used to generate it - barebones (the kernel image), and init. I've verified I can boot qemu using the -kernel and -initrd parameters with these files. http://filebin.ca/2r7SFiHjQkXU/disk http://filebin.ca/2r7SY8NXGKwd/barebones |
Hi I've debugged the problem. I didn't envisage that anyone would load such a small init and that's causing the bootloader to bomb out. You can fix this simply by doing: dd if=/dev/zero bs=512 count=130 >> init (do it once to your init) then run the build script. You kernel and init work when I do this. I'll look at fixing it but it seems a fairly rare edge case. Most inits are many megs. |
PS. x86_64 is the same as i386 as far as the bootloader concerns (provided you're not including UEFI). |
NodeOS has an initramfs bundled inside the Linux kernel itself, hosting the standard C lib, a minimal init and the Node.js binary. |
Yes I understand. Will have a look see if I can fix it - but I only have a few hundred bytes to do everything so catching everything is impossible. |
Also @sbuller is using a custom |
An interim solution is to add the DD command above to the build script. |
Don't worry, take your time :-)
Not a bad idea as a short term solution... |
Actually, I'm quite comfortable with the solution; thanks for finding it. I really don't think it's worth a more complicated fix. Is 130 sectors the minimum size then? |
Just don't forget to add a |
I've just checked in a fix, it should tolerate any size init now. Thanks for finding the bug. |
At NodeOS we are thinking about using your bootloader but seems we are having problems probably because we are using a initramfs image instead of an initrd. Could it be possible to add support for it?
The text was updated successfully, but these errors were encountered: