ejolson
Posts: 4053
Joined: Tue Mar 18, 2014 11:47 am

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 6:39 pm

hippy wrote:
Fri Oct 04, 2019 6:12 pm
ejolson wrote:
Fri Oct 04, 2019 5:34 pm
It would be nice if someone who is brave enough could place a sacrificial Pi on such an isolated network and test the binaries mentioned earlier in this thread.
That's what I'm doing and why I know it doesn't work ;)
SkywalkerSW5 wrote:
Fri Oct 04, 2019 4:05 pm
It is supposed to go into the console, and if you chose Debian it should say [email protected] If it doesn't work, try running

Code: Select all

/usr/piRoot/app/piRoot
Well that does shine some light on things. That starts the application which asks, Normal, root, update then Raspbian or Debian but then when I click the final OK ...

Code: Select all

Starting Raspbian...
chroot: failed to run command '/bin/su': No such file or directory

Code: Select all

Booting into Debian...
chroot: failed to run command '/bin/su': Exec format error
Is it possible you need the experimental 64-bit kernel to procede?

hippy
Posts: 6528
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 7:08 pm

ejolson wrote:
Fri Oct 04, 2019 6:39 pm
Is it possible you need the experimental 64-bit kernel to procede?
Could be. I have no idea.

The '/usr/piRoot/app/piRoot' is a shell script, the pertinent part being ...

Code: Select all

case $CHOICE in
        1)
        echo "Booting into Raspbian..."
sudo chroot /usr/piRoot/raspbian/ /bin/su -l pi
            ;;
        2)
echo "Booting into Debian..."
sudo chroot /usr/piRoot/debian/ /bin/su -l pi
            ;;
esac
I'm not familiar with 'chroot' but thought it just changed the effective root directory. If so it would explain why ARM Raspbian cannot execute the X86-64 '/bin/su' ...

Code: Select all

[email protected]:~ $ file /usr/piRoot/debian/bin/su
/usr/piRoot/debian/bin/su: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=89b3f4401d300e4a60e5201148ffeb3ac035b2d4, stripped
Nothing I can see is actually invoking any X86-64 emulation.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 8:32 pm

That’s weird. I am running the 64 bit version, but I will reinstall Raspbian 32 bit.
Random dude. Likes dogs. And Linux. Complete NOOB.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 8:48 pm

DougieLawson wrote:
Fri Oct 04, 2019 5:10 pm
You still haven't published enough details of what your stuff is trying to do.

There's no way on earth that anyone should knowingly download your image file, unzip it, run it. How do we know what's in it? How do we know it's not going to turn our Raspberries into a spam spewing zombie botnet? How do we know it's not going to scan our LANs and compromise every machine it finds on there?

If you want folks to work with your experimental project you're going to have to publish the source and publish the intended consequences of running it. It's all about scrutiny.

The very paranoid can then build from source and will be fully cognisant with what your code is doing and the purpose of its existence.
Your right. I would have uploaded the source code to GitHub, but the file size was two much. I have the source code without the operating systems, but now I am trying to figure out how to get that to install. I will upload it though, once I have gotten that figured out. Originally I watched a NovaSpirit tech video about running i686 programs on the pi. I made that into a script, and released it as Rpi686. I didn't even know you could use shell script to scan your LANs. But, the file is a script telling it to chroot into /usr/piRoot/debian or /usr/piRoot/raspbian. The huge size comes from two operating systems.
Random dude. Likes dogs. And Linux. Complete NOOB.

User avatar
Pulsar33
Posts: 124
Joined: Sun Aug 25, 2019 4:06 pm
Location: Bordeaux France

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 11:03 pm

Pulsar33 wrote:
Fri Oct 04, 2019 7:11 am
Hello,

Don't understand what all this is about.
No information, just a snapshot of a shell, a link to download the beta1, and a text saying it's a deb package.
Can we have answers to all these judicious questions ?
rin67630 wrote:
Thu Oct 03, 2019 12:20 pm
Could it be possible to get an overview upon the very purpose of that development?
What is the benefit? What are the drawbacks?
If the purpose is to run applications that were compiled for AMD64 on a Pi, that would practically mean, that an AMD64 processor and the corresponding bridges are emulated on the Pi by software. Right?
Can that be done fast enough to not run those applications ridiculously slowly?
Have a nice day
Pulsar33
STILL NO ANSWER ...
I am about to ask that this user be banned and his subject deleted

