Installer: 32 vs. 64 bit

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Installer: 32 vs. 64 bit

Juliusz Chroboczek-4
Hi,

I've been encouraging my students to install Debian on their personal
machines, and we've found out that a lot of them get the wrong Debian
installer:

  - some of them attempt to install an AMD64 version of Debian in
    a 32-bit-only virtual machine;
  - others attempt to install an i386 version on 64-bit hardware.

In both cases, the installer crashes with no useful error message (in the
former case, it crashes just after installing grub, in the latter case, it
crashes straight away).  This is a bad user experience, since the students
lose a lot of time trying to work out the issue on their own before they
ask for an appointment, and end up with the impression that installing
Debian "never works".

Could somebody please speak with the installer people so they make sure
that the installation fails with a friendly user message in both of the
cases outlined above?

Thanks,

-- Juliusz Chroboczek

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Andrey Rahmatullin-3
On Fri, Oct 26, 2018 at 02:41:31PM +0200, Juliusz Chroboczek wrote:

> I've been encouraging my students to install Debian on their personal
> machines, and we've found out that a lot of them get the wrong Debian
> installer:
>
>   - some of them attempt to install an AMD64 version of Debian in
>     a 32-bit-only virtual machine;
>   - others attempt to install an i386 version on 64-bit hardware.
>
> In both cases, the installer crashes with no useful error message (in the
> former case, it crashes just after installing grub, in the latter case, it
> crashes straight away).  
I don't think an i386 version of anything can crash on 64-bit hardware for
hardware reasons. Are you sure it's the actual reason?

--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Samuel Thibault-8
In reply to this post by Juliusz Chroboczek-4
Hello,

Juliusz Chroboczek, le ven. 26 oct. 2018 14:41:31 +0200, a ecrit:
> In both cases, the installer crashes with no useful error message

This is not what I get.

- 32bit debian on 64bit machine: this should be working fine
- 64bit debian on 32bit machine: I get the attached message

If it's not what they get, there is some bug and more investigation is
needed.

Samuel

