Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #244851 > unrolled thread

i386 or AMD64 - Which is currently running?

Started byRichard Owlett <rowlett@cloud85.net>
First post2022-01-31 13:40 +0100
Last post2022-01-31 20:20 +0100
Articles 9 on this page of 29 — 12 participants

Back to article view | Back to linux.debian.user


Contents

  i386 or AMD64 - Which is currently running? Richard Owlett <rowlett@cloud85.net> - 2022-01-31 13:40 +0100
    Re: i386 or AMD64 - Which is currently running? Curt <curty@free.fr> - 2022-01-31 13:40 +0100
      Re: i386 or AMD64 - Which is currently running? Richard Owlett <rowlett@cloud85.net> - 2022-01-31 17:00 +0100
        Re: i386 or AMD64 - Which is currently running? Curt <curty@free.fr> - 2022-01-31 17:40 +0100
          Re: i386 or AMD64 - Which is currently running? Greg Wooledge <greg@wooledge.org> - 2022-01-31 17:40 +0100
            Re: i386 or AMD64 - Which is currently running? Brian <ad44@cityscape.co.uk> - 2022-01-31 21:10 +0100
              Re: i386 or AMD64 - Which is currently running? Stefan Monnier <monnier@iro.umontreal.ca> - 2022-01-31 22:40 +0100
                Re: i386 or AMD64 - Which is currently running? Greg Wooledge <greg@wooledge.org> - 2022-01-31 22:50 +0100
                  Re: i386 or AMD64 - Which is currently running? Stefan Monnier <monnier@iro.umontreal.ca> - 2022-02-01 03:10 +0100
                    Re: i386 or AMD64 - Which is currently running? David Wright <deblis@lionunicorn.co.uk> - 2022-02-01 04:00 +0100
                      Re: i386 or AMD64 - Which is currently running? Stefan Monnier <monnier@iro.umontreal.ca> - 2022-02-01 06:30 +0100
                    Re: i386 or AMD64 - Which is currently running? Michael Stone <mstone@debian.org> - 2022-02-01 04:20 +0100
                      Re: i386 or AMD64 - Which is currently running? Stefan Monnier <monnier@iro.umontreal.ca> - 2022-02-01 06:40 +0100
                        Re: i386 or AMD64 - Which is currently running? Michael Stone <mstone@debian.org> - 2022-02-01 14:40 +0100
                Re: i386 or AMD64 - Which is currently running? Richard Owlett <rowlett@cloud85.net> - 2022-02-01 01:40 +0100
                Re: i386 or AMD64 - Which is currently running? <tomas@tuxteam.de> - 2022-02-01 06:50 +0100
                Re: i386 or AMD64 - Which is currently running? Curt <curty@free.fr> - 2022-02-01 13:30 +0100
                  Re: i386 or AMD64 - Which is currently running? Stanislav Vlasov <stanislav.v.v@gmail.com> - 2022-02-01 17:20 +0100
                    Re: i386 or AMD64 - Which is currently running? Curt <curty@free.fr> - 2022-02-01 18:50 +0100
              CLARIFICATION --- Re: i386 or AMD64 - Which is currently running? Richard Owlett <rowlett@cloud85.net> - 2022-02-01 01:40 +0100
                Re: CLARIFICATION --- Re: i386 or AMD64 - Which is currently running? songbird <songbird@anthive.com> - 2022-02-01 07:20 +0100
                  Re: CLARIFICATION --- Re: i386 or AMD64 - Which is currently running? Richard Owlett <rowlett@cloud85.net> - 2022-02-01 13:10 +0100
        Re: i386 or AMD64 - Which is currently running? Stefan Krusche <linux@stefan-krusche.de> - 2022-02-01 11:50 +0100
    Re: i386 or AMD64 - Which is currently running? Greg Wooledge <greg@wooledge.org> - 2022-01-31 14:40 +0100
      Re: i386 or AMD64 - Which is currently running? David Wright <deblis@lionunicorn.co.uk> - 2022-01-31 17:50 +0100
    Re: i386 or AMD64 - Which is currently running? Teemu Likonen <tlikonen@iki.fi> - 2022-01-31 14:40 +0100
      Re: i386 or AMD64 - Which is currently running? Greg Wooledge <greg@wooledge.org> - 2022-01-31 14:40 +0100
    Re: i386 or AMD64 - Which is currently running? Stefan Monnier <monnier@iro.umontreal.ca> - 2022-01-31 14:40 +0100
    Re: i386 or AMD64 - Which is currently running? David Wright <deblis@lionunicorn.co.uk> - 2022-01-31 20:20 +0100

