• Problem installing Debian 11 as dual boot with Windows 10

    From Martin Liddle@21:1/5 to All on Mon Nov 21 17:33:10 2022
    I have been installing Unix/Linux as dual boot with Windows for 30 years without problem but I am struggling with my first attempt to install on
    a Lenovo Thinkpad E570 laptop with a UEFI BIOS. I am using Rufus to
    format a USB memory stick with the following parameters:

    Boot selection: Debian 1150-i386-netinst.iso
    Partition scheme: GPT
    Target system: UEFI (non CSM)
    File system: FAT32
    Cluster size: 4096

    Rufus runs and creates what seems like a reasonable image. But when i
    reboot and try and boot from the USB stick there is a brief flash of the
    LED on the drive and the boot menu returns to the the default Windows
    boot device. I have googled looking for similar problems and tried
    turning off Secure Boot but I am getting nowhere. I have also looked at
    quite a number of YouTube videos and tried a couple of USB memory
    sticks. At the moment I am completely out of ideas. Any suggestions on
    what I am doing wrong or where would be a better place to ask the
    question? I am trying to install a 32bit version of Debian alongside a
    64 bit version of Windows; could this be a problem?

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Tue Nov 22 08:28:25 2022
    Am 21.11.2022 um 17:33:10 Uhr schrieb Martin Liddle:

    I have been installing Unix/Linux as dual boot with Windows for 30
    years without problem but I am struggling with my first attempt to
    install on a Lenovo Thinkpad E570 laptop with a UEFI BIOS.

    Go to the UEFI and set the boot mechanism to "UEFI only". Disable
    Fastboot.

    I am using Rufus to format a USB memory stick with the following
    parameters:

    Don't use Rufus, only write the original ISO image to the flash disk.

    Boot into Windows, disable Fastboot and Hibernate.
    If you don't have a free partition, shrink the windows partition, so
    you have enough free unpartitioned space on the disk.

    Then boot the Debian flash disk and do the partitioning.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Marco Moock on Tue Nov 22 16:42:27 2022
    On 22/11/2022 07:28, Marco Moock wrote:
    Am 21.11.2022 um 17:33:10 Uhr schrieb Martin Liddle:

    I have been installing Unix/Linux as dual boot with Windows for 30
    years without problem but I am struggling with my first attempt to
    install on a Lenovo Thinkpad E570 laptop with a UEFI BIOS.

    Go to the UEFI and set the boot mechanism to "UEFI only". Disable
    Fastboot.

    Thank you for your response. Boot mechanism is "UEFI only". I can't
    find a Fastboot setting in the BIOS but there is a setting to disable fast-startup in Power Options and I have turned that off.
    I am using Rufus to format a USB memory stick with the following
    parameters:

    Don't use Rufus, only write the original ISO image to the flash disk.

    In Linux I have copied the ISO to the flash drive.

    cp debian-11.5.0-i386-netinst.iso /dev/sdb

    Boot into Windows, disable Fastboot and Hibernate.
    If you don't have a free partition, shrink the windows partition, so
    you have enough free unpartitioned space on the disk.

    As I have said previously I have done this lots of times on non UEFI
    hardware and had already made space available.

    Then boot the Debian flash disk and do the partitioning.

    Sadly the Debian flash drive still won't boot. There is a setting in
    the BIOS to enable or disable USB UEFI BIOS support; enabled seemed to
    be sensible but I have tried with it disabled. The complete lack of any
    output when it fails to boot is making it very difficult to diagnose
    what is going on. As I can't find anything relevant via googling I am
    clearly doing something stupid but have no clue as to what that is.

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve McIntyre@21:1/5 to news15@tynecomp.co.uk on Tue Nov 22 17:46:30 2022
    Hi Martin!

    In article <tlgcom$3pqmj$1@dont-email.me>,
    Martin Liddle <news15@tynecomp.co.uk> wrote:
    I have been installing Unix/Linux as dual boot with Windows for 30 years >without problem but I am struggling with my first attempt to install on
    a Lenovo Thinkpad E570 laptop with a UEFI BIOS. I am using Rufus to
    format a USB memory stick with the following parameters:

    Boot selection: Debian 1150-i386-netinst.iso
    Partition scheme: GPT
    Target system: UEFI (non CSM)
    File system: FAT32
    Cluster size: 4096

    Rufus runs and creates what seems like a reasonable image. But when i
    reboot and try and boot from the USB stick there is a brief flash of the
    LED on the drive and the boot menu returns to the the default Windows
    boot device. I have googled looking for similar problems and tried
    turning off Secure Boot but I am getting nowhere. I have also looked at >quite a number of YouTube videos and tried a couple of USB memory
    sticks. At the moment I am completely out of ideas. Any suggestions on
    what I am doing wrong or where would be a better place to ask the
    question? I am trying to install a 32bit version of Debian alongside a
    64 bit version of Windows; could this be a problem?

    That's exactly your problem. When booting via UEFI, the firmware will
    only ever boot an image using a matching architecture/size. As your
    system is using a 64-bit UEFI implementation, it won't boot a 32-bit
    image. You'll need to grab the amd64 netinst instead.

    Steve (the Debian guy who made those images)

    --
    Steve McIntyre, Cambridge, UK
    steve@einval.com https://www.einval.com/~steve/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Steve McIntyre on Tue Nov 22 18:59:28 2022
    On 22/11/2022 17:46, Steve McIntyre wrote:

    That's exactly your problem. When booting via UEFI, the firmware will
    only ever boot an image using a matching architecture/size. As your
    system is using a 64-bit UEFI implementation, it won't boot a 32-bit
    image. You'll need to grab the amd64 netinst instead.


    Thank you, that is very helpful. However I do have a good reason to run
    a 32 bit version for the time being. I have finally discovered a BIOS
    setting that with secure boot off, allows me to give legacy devices
    priority over UEFI; this has allowed me to do a basic 32 bit install
    from a DVD drive with one issue; the grub installation failed. I have
    reset the BIOS back to Secure boot and Windows stills boots. How would
    I install grub in this situation (assuming that I can)?

    --
    Martin Liddle, Tynemouth Computer Services
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Tue Nov 22 19:48:13 2022
    Am 22.11.2022 um 16:42:27 Uhr schrieb Martin Liddle:

    In Linux I have copied the ISO to the flash drive.

    cp debian-11.5.0-i386-netinst.iso /dev/sdb

    You need to use dd to do that.

    dd if=debian-11.5.0-i386-netinst.iso of=/dev/sdb status=progress bs=4M

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Tue Nov 22 20:17:40 2022
    Am 22.11.2022 um 18:59:28 Uhr schrieb Martin Liddle:

    hank you, that is very helpful. However I do have a good reason to
    run a 32 bit version for the time being. I have finally discovered a
    BIOS setting that with secure boot off, allows me to give legacy
    devices priority over UEFI; this has allowed me to do a basic 32 bit
    install from a DVD drive with one issue; the grub installation
    failed. I have reset the BIOS back to Secure boot and Windows stills
    boots. How would I install grub in this situation (assuming that I
    can)?

    i386/i686 and UEFI might be a problem. What is the exact reason for
    using i386 in 2022 on a machine with UEFI that has a amd64 compatible
    cpu.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Marco Moock on Tue Nov 22 19:32:03 2022
    On 22/11/2022 19:17, Marco Moock wrote:
    Am 22.11.2022 um 18:59:28 Uhr schrieb Martin Liddle:

    i386/i686 and UEFI might be a problem. What is the exact reason for
    using i386 in 2022 on a machine with UEFI that has a amd64 compatible
    cpu.


    I have 2 servers and about 20 other computers running 32 bit Linux
    mainly because our software is developed using an ancient 32 bit
    compiler. I am getting very old and it is very debatable whether it is
    worth the hassle of porting everything to a different 64 bit compiler.
    If it is confirmed that we can't mix 32 bit and 64 bit then I'll have to rethink things.

    --
    Martin Liddle
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Martin Liddle on Tue Nov 22 20:50:45 2022
    Martin Liddle <news15@tynecomp.co.uk> wrote:
    On 22/11/2022 19:17, Marco Moock wrote:
    Am 22.11.2022 um 18:59:28 Uhr schrieb Martin Liddle:

    i386/i686 and UEFI might be a problem. What is the exact reason for
    using i386 in 2022 on a machine with UEFI that has a amd64 compatible
    cpu.


    I have 2 servers and about 20 other computers running 32 bit Linux
    mainly because our software is developed using an ancient 32 bit
    compiler. I am getting very old and it is very debatable whether it is
    worth the hassle of porting everything to a different 64 bit compiler.
    If it is confirmed that we can't mix 32 bit and 64 bit then I'll have to rethink things.

    You have roughly two choices:

    1. Work out how to boot a 32 bit OS on a 64 bit UEFI. It might be possible
    to use a 64 bit GRUB to boot a 32 bit kernel, for example. Some tinkering
    is likely to be required.

    2. Install a 64 bit OS. Then just install whatever 32-bit libraries are needed for your 32-bit compiler and apps. You can still run your compiler
    and 32-bit binaries on a 64 bit OS and they will work fine. https://wiki.debian.org/Multiarch
    https://wiki.debian.org/Multiarch/HOWTO

    #2 is the most preferable becaues you're running a 64 bit kernel so you can take advantage of the hardware you have, and just your specific apps are 32 #bit.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Theo on Tue Nov 22 22:14:10 2022
    On 22/11/2022 20:50, Theo wrote:

    You have roughly two choices:

    1. Work out how to boot a 32 bit OS on a 64 bit UEFI. It might be possible to use a 64 bit GRUB to boot a 32 bit kernel, for example. Some tinkering
    is likely to be required.

    2. Install a 64 bit OS. Then just install whatever 32-bit libraries are needed for your 32-bit compiler and apps. You can still run your compiler and 32-bit binaries on a 64 bit OS and they will work fine. https://wiki.debian.org/Multiarch
    https://wiki.debian.org/Multiarch/HOWTO

    #2 is the most preferable becaues you're running a 64 bit kernel so you can take advantage of the hardware you have, and just your specific apps are 32 #bit.

    Theo

    Thanks, your assessment of the situation is similar to mine. I need to experiment and see what works. I haven't got time to do it for a few
    days as I have wasted too much time getting to the point where I
    properly understand the situation.

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to Martin Liddle on Tue Nov 22 22:45:45 2022
    Martin Liddle wrote:

    I am trying to install a 32bit version of Debian alongside a 64 bit version of
    Windows;

    Dual booting felt old-hat to me as soon as hypervisors appeared letting you run windows within linux or vice-versa ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aragorn@21:1/5 to All on Wed Nov 23 01:17:25 2022
    On 22.11.2022 at 22:45, Andy Burns scribbled:

    Martin Liddle wrote:

    I am trying to install a 32bit version of Debian alongside a 64 bit
    version of Windows;

    Dual booting felt old-hat to me as soon as hypervisors appeared
    letting you run windows within linux or vice-versa ...

    You can run them side by side, even, on top of a bare-metal hypervisor
    like Xen. No host and no guests in the traditional sense, although
    one of the GNU/Linux [*] guests will then be the virtual machine from
    within which you control the other ones.


    [*] The only operating systems supported in this role are GNU/Linux,
    NetBSD and OpenIndiana (formerly OpenSolaris/Nexenta). Windows
    cannot be used in this role.

    --
    With respect,
    = Aragorn =

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve McIntyre@21:1/5 to news15@tynecomp.co.uk on Wed Nov 23 11:09:16 2022
    In article <tlj66g$3912$1@dont-email.me>,
    Martin Liddle <news15@tynecomp.co.uk> wrote:

    Thank you, that is very helpful. However I do have a good reason to run
    a 32 bit version for the time being. I have finally discovered a BIOS >setting that with secure boot off, allows me to give legacy devices
    priority over UEFI; this has allowed me to do a basic 32 bit install
    from a DVD drive with one issue; the grub installation failed. I have
    reset the BIOS back to Secure boot and Windows stills boots. How would
    I install grub in this situation (assuming that I can)?

    Your system will no doubt be using a GPT partition table now, and that
    means that GRUB won't be able to embed its second stage binary as
    normal. If so, you *can* make this work by adding a bios_grub
    partition in the right place (sectors 34 to 2047). However, depending
    on the firmware you'll struggle to make this dual-boot easily in
    future.

    As others have suggested, do an amd64 installation and work from
    there. Multi-arch may be an option on a Debian system, or
    alternatively use an i386 installation in a chroot to deal with
    settings things up. debootstrap and schroot [1] are your friends
    there.

    [1] https://wiki.debian.org/Schroot

    --
    Steve McIntyre, Cambridge, UK
    steve@einval.com https://www.einval.com/~steve/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve McIntyre@21:1/5 to mo01@posteo.de on Wed Nov 23 10:55:23 2022
    In article <tlj5hd$3l3o$6@dont-email.me>, Marco Moock <mo01@posteo.de> wrote: >Am 22.11.2022 um 16:42:27 Uhr schrieb Martin Liddle:

    In Linux I have copied the ISO to the flash drive.

    cp debian-11.5.0-i386-netinst.iso /dev/sdb

    You need to use dd to do that.

    dd if=debian-11.5.0-i386-netinst.iso of=/dev/sdb status=progress bs=4M

    While I'd also recommend dd for better performance, cp will work just
    fine here. If you're using dd, you also want to add "oflag=sync" so
    that the dd command won't finish until the data is written properly.

    --
    Steve McIntyre, Cambridge, UK
    steve@einval.com https://www.einval.com/~steve/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Martin Liddle on Wed Nov 23 13:16:20 2022
    Martin Liddle <news15@tynecomp.co.uk> wrote:
    Thanks, your assessment of the situation is similar to mine. I need to experiment and see what works. I haven't got time to do it for a few
    days as I have wasted too much time getting to the point where I
    properly understand the situation.

    Another option #3 would be to run a 32-bit VM or container. Steve has mentioned a chroot (which is a basic form of container), but a VM might use something like KVM (running a full 32-bit kernel).

    Or you could have a 32-bit world inside a container like Docker (generally designed to be throwaway after each use, with control over which state persists) or LXC/LXD (persistent, more like a VM but without the 32 bit kernel).

    Really depends on what you're trying to achieve. Docker is a good way to
    wrap up toolchains so you don't need to worry about fulfilling all the dependencies on every machine - the container is a bundle that contains everything and you can install it with a single command. Then you can use
    it to run the tools on local files, rather than having to copy files in and
    out as you might with a VM.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Theo on Sun Dec 4 18:03:51 2022
    On 22/11/2022 20:50, Theo wrote:

    2. Install a 64 bit OS. Then just install whatever 32-bit libraries are needed for your 32-bit compiler and apps. You can still run your compiler and 32-bit binaries on a 64 bit OS and they will work fine. https://wiki.debian.org/Multiarch
    https://wiki.debian.org/Multiarch/HOWTO


    Sorry for the delay in coming back to this topic but more pressing
    issues took priority. Having experimented with various options I have
    decided that the advice to use a 64 bit OS and Multiarch is the way to
    go; thanks to the several people who suggested this was the route to use.

    I now have a 64 bit Debian 11 installation with Multiarch and I have got
    the 32 bit compiler working and first test suggest it is producing code
    that runs properly. However I am now stuck because the code includes
    our own interface to mariadb. I can see that both i386 and amd64
    versions of mariadb are installed but I can't find where the header
    files (particularly mysql.h) are to be found. As I read the
    documentation the headers should be provided by libmariadb-dev which is installed. On an actual i386 install they are in /usr/include/mariadb
    but I don't know where they would be under multiarch. All suggestions
    welcome.

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Gregorie@21:1/5 to Martin Liddle on Sun Dec 4 19:00:33 2022
    On Sun, 4 Dec 2022 18:03:51 +0000, Martin Liddle wrote:

    On 22/11/2022 20:50, Theo wrote:

    2. Install a 64 bit OS. Then just install whatever 32-bit libraries
    are needed for your 32-bit compiler and apps. You can still run your
    compiler and 32-bit binaries on a 64 bit OS and they will work fine.
    https://wiki.debian.org/Multiarch
    https://wiki.debian.org/Multiarch/HOWTO


    Sorry for the delay in coming back to this topic but more pressing
    issues took priority. Having experimented with various options I have decided that the advice to use a 64 bit OS and Multiarch is the way to
    go; thanks to the several people who suggested this was the route to
    use.

    I now have a 64 bit Debian 11 installation with Multiarch and I have got
    the 32 bit compiler working and first test suggest it is producing code
    that runs properly. However I am now stuck because the code includes
    our own interface to mariadb. I can see that both i386 and amd64
    versions of mariadb are installed but I can't find where the header
    files (particularly mysql.h) are to be found. As I read the
    documentation the headers should be provided by libmariadb-dev which is installed. On an actual i386 install they are in /usr/include/mariadb
    but I don't know where they would be under multiarch. All suggestions welcome.

    'locate' works for finding files whose names are known:

    Run 'updatedb' to make sure the filename database is up to date (it should
    be run automatically every day as a cron job) and then run

    locate thefilename

    to get its full pathname.



    --

    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Martin Gregorie on Sun Dec 4 19:55:39 2022
    On 04/12/2022 19:00, Martin Gregorie wrote:

    'locate' works for finding files whose names are known:

    Run 'updatedb' to make sure the filename database is up to date (it should
    be run automatically every day as a cron job) and then run

    locate thefilename

    to get its full pathname.

    Thanks but that was the first thing I tried.

    With both a 64 bit and 32 bit of mariadb appearing in the list of
    installed packages; do I have to do something to make one or the other
    active?

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to Martin Liddle on Sun Dec 4 20:29:51 2022
    Martin Liddle <news15@tynecomp.co.uk> writes:
    I now have a 64 bit Debian 11 installation with Multiarch and I have
    got the 32 bit compiler working and first test suggest it is producing
    code that runs properly. However I am now stuck because the code
    includes our own interface to mariadb. I can see that both i386 and
    amd64 versions of mariadb are installed but I can't find where the
    header files (particularly mysql.h) are to be found. As I read the documentation the headers should be provided by libmariadb-dev which
    is installed. On an actual i386 install they are in
    /usr/include/mariadb but I don't know where they would be under
    multiarch. All suggestions welcome.

    There’s a mariadb.pc file, so you should be able to call
    pkg-config --cflags mariadb
    from your makefile to find the headers.

    --
    http://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Richard Kettlewell on Sun Dec 4 21:54:32 2022
    On 04/12/2022 20:29, Richard Kettlewell wrote:

    There’s a mariadb.pc file, so you should be able to call
    pkg-config --cflags mariadb
    from your makefile to find the headers.

    Thanks, on a 32 bit server that does indeed return the location of the
    headers. On the 64 bit server with multiarch I get an error message:
    "Package mariadb was not found in the pkg-config search path." As far
    as I can see there is no mariadb.pc file anywhere.

    Obviously something is wrong with the mariadb installation. Is the best
    fix to uninstall and try again or is there something else I could try?

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to Martin Liddle on Sun Dec 4 22:42:20 2022
    On 04/12/2022 19:55, Martin Liddle wrote:

    With both a 64 bit and 32 bit of mariadb appearing in the list of
    installed packages.

    Ah, this statement is inaccurate. I was listing the available packages
    when I thought I was looking at the installed packages.

    I did have the 64 bit version of mariadb-server and mariadb-client
    installed. I uninstalled them and tried to install the i386 version but
    was getting into a world of pain so I backed out and reinstalled the 64
    bit versions again. This time I added libmariadb-dev and now the
    pkg-config command returns a sensible result. My own code will still
    not build so I think it is time to stop for the night and have another
    look tomorrow.

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Martin Liddle on Mon Dec 5 08:49:28 2022
    Martin Liddle <news15@tynecomp.co.uk> wrote:
    On 04/12/2022 20:29, Richard Kettlewell wrote:

    There’s a mariadb.pc file, so you should be able to call
    pkg-config --cflags mariadb
    from your makefile to find the headers.

    Thanks, on a 32 bit server that does indeed return the location of the headers. On the 64 bit server with multiarch I get an error message: "Package mariadb was not found in the pkg-config search path." As far
    as I can see there is no mariadb.pc file anywhere.

    Did you install libmariadb-dev:i386 which is the 32 bit version of the
    package? According to packages.debian.org you should then find it in /usr/lib/i386-linux-gnu/pkgconfig/mariadb.pc

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Liddle@21:1/5 to All on Mon Dec 5 19:10:44 2022
    I am pleased to say that I now have this working with 64 bit Debian 11
    and using multiarch to run the 32 bit compiler. I decided that all the fiddling I had done last night had broken too many things and I did a
    fresh install using the knowledge that I had gained and it worked first
    time. Thank you to everyone who took the time to offer suggestions.

    --
    Martin Liddle,
    Staveley, Chesterfield, Derbyshire UK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)