msg.png (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Ben Hutchings-3
In reply to this post by Juliusz Chroboczek-4
On Fri, 2018-10-26 at 14:41 +0200, Juliusz Chroboczek wrote:
> Hi,
>
> I've been encouraging my students to install Debian on their personal
> machines, and we've found out that a lot of them get the wrong Debian
> installer:
>
>   - some of them attempt to install an AMD64 version of Debian in
>     a 32-bit-only virtual machine;

Why are they creating 32-bit virtual machines?  Perhaps this is a bad
default in the VM manaager?

>   - others attempt to install an i386 version on 64-bit hardware.

This should work, in general.  It won't work on a 64-bit system that
only supports EFI boot - and the installer won't be able to report
that, unless it includes a dummy 64-bit EFI program just to do that.

[...]
> Could somebody please speak with the installer people so they make sure
> that the installation fails with a friendly user message in both of the
> cases outlined above?

We should not do in this in the second case, since it is supposed to
work.  (But a warning might be reasonable.)

Ben.

--
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
                                                           - Bill Gates



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Adam Borowski-3
On Fri, Oct 26, 2018 at 08:17:11PM +0100, Ben Hutchings wrote:

> On Fri, 2018-10-26 at 14:41 +0200, Juliusz Chroboczek wrote:
> > I've been encouraging my students to install Debian on their personal
> > machines, and we've found out that a lot of them get the wrong Debian
> > installer:
> >
> >   - some of them attempt to install an AMD64 version of Debian in
> >     a 32-bit-only virtual machine;
>
> Why are they creating 32-bit virtual machines?  Perhaps this is a bad
> default in the VM manaager?

Or an user error.  In either case, I don't get what a 32-bit _x86_ virtual
machine would be good for.  Are you teaching some code archeology?  Do you
want to prepare 32-bit images for something deeply embedded?  Neither sounds
an activity fit for your students.

For anything else, you want an amd64 kernel, possibly running i386 or x32
code.  Heck, even an i386 kernel would run fine on a 64-bit capable VM.

> >   - others attempt to install an i386 version on 64-bit hardware.
>
> This should work, in general.  It won't work on a 64-bit system that
> only supports EFI boot - and the installer won't be able to report
> that, unless it includes a dummy 64-bit EFI program just to do that.

Installing i386 is also an user error unless you know you specifically need
that.  It's less egregious than a 32-bit VM, but still should be strongly
discouraged.  It kind of worked before, but then we got melted spectrum
mitigations -- new CPUs get a lot more to mitigate, and that really sucks on
32-bit kernels on 64-bit hardware.  Just don't.

i386 kernels should be used only if you actually have 32-bit hardware or
help someone who does.  You may still run 32-bit userland if you so wish.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢰⠒⠀⣿⡁ 10 people enter a bar: 1 who understands binary,
⢿⡄⠘⠷⠚⠋⠀ 1 who doesn't, D who prefer to write it as hex,
⠈⠳⣄⠀⠀⠀⠀ and 1 who narrowly avoided an off-by-one error.

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Pierre-Elliott Bécue-3
In reply to this post by Juliusz Chroboczek-4
Le vendredi 26 octobre 2018 à 14:41:31+0200, Juliusz Chroboczek a écrit :
> […]
> Could somebody please speak with the installer people so they make sure
> that the installation fails with a friendly user message in both of the
> cases outlined above?

Regardless of the discussion, you can, and should!

It's just about filing a bug on the bug tracking system.

As you're a long date user of Debian, I assume you know that, but it'd be a
great idea to submit such a bug, even if you wish to bring the discussion on
-devel, instead of just sending this for a discussion in devel.

--
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528  F493 0D44 2664 1949 74E2
It's far easier to fight for one's principles than to live up to them.

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

peter green-2
In reply to this post by Juliusz Chroboczek-4
> Why are they creating 32-bit virtual machines?

At least with virtualbox 32-bit VMs can run on any host. 64-bit VMs require VT-x which is all too often disabled in the BIOS.

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Chris Knadle
In reply to this post by Juliusz Chroboczek-4
Juliusz Chroboczek:

> I've been encouraging my students to install Debian on their personal
> machines, and we've found out that a lot of them get the wrong Debian
> installer:
>
>   - some of them attempt to install an AMD64 version of Debian in
>     a 32-bit-only virtual machine;
>   - others attempt to install an i386 version on 64-bit hardware.
>
> In both cases, the installer crashes with no useful error message (in the
> former case, it crashes just after installing grub, in the latter case, it
> crashes straight away).

When discussing virtual machines it would be helpful to mention which virtual
machine hypervisor is being used, because the resulting behavior can differ
depending on hypervisor.  For instance (at least at one time) it was possible to
install a 64-bit Debian on a 32-bit host under VirtualBox, but not under some
other hypervisors.  [e.g. hypervisors -- Hyper-V, VirtualBox, VMware, Xen, KVM.]

And as Peter Green mentioned, most of the hypervisors require certain BIOS
features [VT-x or AMD-V] to be active before a virtual machine can be installed.
(VirtualBox didn't require this at one time, but seems to require it with
version 2 and up.)

   -- Chris

--
Chris Knadle
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Juliusz Chroboczek-4
In reply to this post by Samuel Thibault-8
> This is not what I get.

> - 32bit debian on 64bit machine: this should be working fine
> - 64bit debian on 32bit machine: I get the attached message

> If it's not what they get, there is some bug and more investigation is
> needed.

I no longer have access to their machines, so I'm unfortunately unable to
check.

-- Juliusz

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Juliusz Chroboczek-4
In reply to this post by Ben Hutchings-3
>> I've been encouraging my students to install Debian on their personal
>> machines, and we've found out that a lot of them get the wrong Debian
>> installer:
>>
>> - some of them attempt to install an AMD64 version of Debian in
>> a 32-bit-only virtual machine;

> Why are they creating 32-bit virtual machines?  Perhaps this is a bad
> default in the VM manaager?

Yes, it was a bad default in the laptop's BIOS (VT-something was
disabled).  HP's bug, obviously, but it would have made for a better
experience if the Debian installer had complained in a comprehensible
manner straight away.

>> - others attempt to install an i386 version on 64-bit hardware.

> This should work, in general.  It won't work on a 64-bit system that
> only supports EFI boot - and the installer won't be able to report
> that, unless it includes a dummy 64-bit EFI program just to do that.

It was a recent laptop, and the user had manually enabled BIOS boot.  The
installer hung with a black screen just after the initial menu.

> We should not do in this in the second case, since it is supposed to
> work.  (But a warning might be reasonable.)

Please.

-- Juliusz

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Juliusz Chroboczek-4
In reply to this post by Chris Knadle
> When discussing virtual machines it would be helpful to mention which virtual
> machine hypervisor is being used, because the resulting behavior can differ
> depending on hypervisor.

It was VirtualBox under Windows.  The underlying issue was that VT-x was
disabled in the BIOS, and hence VirtualBox didn't offer any 64-bit
machines.  The student tried her best to make it work, I don't think she
can be blamed for failing.

