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

Askar Safin safinaskar at mail.ru
Mon Apr 8 11:09:39 PDT 2013


>I'm not sure what problem the proposal is trying to solve.  Maybe it'd
>be clearer if that was provided.
I want to know what is the arches of the systems on my computer. I. e. I want to do the following:

for DISK in /dev/sd*; do
  mount "$DISK" /mnt
  source /mnt/etc/os-release
  echo "Arch of $DISK is $ARCH"
done

And I want to use this $ARCH to do "setarch", i. e.:
  mount /dev/some-dev /mnt
  source /mnt/etc/os-release
  setarch "$ARCH" chroot /mnt
So, this /mnt system will see "uname -m" output which is meaningful for the system.


More information about the systemd-devel mailing list