NodeOS icon indicating copy to clipboard operation
NodeOS copied to clipboard

fresh install results in: "Could not initialize SDL(No available video device) - exiting"

Open jumson opened this issue 7 years ago • 8 comments

using Ubuntu16, fresh install, ssh into it. I modified it according to the pull request "https://github.com/NodeOS/NodeOS/pull/388" So it builds without problems.

in scripts/start, my QEMU is not getting the -nographic option passed to the prepareCommandLine module.

After some investigation, I find that the start script only sends one argument to prepareCommandLine,

prepareCommandLine, implemented in lib/index.js looks for this second argument called "output":

switch(output)
  {
    case 'curses'   : argv.push('-curses')   ; break
    case 'nographic': argv.push('-nographic'); break
  }
 

and in the qemu case:


      switch(output)
      {
        case 'nographic':
          append.push('console=ttyS0')  // redirect to terminal
        break

        case 'curses':
          append.push('vga=extended')  // 80x50
        break

        default:
          append.push('vga=0x344')  // 1024x768x32
      }

I do not see where prepareCommandLine can be called with that second argument....but it I hard code it in the script, it works. The modification looks like this in the scripts/start:

const {command, argv, cwd} = prepareCommandLine(process.argv.slice(2),'nographic')

jumson avatar Dec 30 '17 18:12 jumson

I say it "works" -- to an extent. It boots only into the REPL. There is probably still that problem mentioned in luii's comment in issue https://github.com/NodeOS/NodeOS/issues/386

"The build script returns error 72 and when you look here it converts the usersfs tar file to an "ext" filesystem using tar2ext which calls tune2fs here and returns an ENOENT, so it is possible that you dont have installed it yet."

the problem might be that my tune2fs is in sbin, requiring sudo privileges . Except, I'm not getting any kind of build script error. It is simply not mounting the user drive, so that will be another issue.

jumson avatar Dec 30 '17 18:12 jumson

in case more info is needed, I logged the unmodified QEMU output:

results of prepareCommandLine: { command: 'qemu-system-x86_64',
  argv:
   [ '-machine',
     'pc',
     '-m',
     '256M',
     '-vga',
     'std',
     '-net',
     'nic',
     '-net',
     'user,id=eth0,hostfwd=tcp::50080-:80',
     '-net',
     'user,id=eth1,hostfwd=tcp::50443-:443',
     '--kernel',
     'kernel',
     '--initrd',
     'initramfs.cpio.gz',
     '-drive',
     'file=usersfs.img,format=raw,index=0',
     '-append',
     'root=/dev/sda ip=dhcp vga=0x344' ],
  cwd: 'out/x86_64/pc/qemu' }

and when I add the 'nographic' argument to the method, the output is this:

results of prepareCommandLine: { command: 'qemu-system-x86_64',
  argv:
   [ '-machine',
     'pc',
     '-m',
     '256M',
     '-vga',
     'std',
     '-net',
     'nic',
     '-net',
     'user,id=eth0,hostfwd=tcp::50080-:80',
     '-net',
     'user,id=eth1,hostfwd=tcp::50443-:443',
     '-nographic',
     '--kernel',
     'kernel',
     '--initrd',
     'initramfs.cpio.gz',
     '-drive',
     'file=usersfs.img,format=raw,index=0',
     '-append',
     'root=/dev/sda ip=dhcp console=ttyS0' ],
  cwd: 'out/x86_64/pc/qemu' }

jumson avatar Dec 30 '17 18:12 jumson

How come that you've run in so many errors yet only trying to build NodeOS and im doesn't getting any error at all 👏 . Could be the Distro (I'm using Arch Linux) and made most of the support for Arch (dependencies for arch in the install-dependencies). So i can't really say if your Distro has a missing dependency, but i help if i can.

And the outputs are in fact the same and i noticed that the -nographic doesn't work at my machine.

luii avatar Dec 30 '17 18:12 luii

Good to know that Arch Linux is better supported, I'll spin up one of those and get after it. This is still a problem though, to achieve the objective of running on a multitude of platforms.

jumson avatar Dec 30 '17 19:12 jumson

Do you understand how else the "prepareCommandLine" will get that "output" argument? I do not see anything else using it.

jumson avatar Dec 30 '17 19:12 jumson

Yeah i know what you mean, but i haven't wrote the most of the code so @piranna knows better than i am

luii avatar Dec 30 '17 19:12 luii

the problem might be that my tune2fs is in sbin, requiring sudo privileges . Except, I'm not getting any kind of build script error. It is simply not mounting the user drive, so that will be another issue.

@jumson Could it be that you don't have the wheel (sudo on Ubuntu) group on your user?

wheel - Administration group, commonly used to give access to the sudo and su utilities (neither uses it by default, configurable in /etc/pam.d/su and /etc/pam.d/su-l). It can also be used to gain full read access to journal files.

luii avatar Feb 18 '18 18:02 luii

@jumson did you've made any progression on this?

luii avatar Jun 03 '18 07:06 luii