Good night
Pulsar33
Pi 4 with 4Gb memory, DVB TV pHAT ------------------- Desktop : Core i5 Linux MINT 19.2

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 11:32 pm

The app is supposed to let you run graphical x86 apps, and the Raspbian mode is supposed to be used as a sandbox for experiments. Yes, the software would be emulated. Some apps would be slow, but it’s not like we are using the pi as the ultimate gaming machine. Unfortunately, some apps I have tried would bring up that qemu: uncaught signal, etc. But having x86 Debian apps, even some Windows apps on the pi would be cool. I don’t know if Spotify would run well, but if it does, the that then that’s a great benefit.
Random dude. Likes dogs. And Linux. Complete NOOB.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Fri Oct 04, 2019 11:35 pm

hippy wrote:
Fri Oct 04, 2019 1:01 pm
SkywalkerSW5 wrote:
Fri Oct 04, 2019 2:48 am
- If I were to add more operating systems to piRoot, what would you want?
Full Windows 10 :mrgreen: :mrgreen: :
Well. I could try Windows 10 arm, but that wouldn’t be a chroot. But full Windows 10...... Umm.... Yeah. Interesting.
Random dude. Likes dogs. And Linux. Complete NOOB.

User avatar
Pulsar33
Posts: 124
Joined: Sun Aug 25, 2019 4:06 pm
Location: Bordeaux France

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 12:09 am

SkywalkerSW5 wrote:
Fri Oct 04, 2019 11:32 pm
The app is supposed to let you run graphical x86 apps, [...] Yes, the software would be emulated. [...] even some Windows apps on the pi would be cool.[...]
So, if we have a graphical application compiled in 32 bits for Debian, this application can be launched with your console and RPI will translate on the fly the x86 instructions to armhf instructions, and execute them whatever they are (libraries, I/O, sequencing, and so on ) ?

I would be happy to see a video of such a marvelous demo ! Can we ?
Have a good night
Pulsar33
Pi 4 with 4Gb memory, DVB TV pHAT ------------------- Desktop : Core i5 Linux MINT 19.2

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 12:26 am

Of Course! However I am at my Grammas for the night ( Going garage sailing the next day ). Tomorrow afternoon, I will upload a video. What app? Also, it it 64 bit.
Last edited by SkywalkerSW5 on Sat Oct 05, 2019 12:55 am, edited 1 time in total.
Random dude. Likes dogs. And Linux. Complete NOOB.

hippy
Posts: 6528
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 12:31 am

SkywalkerSW5 wrote:
Fri Oct 04, 2019 8:48 pm
the file is a script telling it to chroot into /usr/piRoot/debian or /usr/piRoot/raspbian.
SkywalkerSW5 wrote:
Fri Oct 04, 2019 11:32 pm
The app is supposed to let you run graphical x86 apps, and the Raspbian mode is supposed to be used as a sandbox for experiments. Yes, the software would be emulated.
The .deb appears to have installed your script and what seems to be a minimal X86-64 Debian installation. Your app is a script as you describe it, but all it seems to do is 'chroot' and then try and run an X86-64 program (/bin/su).

That doesn't seem to be enough to run that X86-64 Debian program, or anything else X86 or X86-64. I would agree, it would be emulated, but no emulation appears to be involved.

Perhaps you could explain how it is supposed to actually work, do as claimed ?

I suspect that what you have released as piRoot.deb is missing a huge amount of what is actually needed. Isn't setting anyone else's Pi up to be how you have yours setup.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 12:41 am

Sure!

The .deb file has the script, and the folder that contains the x86 Debian. The script chroots onto the x86 Debian, and after running the script, the terminal will become that x86 Debian system. If that doesn’t make sense, think it like this. After running the script, all commands after that will be like if you typed that into an x86 PC running Debian. After running the script, if you were to run uname -a, it would say something like Linux 4.19 hostname x86_64. It is emulated using Qemu.
Random dude. Likes dogs. And Linux. Complete NOOB.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 12:43 am

