runtimejs / runtime

[not maintained] Lightweight JavaScript library operating system for the cloud
http://runtimejs.org
Apache License 2.0
1.93k stars 128 forks source link

Unable to load /system/startup.js from initrd #13

Closed groundwater closed 10 years ago

groundwater commented 10 years ago

I'm getting this error when trying to start

image

jacob-mbp:runtime jacob$ ./qemu.sh
Unable to load /system/startup.js from initrd.
Kernel error: abort() requested

Details

jacob-mbp:runtime jacob$ git rev-parse HEAD
d81f9ec641bb84e6713ae2ad8de29e1e54c65f4d
jacob-mbp:runtime jacob$ docker -v
Docker version 1.0.1, build 990021a
iefserge commented 10 years ago

Looks like there is something wrong with your initrd image. Have you changed content of initrd directory? It's unable to locate file initrd/system/startup.js.

Image located at disk/boot/initrd. You can rebuild it

./makeinitrd.sh

Or using docker

docker run --rm -w /mnt -v $(pwd):/mnt:rw runtimejs ./makeinitrd.sh

Or you can send me your image file and I'll look into it.

groundwater commented 10 years ago

I think my mkinitrd is broken

vagrant@precise64:/vagrant/runtime$ ./mkinitrd -c disk/boot/initrd initrd
vagrant@precise64:/vagrant/runtime$ echo $?
0
vagrant@precise64:/vagrant/runtime$ hexdump -C disk/boot/initrd 
00000000  fe ca fe ca 50 43 4b 47  00 00 00 00 00 00 00 00  |????PCKG........|
00000010
vagrant@precise64:/vagrant/runtime$ 

I tried rm mkinitrd and then sudo docker-build.sh again, but same result :frowning:

iefserge commented 10 years ago

It actually created an empty image. Looks like it's unable to access initrd files.

Try this without docker:

g++ -std=c++11 -O3 src/mkinitrd/mkinitrd.cc src/common/package.cc src/common/crc64.cc -Isrc -o mkinitrd
./mkinitrd -c disk/boot/initrd initrd
groundwater commented 10 years ago
vagrant@precise64:/vagrant/runtime$ g++ -std=c++11 -O3 src/mkinitrd/mkinitrd.cc src/common/package.cc src/common/crc64.cc -Isrc -o mkinitrd
cc1plus: error: unrecognized command line option '-std=c++11'
cc1plus: error: unrecognized command line option '-std=c++11'
cc1plus: error: unrecognized command line option '-std=c++11'
tany2001 commented 10 years ago

Try replacing c++11 with C++11.

groundwater commented 10 years ago
vagrant@precise64:/vagrant/runtime$ g++ -std=C++11 -O3 src/mkinitrd/mkinitrd.cc src/common/package.cc src/common/crc64.cc -Isrc -o mkinitrd
cc1plus: error: unrecognized command line option '-std=C++11'
cc1plus: error: unrecognized command line option '-std=C++11'
cc1plus: error: unrecognized command line option '-std=C++11'
groundwater commented 10 years ago

Maybe I should update my system, thoughts?

vagrant@precise64:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:    12.04
Codename:   precise
groundwater commented 10 years ago

I upgraded to Ubuntu 14.04, but the same problem is happening. It looks like my initrd is empty.

groundwater commented 10 years ago

@iefserge I think may be the ./mkinitrd -c disk/boot/initrd initrd command is not working. It exits immediately without any output, but returns exit code 0.

tany2001 commented 10 years ago

Are you sure you are running the ./mkinitrd -c .... command with the correct permissions? If you have cloned the repository like root, but you are running the command like a normal user, then mkinitrd command will not create anything.

groundwater commented 10 years ago

@tany2001 I had the runtime project mounted through vagrants shared folders. I copied the directory into my Ubuntu home directory, and everything built.

tl;dr don't use vagrant's shared mounts

@tany2001 @iefserge thanks for the help