[systemd-devel] Add ARCH parameter to /etc/os-release

Askar Safin safinaskar at mail.ru
Mon Apr 8 10:59:50 PDT 2013


> I wonder if it wouldn't be a better idea to somehow provide a sane API
> for this functionality rather than defining a configuration file format
> for it?
I think there should be some plain text file with arch. Because this gives us chance to determine arch of some foreign system even if we cannot chroot to it. Thus, we can gather information about other systems installed on this computer, about systems presented in loop devices etc.



> c) you can convert a 32bit debian userspace into a 64bit debian
>    userspace with just a bit of apt package installation?
No. The command "dpkg --print-architecture" prints primary arch and it cannot be changed. (Also, "dpkg --print-foreign-architectures" prints all other, i. e. foreign arches.) Yes, theoretically this is an arch of the dpkg itself. So, theoretically it is possible to remove 32-bit dpkg and install 64-bit dpkg. But this is not intended use of debian multiarch. I tried to do this and this failed. (This is log: http://paste.debian.net/248291 .) But then, I tried harder and converted 32-bit debian to 64-bit one :) This is new log: http://paste.org.ru/?6ay51x . (I used my own util asdebootstrap, which is similar to debootstrap, of course, I can show its source code.) But this was very tricky and this was complete abuse of Debian system. And of course, this is not supported at this time. Maybe in the future there will be OK to convert 32-bit system to 64-bit one.


More information about the systemd-devel mailing list