Actually I just thought, if you get an error try running sudo apt install debootstrap qemu.
Random dude. Likes dogs. And Linux. Complete NOOB.

hippy
Posts: 6528
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 12:58 am

Pulsar33 wrote:
Fri Oct 04, 2019 11:03 pm
I am about to ask that this user be banned and his subject deleted
I think that would be a bit unfair on someone who, from what else I have seen on the web, seems to be 'just a kid with best intentions' even if they have let their enthusiasm overtake their experience.
SkywalkerSW5 wrote:
Sat Oct 05, 2019 12:41 am
The .deb file has the script, and the folder that contains the x86 Debian. The script chroots onto the x86 Debian, and after running the script, the terminal will become that x86 Debian system. ... It is emulated using Qemu.
Yes; that seems to be the missing part; there's nothing which makes it emulated by qemu ...
SkywalkerSW5 wrote:
Sat Oct 05, 2019 12:43 am
Actually I just thought, if you get an error try running sudo apt install debootstrap qemu.
Okay; installed. Same result; "Exec format error" for the X86-64 Debian /bin/su.

So how, once the 'chroot' has been done into that X86-64 Debian does ARM Raspbian know to emulate the X86-64 /bin/su program ?

There's a step or two still missing. something you have done to make it work which hasn't been revealed yet.

Also installing those identified an error/issue with your .deb file or its installation details which you might like to fix ...

Code: Select all

Preparing to unpack .../qemu_1%3a3.1+dfsg-8+deb10u2_armhf.deb ...
Unpacking qemu (1:3.1+dfsg-8+deb10u2) ...
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 32081 package 'piroot':
 missing 'Description' field
 

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 1:14 am

Hmm. With the dpkg-deb error I have gotten that. The next update will have a description. I kind of rushed the deb package. Right now I can’t do anything, but for me it worked on Raspbian Buster 64 bit. When I get home, I will try it 32 bit.
Random dude. Likes dogs. And Linux. Complete NOOB.

hippy
Posts: 6528
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 1:28 am

Given this from past discussion, could this be a pointer to the root of the problem, that whatever is needed to make that X86-64 Debian /bin/su run isn't actually in place ?
jdonald wrote:
Sun Sep 08, 2019 4:26 am
I heard that Buster no longer requires copying qemu-i386-static into the chroot's /usr/bin. I haven't verified this myself. Give it a shot without that line.
Could it be that not copying that worked for you so that ( or something ) isn't being copied over, with the result that it doesn't work for others ?

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sat Oct 05, 2019 1:32 am

I don’t think so because I remember trying it and it didn’t work, but when I get home I will look at the code. I have the .deb on my phone, I will see if there is an app that extracts it and will post source code without OSes.
Random dude. Likes dogs. And Linux. Complete NOOB.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian, and Raspbian in the terminal.

Sun Oct 06, 2019 1:53 am

Alright. I have figured it out. Hippy, you were right. I copied qemu-i386-static over to Debian. Whoops. I fixed that just by installing qemu-user-static, or something else if I wrote that wrong. And here is a video (gif)
Image
Random dude. Likes dogs. And Linux. Complete NOOB.

User avatar
Pulsar33
Posts: 124
Joined: Sun Aug 25, 2019 4:06 pm
Location: Bordeaux France

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 7:27 am

Hello,

Great! We can see better now what it's for. Waiting for source code ...

As a suggestion, I will say that Windows XP would be a good improvement for piRoot. Indeed, there were many useful executable under this OS that do not run under Seven or W10 today. That's why so many people have switched to Linux but they have trouble finding what they need and what was working so well under XP. There is at least one version without registration called Mini Windows XP. It is present on Hiren Boot CD ... Don't know if that could be used.

Have a nice day
Pulsar33
Pi 4 with 4Gb memory, DVB TV pHAT ------------------- Desktop : Core i5 Linux MINT 19.2

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 12:29 pm