-- Juliusz

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Tony Godshall
If VT-x is disabled, the virtual machine will be sluggish, so if it
works, it'll be a bad experience.

Don't do that.

On Thu, Nov 8, 2018 at 11:04 AM Juliusz Chroboczek <[hidden email]> wrote:

>
> > When discussing virtual machines it would be helpful to mention which virtual
> > machine hypervisor is being used, because the resulting behavior can differ
> > depending on hypervisor.
>
> It was VirtualBox under Windows.  The underlying issue was that VT-x was
> disabled in the BIOS, and hence VirtualBox didn't offer any 64-bit
> machines.  The student tried her best to make it work, I don't think she
> can be blamed for failing.
>
> -- Juliusz
>


--
--
Best Regards.
This is unedited.
This message came out of me
via a suboptimal keyboard.

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Chris Knadle
In reply to this post by Juliusz Chroboczek-4
Juliusz Chroboczek:

>> When discussing virtual machines it would be helpful to mention which virtual
>> machine hypervisor is being used, because the resulting behavior can differ
>> depending on hypervisor.
>
> It was VirtualBox under Windows.  The underlying issue was that VT-x was
> disabled in the BIOS, and hence VirtualBox didn't offer any 64-bit
> machines.  The student tried her best to make it work, I don't think she
> can be blamed for failing.
>
> -- Juliusz

Okay -- thanks for taking the time to find the root cause of the issue.

Unfortunately VT-x being disabled in the BIOS is not an abnormal situation, so
it's not any kind of "error" per se that normally needs to be reported.  This is
a feature specific to virtualization and many end-user machines aren't used that
way -- and in my experience the virtualization features ship default to being
turned off.

A logical place to check or the lack of BIOS virtualization features and show an
error message for this would be within the .postinst script for the virtualbox
package in Debian.  This way when Virtualbox is installed the user installing it
can be warned that VT-x or AMD-V isn't active and give a hint as to how to fix
it.  Alternatively a /usr/share/doc/virtualbox/README.Debian file could contain
a warning about this for the user to read, which assumes the user knows to look
for that.  [I checked -- right now the virtualbox source package in Debian
contains neither AFAICT.]

Filing a bug on src:virtualbox with severity 'wishlist' or 'normal' for this
issue to discuss it with the maintainer of the virtualbox package(s) seems a
logical thing to do.

   -- Chris

--
Chris Knadle
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Paul Wise via nm
On Fri, Nov 9, 2018 at 1:32 PM Chris Knadle wrote:

> A logical place to check or the lack of BIOS virtualization features and show an
> error message for this would be within the .postinst script for the virtualbox
> package in Debian.  This way when Virtualbox is installed the user installing it
> can be warned that VT-x or AMD-V isn't active and give a hint as to how to fix
> it.  Alternatively a /usr/share/doc/virtualbox/README.Debian file could contain
> a warning about this for the user to read, which assumes the user knows to look
> for that.  [I checked -- right now the virtualbox source package in Debian
> contains neither AFAICT.]

I think printing errors like this in the postinst is unlikely to
attract the attention of users who such a warning might be targetted
at. Even for the extra-technical ones who do read their apt logs
judiciously (or have a script to do that for them), it also doesn't
fix the situation when folks are running Debian VMs in VirtualBox
running on other platforms.

So probably the VirtualBox UI should be indicating the lack of
VT-x/AMD-V and inducing users to reboot and turn that on in their boot
firmware.

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Chris Knadle
Paul Wise:

> On Fri, Nov 9, 2018 at 1:32 PM Chris Knadle wrote:
>
>> A logical place to check or the lack of BIOS virtualization features and show an
>> error message for this would be within the .postinst script for the virtualbox
>> package in Debian.  This way when Virtualbox is installed the user installing it
>> can be warned that VT-x or AMD-V isn't active and give a hint as to how to fix
>> it.  Alternatively a /usr/share/doc/virtualbox/README.Debian file could contain
>> a warning about this for the user to read, which assumes the user knows to look
>> for that.  [I checked -- right now the virtualbox source package in Debian
>> contains neither AFAICT.]
>
> I think printing errors like this in the postinst is unlikely to
> attract the attention of users who such a warning might be targetted
> at.

Yes I'm also concerned about that; we (Debian Developers) have been discussing
that issue for a long time.  A Debconf prompt is probably better, but it's also
more invasive and those are meant to be avoided unless necessary.

And in this case the issue started with a Debian VM running in VirtualBox on a
Windows host.  *shrug*

