Botspot / vdesktop

Run a second instance of Raspbian inside Raspbian.
GNU General Public License v3.0
125 stars 21 forks source link

Remove `-f` flag when `readlink` and use `od` for more accurate result #40

Closed cycool29 closed 2 years ago

cycool29 commented 2 years ago

Fix vdesktop not detecting guest OS is in 64 bit.

The final symlink of ${MOUNTPOINT}/sbin/init is ${MOUNTPOINT}/usr/lib/systemd/systemd, and I don't know why it returns this when I want to boot a 64-bit OS:

/media/pi/vdesktop/usr/lib/systemd/systemd: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=ca3425718ce4bf3dabccc5b4c971a592309e2806, for GNU/Linux 3.2.0, stripped

Sometimes it even returns /media/pi/vdesktop/usr/lib/systemd/systemd: cannot open '/media/pi/vdesktop/usr/lib/systemd/systemd' (No such file or directory).

But the first symlink, ${MOUNTPOINT}/lib/systemd/systemd returns the right thing:

/media/pi/vdesktop/lib/systemd/systemd: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=c3174499a703cbe3b83c28aef6ec1e9ae27196b9, stripped

Also, I am using od method as Botspot used in pi-apps because it is more accurate than grepping from the file output.