Ok, I will try adding Windows XP in beta 2.
Random dude. Likes dogs. And Linux. Complete NOOB.

hippy
Posts: 6528
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 12:36 pm

SkywalkerSW5 wrote:
Sun Oct 06, 2019 1:53 am
Alright. I have figured it out. Hippy, you were right. I copied qemu-i386-static over to Debian. Whoops. I fixed that just by installing qemu-user-static, or something else if I wrote that wrong.
Excellent. As long as you document and detail all the steps needed to set it up, what to install, copy and where to, or have your script do that, that should resolve what issues there are.

In terms of distributables; I think it would be better to have piRoot.deb just install the script and Desktop shortcut, qemu and whatever. Have additional piRoot-Debian.deb, piRoot-Raspbian.deb, piRoot-Whatever.deb packages so one doesn't need to download the OS's when just the main script etc changes, and one can then install as many or as few OS's as one wishes.

That will also get the 'Where's the source code?' monkey off your back in that, at least you can publish the source for the piRoot.deb, while figuring out what's required for the OS's themselves.
Pulsar33 wrote:
Sun Oct 06, 2019 7:27 am
Great! We can see better now what it's for. Waiting for source code ...
I don't think there is any source code per se other than that '/usr/piRoot/app/piRoot' bash script which just chroots and runs 'su' once done, plus the Desktop shortcut file.

The rest is whatever OS installation makes up the various chrooted directory trees.
Pulsar33 wrote:
Sun Oct 06, 2019 7:27 am
As a suggestion, I will say that Windows XP would be a good improvement for piRoot.
Although I suggested Full Windows 10; that was mostly a humorous retort. I too would prefer XP.

Though, to be honest, my most immediate interest is being able to get X86 32-bit Linux Desktop Apps running under Raspbian.

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 1:02 pm

Would it be illegal to distribute the Windows XP image I have?
Random dude. Likes dogs. And Linux. Complete NOOB.

ejolson
Posts: 4053
Joined: Tue Mar 18, 2014 11:47 am

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 3:59 pm

SkywalkerSW5 wrote:
Sun Oct 06, 2019 1:02 pm
Would it be illegal to distribute the Windows XP image I have?
Unfortunately yes.

One of the advantages of GNU and other open-source software is the freedom to use it to make derivative works. One of the surprising disadvantages of most proprietary software is that the usage licenses are closer to rental agreements than ownership.

Put simply, even though you bought XP, you don't own it; even though you didn't buy Debian, you do.

User avatar
Pulsar33
Posts: 124
Joined: Sun Aug 25, 2019 4:06 pm
Location: Bordeaux France

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 6:42 pm

SkywalkerSW5 wrote:
Sun Oct 06, 2019 1:02 pm
Would it be illegal to distribute the Windows XP image I have?
Unfortunately, yes, I agree. This is why I spoke about Hiren Boot CD. Since many years, this tool embed a "Mini Windows XP", with a lot of usefull tools, without the need of a license. But I don't know how they do and how they can skip over the license problem.

Good evening
Pulsar33
Pi 4 with 4Gb memory, DVB TV pHAT ------------------- Desktop : Core i5 Linux MINT 19.2

SkywalkerSW5
Posts: 80
Joined: Fri Apr 19, 2019 3:54 pm

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 7:00 pm

Would anyone be interested in Windows 98?
Random dude. Likes dogs. And Linux. Complete NOOB.

hippy
Posts: 6528
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Sun Oct 06, 2019 7:16 pm

SkywalkerSW5 wrote:
Sun Oct 06, 2019 7:00 pm
Would anyone be interested in Windows 98?
You will face the same "illegal" and licensing issues as with XP., and W95 etc.

The best thing to do is to describe how a legally owned Windows Disc / set-up can be converted into something which piRoot can use then leave it to users to do that.

But I think your priority should be to get what you have working for others with X86-64 Debian ...

1) Make what you have released work as is
2) Split into piRoot.deb and piRoot-Debian-X86-64.deb
3) Add piRoot-Raspbian.deb if you wish
4) Detail how to add XP etc to a piRoot installation

Return to “General discussion”