> Even for the extra-technical ones who do read their apt logs
> judiciously (or have a script to do that for them), it also doesn't
> fix the situation when folks are running Debian VMs in VirtualBox
> running on other platforms.
>
> So probably the VirtualBox UI should be indicating the lack of
> VT-x/AMD-V and inducing users to reboot and turn that on in their boot
> firmware.

Looking at the code, I think this is already the case.

In the source package for VirtualBox in Sid I see text for warnings related to
this in translation files such as
src/VBox/Frontends/VirtualBox/nls/VirtualBox_eu.ts; however they don't appear in
src/VBox/Frontends/VirtualBox/nls/VirtualBox_en.ts.  The VirtualBox_en.ts and
qt_en.ts files are significantly shorter than other translations, but I think
that's due to the English translation being built-in.

   -- Chris

--
Chris Knadle
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Jonathan Dowland
In reply to this post by Adam Borowski-3
On Fri, Oct 26, 2018 at 10:41:32PM +0200, Adam Borowski wrote:
>Or an user error.  In either case, I don't get what a 32-bit _x86_ virtual
>machine would be good for.  Are you teaching some code archeology?  Do you
>want to prepare 32-bit images for something deeply embedded?  Neither sounds
>an activity fit for your students.

I'm not sure we are necessarily the experts in what is a fit activity
for this teacher's students.

>For anything else, you want an amd64 kernel, possibly running i386 or x32
>code.

IMHO there are a remarkably small number of situations where x32 would be a
sensible suggestion.

--

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Adam Borowski-3
On Fri, Nov 09, 2018 at 11:36:36AM +0000, Jonathan Dowland wrote:
> On Fri, Oct 26, 2018 at 10:41:32PM +0200, Adam Borowski wrote:
> > Or an user error.  In either case, I don't get what a 32-bit _x86_ virtual
> > machine would be good for.  Are you teaching some code archeology?  Do you
> > want to prepare 32-bit images for something deeply embedded?  Neither sounds
> > an activity fit for your students.
>
> I'm not sure we are necessarily the experts in what is a fit activity
> for this teacher's students.

If his students were doing code archaeology or deep embedded, such areas
require enough base skills that getting spooked by 32 vs 64 bits would be
beyond them.

Less variants -> less confusion -> less pain for the teacher.  There are
architectures where running a 32-bit VM might be a worthy use of your time,
but it's not the case here.

> > For anything else, you want an amd64 kernel, possibly running i386 or x32
> > code.
>
> IMHO there are a remarkably small number of situations where x32 would be a
> sensible suggestion.

As a lapsed x32 porter, I agree.  But it's still more sensible than i386.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀ Have you heard of the Amber Road?  For thousands of years, the
⣾⠁⢰⠒⠀⣿⡁ Romans and co valued amber, hauled through the Europe over the
⢿⡄⠘⠷⠚⠋⠀ mountains and along the Vistula, from Gdańsk.  To where it came
⠈⠳⣄⠀⠀⠀⠀ together with silk (judging by today's amber stalls).

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Jonathan Dowland
On Fri, Nov 09, 2018 at 01:40:59PM +0100, Adam Borowski wrote:
>If his students were doing code archaeology or deep embedded, such areas
>require enough base skills that getting spooked by 32 vs 64 bits would be
>beyond them.

Everyone starts somewhere, even code archaeologists. At my former School
a Lecturer taught Operating Systems by getting the students to write
kernel modules for MINIX on a VM (networking iirc). I'm sure the
majority of those students would get horribly tied up in 32 vs 64 issues
like this if they experienced them; despite that, they broadly succeeded
in writing the kernel modules and passing the course.

--

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Juliusz Chroboczek-4
In reply to this post by Chris Knadle
> Filing a bug on src:virtualbox with severity 'wishlist' or 'normal' for this
> issue to discuss it with the maintainer of the virtualbox package(s) seems a
> logical thing to do.

Unfortunately, we're speaking about running Debian under VirtualBox under
Windows, so it would need to be something that happens in VirtualBox upstream.

Reply | Threaded
Open this post in threaded view
|

Re: Installer: 32 vs. 64 bit

Juliusz Chroboczek-4
In reply to this post by Adam Borowski-3
> Or an user error.  In either case, I don't get what a 32-bit _x86_ virtual
> machine would be good for.  Are you teaching some code archeology?

Not at all.

We're trying to make it compulsory for first year students to have a Unix
installation on their personal machine.  In practice, this means any of
native Linux, native Mac OS, or virtualised Linux.  (We've found Cygwin to
be confusing, and we haven't looked at WSL.)

Since we're trying to get this to scale across a few hundred eighteen-year
olds (smart ones, thankfully), we're seeing all sorts of user errors.

-- Juliusz

12