Page 2 of 2 — ← Prev page 1 [2]


#244900 — Re: CLARIFICATION --- Re: i386 or AMD64 - Which is currently running?

Fromsongbird <songbird@anthive.com>
Date2022-02-01 07:20 +0100
SubjectRe: CLARIFICATION --- Re: i386 or AMD64 - Which is currently running?
Message-ID<DLUGd-5Aq-1@gated-at.bofh.it>
In reply to#244891
Richard Owlett wrote:
...
> My hardware can support either 32 or 64 bit OS.
> I *ONLY* use one or the other.
> My goal is to determine which I chose at installation.

  that should be somewhere in:

/var/log/installer


  songbird

[toc] | [prev] | [next] | [standalone]


#244905 — Re: CLARIFICATION --- Re: i386 or AMD64 - Which is currently running?

FromRichard Owlett <rowlett@cloud85.net>
Date2022-02-01 13:10 +0100
SubjectRe: CLARIFICATION --- Re: i386 or AMD64 - Which is currently running?
Message-ID<DM08V-x6-3@gated-at.bofh.it>
In reply to#244900
On 02/01/2022 12:12 AM, songbird wrote:
> Richard Owlett wrote:
> ...
>> My hardware can support either 32 or 64 bit OS.
>> I *ONLY* use one or the other.
>> My goal is to determine which I chose at installation.
> 
>    that should be somewhere in:
> 
> /var/log/installer
> 

Yes but ;/
"dpkg --print-architecture" is very user friendly.
"file /bin/ls" is flexible and acceptably friendly.

[toc] | [prev] | [next] | [standalone]


#244903

FromStefan Krusche <linux@stefan-krusche.de>
Date2022-02-01 11:50 +0100
Message-ID<DLYTw-84y-3@gated-at.bofh.it>
In reply to#244868
Am Montag, 31. Januar 2022 schrieb Richard Owlett:
> >> 2. As superuser, how can I determine which is installed on a
> >> different partition?
> >>      [ My typical installation routine has been a descriptive
> >> label for each root partition. But not always done ;{ ]
> >
> > If the superuser doesn't know, I surely don't know.
>
> I was trying to determine what another boot-able OS on the machine
> would do.
>
> I suspect the appropriate use of the "--admindir=?????" option to
> "dpkg-query" may be appropriate [I need to carefully re-read
> man-pages for dpkg-query and dpkg.]

Yes, I did it this way. The admindir is usually "/var/lib/dpkg" of the 
interesting system. With --get-selections you can give a pattern.

$ 
dpkg --admindir=/mnt/BACKUP/2020/SSD128-root1/var/lib/dpkg --get-selections "*virt*"
virtualbox                                      install
virtualbox-dkms                                 install
virtualbox-guest-additions-iso                  install
virtualbox-qt                                   install

HTH

Kind regards,
Stefan

[toc] | [prev] | [next] | [standalone]


#244859

FromGreg Wooledge <greg@wooledge.org>
Date2022-01-31 14:40 +0100
Message-ID<DLF4u-4rX-17@gated-at.bofh.it>
In reply to#244851
On Mon, Jan 31, 2022 at 08:23:45AM -0500, Stefan Monnier wrote:
> > 1. From current console, how can I determine which is running?
> >    [ equivalent of /etc/debian_version would be ideal ]
> 
> Depends what you mean.  The answer may also be "both" depending on what
> you care about.  E.g. many of my machines run an amd64 kernel with an
> i386 set of Debian binaries running on top of it, and some of them also
> include a few Debian amd64 binaries.
> 
> `uname -a` tells you what kernel you're running.
> `file /bin/sh` should tell you what that executable uses.

/bin/sh is a symlink, so that's not a useful command to determine
your arch.  I typically use "file /bin/ls" instead.

[toc] | [prev] | [next] | [standalone]


#244872

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-01-31 17:50 +0100
Message-ID<DLI2m-6bR-3@gated-at.bofh.it>
In reply to#244859
On Mon 31 Jan 2022 at 08:26:35 (-0500), Greg Wooledge wrote:
> On Mon, Jan 31, 2022 at 08:23:45AM -0500, Stefan Monnier wrote:
> > > 1. From current console, how can I determine which is running?
> > >    [ equivalent of /etc/debian_version would be ideal ]
> > 
> > Depends what you mean.  The answer may also be "both" depending on what
> > you care about.  E.g. many of my machines run an amd64 kernel with an
> > i386 set of Debian binaries running on top of it, and some of them also
> > include a few Debian amd64 binaries.
> > 
> > `uname -a` tells you what kernel you're running.
> > `file /bin/sh` should tell you what that executable uses.
> 
> /bin/sh is a symlink, so that's not a useful command to determine
> your arch.  I typically use "file /bin/ls" instead.

file -L   is a useful habit for looking at system files.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#244860

FromTeemu Likonen <tlikonen@iki.fi>
Date2022-01-31 14:40 +0100
Message-ID<DLF4u-4rX-21@gated-at.bofh.it>
In reply to#244851

[Multipart message — attachments visible in raw view] — view raw

* 2022-01-31 06:32:23-0600, Richard Owlett wrote:

> Due to historical circumstances, I have laptops which multi-boot
> various Debian releases. There be 32 bit and 64 bit versions of the
> same release on a particular machine.
>
> 1. From current console, how can I determine which is running?
>     [ equivalent of /etc/debian_version would be ideal ]

The running kernel and CPU:

    $ lscpu | head -n2
    Architecture:                    x86_64
    CPU op-mode(s):                  32-bit, 64-bit

    $ uname -m
    x86_64

> 2. As superuser, how can I determine which is installed on a different
>     partition?
>     [ My typical installation routine has been a descriptive label for
>       each root partition. But not always done ;{ ]

Package manager can tell about installed packages. Kernel package names
include the architecture:

    $ aptitude search ~i~nlinux-image-
    i   linux-image-5.10.0-10-amd64   - Linux 5.10 for 64-bit PCs (signed)                
    i   linux-image-5.10.0-11-amd64   - Linux 5.10 for 64-bit PCs (signed)                
    i A linux-image-5.10.0-9-amd64    - Linux 5.10 for 64-bit PCs (signed)                
    i   linux-image-amd64             - Linux for 64-bit PCs (meta-package)               

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462

[toc] | [prev] | [next] | [standalone]


#244861

FromGreg Wooledge <greg@wooledge.org>
Date2022-01-31 14:40 +0100
Message-ID<DLF4u-4rX-25@gated-at.bofh.it>
In reply to#244860
On Mon, Jan 31, 2022 at 03:24:51PM +0200, Teemu Likonen wrote:
> * 2022-01-31 06:32:23-0600, Richard Owlett wrote:
> 
> > Due to historical circumstances, I have laptops which multi-boot
> > various Debian releases. There be 32 bit and 64 bit versions of the
> > same release on a particular machine.
> >
> > 1. From current console, how can I determine which is running?
> >     [ equivalent of /etc/debian_version would be ideal ]
> 
> The running kernel and CPU:
> 
>     $ lscpu | head -n2
>     Architecture:                    x86_64
>     CPU op-mode(s):                  32-bit, 64-bit
> 
>     $ uname -m
>     x86_64

The problem is, you can have a 64-bit kernel and a 32-bit userspace.
So, there's no "uname" command that answers the real question.

The real command the OP is looking for is dpkg --print-architecture

I still prefer file /bin/ls because I can *remember* it (and it'll work
on non-Debian-based systems).

[toc] | [prev] | [next] | [standalone]


#244862

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2022-01-31 14:40 +0100
Message-ID<DLF4u-4rX-19@gated-at.bofh.it>
In reply to#244851
> 1. From current console, how can I determine which is running?
>    [ equivalent of /etc/debian_version would be ideal ]

Depends what you mean.  The answer may also be "both" depending on what
you care about.  E.g. many of my machines run an amd64 kernel with an
i386 set of Debian binaries running on top of it, and some of them also
include a few Debian amd64 binaries.

`uname -a` tells you what kernel you're running.
`file /bin/sh` should tell you what that executable uses.


        Stefan

[toc] | [prev] | [next] | [standalone]


#244882

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-01-31 20:20 +0100
Message-ID<DLKnv-7Ib-3@gated-at.bofh.it>
In reply to#244851
On Mon 31 Jan 2022 at 06:32:23 (-0600), Richard Owlett wrote:
> Due to historical circumstances, I have laptops which multi-boot
> various Debian releases. There be 32 bit and 64 bit versions of the
> same release on a particular machine.
> 
> 1. From current console, how can I determine which is running?
>    [ equivalent of /etc/debian_version would be ideal ]
> 
> 2. As superuser, how can I determine which is installed on a different
>    partition?
>    [ My typical installation routine has been a descriptive label for
>      each root partition. But not always done ;{ ]

Perhaps the best proof of the presence of a Debian system
with a given architecture has to be /usr/bin/dpkg itself,
and   file /usr/bin/dpkg   also has the advantage of being
able to answer the second question, where you obviously
can't run a binary belonging the foreign partition.

Cheers,
David.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.debian.user


csiph-web