• Debian 12 USB install hangs on GRUB command line

    From Roger Price@21:1/5 to All on Mon Dec 16 09:50:02 2024
    I have a Dell T5820 workstation. I had already installed Debian 12 in a spare partition on a Transcend SSD dating from 2017 using a USB memory stick. I left in place the existing Windows SSD that came with the workstation. All went well
    - a very smooth install. A few weeks later the Transcent SSD failed. Kernel panic. So I bought another SSD, Kingston, and redid the installation from the same USB stick.

    I probably made two mistakes. 1) I removed the Windows SSD since I never use Windows. 2) I specified "Force UEFI = No", the default. But I did create a small FAT32 partition to be mounted on /boot/efi if one day I needed it.

    I went through the installation process, and at the end, removed the USB installation stick and rebooted. The T5820 went into a long BIOS test and then announced: "BIOS 2.38.0 Build 440.16 UEFI ROM no bootable partition found."

    So I re-inserted the USB installation stick to redo the installation. This took
    me to the GRUB command line. I typed a few commands: (I have removed all details of hd1, hd2... reported as No known filesystem detected, or Filesystem cannot be accessed)

    grub> ls -l
    Device hd0: Filesystem type ISO9660 - Label 'Debian 12.7.0 amd64 n'
    Last modification time 2024-08-31 UUID 2024-08-31-10-43-00-00
    Partition hd0,msdos2: Filesystem type fat, UUID DEB-0001
    grub> ls
    (proc) (memdisk) ... (hd0) (hd0,msdos2) (hd1) ...
    grub> ls (hd0,msdos2)/
    efi/
    grub> ls (hd0,msdos2)/efi/
    boot/ debian/
    grub> ls (hd0,msdos2)/efi/boot
    bootx64.efi grubx64.efi bootia32.efi grubia32.efi
    grub> ls (hd0,msdos2)/efi/debian
    grub.cfg
    grub> cat (hd0,msdos2)/efi/debian/grub.cfg
    search --file --set=root /.disk/id/e8185...
    set prefix-($root)/boot/grub
    source $prefix/${grub_cpu}-efi/grub.cfg

    So it looks as if hd0 is the installation USB stick.

    I don't understand why the USB stick no longer boots, since it did in the past, on this same workstation. Is there some way of persuading the USB stick to continue booting? Any hint or suggestion would be very welcome. I see complex incantations as cited below, but I don't have the depth of understanding of UEFI
    GRUB needed to adapt them to the Debian 12 USB installation stick.

    Roger

    https://community.frame.work/t/booting-from-usb-only-grub-command-line-no-menu/10605
    https://www.linuxfoundation.org/blog/blog/classic-sysadmin-how-to-rescue-a-non-booting-grub-2-on-linux

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Schmitt@21:1/5 to Roger Price on Mon Dec 16 11:50:01 2024
    Hi,

    Roger Price wrote:
    Device hd0: Filesystem type ISO9660 - Label 'Debian 12.7.0 amd64 n'
    [...]
    So it looks as if hd0 is the installation USB stick.

    Indeed (unless you have a hard disk with an ISO 9660 filesystem around
    the disk's partitions).


    I don't understand why the USB stick no longer boots, since it did in the past, on this same workstation.

    Does the USB stick yield the proper checksum when inspected on a running GNU/Linux system ?
    Assuming that the USB stick is /dev/sdc and that you got file SHA512SUMS
    from where the ISO image was offered for download:

    $ sudo /sbin/isosize -x /dev/sdc
    sector count: 323072, sector size: 2048
    $ sudo dd if=/dev/sdc count=323072 bs=2048 | sha512sum | awk '{print $1}'
    e0bd9ba03084a6fd42413b425a2d20e3731678a31fe5fb2cc84f79332129afca2ad4ec897b4224d6a833afaf28a5d938b0fe5d680983182944162c6825b135ce
    $ fgrep debian-12.7.0-amd64-netinst.iso SHA512SUMS
    e0bd9ba03084a6fd42413b425a2d20e3731678a31fe5fb2cc84f79332129afca2ad4ec897b4224d6a833afaf28a5d938b0fe5d680983182944162c6825b135ce debian-12.7.0-amd64-netinst.iso
    $ test e0bd9ba03084a6fd42413b425a2d20e3731678a31fe5fb2cc84f79332129afca2ad4ec897b4224d6a833afaf28a5d938b0fe5d680983182944162c6825b135ce =
    e0bd9ba03084a6fd42413b425a2d20e3731678a31fe5fb2cc84f79332129afca2ad4ec897b4224d6a833afaf28a5d938b0fe5d680983182944162c6825b135ce && echo IT MATCHES
    IT MATCHES
    $

    If the checksums look different or if the final test command does not
    yield "IT MATCHES", then some change has happened to the ISO on the USB
    stick. (You may check file debian-12.7.0-amd64-netinst.iso the same way
    as /dev/sdc to check whether already the ISO image was altered.)


    grub> cat (hd0,msdos2)/efi/debian/grub.cfg
    search --file --set=root /.disk/id/e8185...
    set prefix-($root)/boot/grub

    I see "=" instead of "-" in this file when the partition is mounted:

    set prefix=($root)/boot/grub

    Better check whether you see the same when inspecting the file by GRUB.


    source $prefix/${grub_cpu}-efi/grub.cfg

    Does GRUB find the files:

    (hd0)/boot/grub/x86_64-efi/grub.cfg
    (hd0)/boot/grub/grub.cfg

    I assume /${grub_cpu} is "x86_64". A 32-bit EFI might want the other
    file (hd0)/boot/grub/i386-efi/grub.cfg. Both are supposed to just contain
    the instruction

    source /boot/grub/grub.cfg

    The file (hd0)/boot/grub/grub.cfg is supposed to contain a typical GRUB configuration with 162 lines:

    if [ x$feature_default_font_path = xy ] ; then
    ...
    menuentry --hotkey=g 'Graphical install' {
    set background_color=black
    linux /install.amd/vmlinuz vga=788 --- quiet
    initrd /install.amd/gtk/initrd.gz
    }
    ...
    menuentry --hotkey=s 'Install with speech synthesis' {
    set background_color=black
    linux /install.amd/vmlinuz vga=788 speakup.synth=soft --- quiet
    initrd /install.amd/gtk/initrd.gz
    }

    GRUB is supposed to show a graphical menu after having read this file.

    If it does not find the file, then you might get progress by executing
    the commands of your favorite menu item in the shell. E.g with
    "Graphical install":

    grub> set background_color=black
    grub> linux /install.amd/vmlinuz vga=788 --- quiet
    grub> initrd /install.amd/gtk/initrd.gz

    and to start the action:

    grub> boot

    But there might be more obstacles, given that the menu does not show up.


    Have a nice day :)

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Roger Price on Mon Dec 16 18:40:01 2024
    On 12/16/24 00:45, Roger Price wrote:
    I have a Dell T5820 workstation.  I had already installed Debian 12 in a spare partition on a Transcend SSD dating from 2017 using a USB memory stick.  I left in place the existing Windows SSD that came with the workstation.  All went well - a very smooth install.  A few weeks later
    the Transcent SSD failed.  Kernel panic.  So I bought another SSD, Kingston, and redid the installation from the same USB stick.

    I probably made two mistakes. 1) I removed the Windows SSD since I never
    use Windows.  2) I specified "Force UEFI = No", the default.  But I did create a small FAT32 partition to be mounted on /boot/efi if one day I
    needed it.

    I went through the installation process, and at the end, removed the USB installation stick and rebooted.  The T5820 went into a long BIOS test
    and then announced: "BIOS 2.38.0 Build 440.16 UEFI ROM no bootable
    partition found."


    Please use Debian Stable or Debian Old Stable ISO.


    Disconnect all drives except the drive onto which you want to install
    Debian. Boot into Setup. Reset settings to factory defaults. Save.
    Exit. Power down during POST. Insert d-i USB stick. Boot d-i (hot
    keys and/or Setup adjustments may be required). Start rescue shell.
    Zero or secure erase the SSD. Power down. Boot d-i. Install Debian.
    Keep it KISS and OOTB. If d-i asks to put a bootloader onto the SSD,
    then provide the necessary information. After install, restart and
    power down during POST. Remove USB stick. Boot into Setup. Verify
    and/or create boot entry for Debian. Save. Exit. System should boot
    Debian. If not, trouble-shoot Setup boot settings.


    Document every message and prompt displayed, and every command, choice,
    or setting you enter. Use a camera or phone if you do not want to type.


    If you get stuck, reply with ISO name and relevant details.


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to David Christensen on Mon Dec 16 20:00:01 2024
    On Mon, 16 Dec 2024 09:39:22 -0800
    David Christensen <dpchrist@holgerdanske.com> wrote:

    On 12/16/24 00:45, Roger Price wrote:
    I have a Dell T5820 workstation.  I had already installed Debian 12
    in a spare partition on a Transcend SSD dating from 2017 using a
    USB memory stick.  I left in place the existing Windows SSD that
    came with the workstation.  All went well - a very smooth install.
    A few weeks later the Transcent SSD failed.  Kernel panic.  So I
    bought another SSD, Kingston, and redid the installation from the
    same USB stick.

    I probably made two mistakes. 1) I removed the Windows SSD since I
    never use Windows.  2) I specified "Force UEFI = No", the default.
    But I did create a small FAT32 partition to be mounted on /boot/efi
    if one day I needed it.

    I went through the installation process, and at the end, removed
    the USB installation stick and rebooted.  The T5820 went into a
    long BIOS test and then announced: "BIOS 2.38.0 Build 440.16 UEFI
    ROM no bootable partition found."


    Please use Debian Stable or Debian Old Stable ISO.


    Disconnect all drives except the drive onto which you want to install Debian. Boot into Setup. Reset settings to factory defaults. Save.
    Exit. Power down during POST. Insert d-i USB stick. Boot d-i (hot
    keys and/or Setup adjustments may be required). Start rescue shell.
    Zero or secure erase the SSD. Power down. Boot d-i. Install
    Debian. Keep it KISS and OOTB. If d-i asks to put a bootloader onto
    the SSD, then provide the necessary information. After install,
    restart and power down during POST. Remove USB stick. Boot into
    Setup. Verify and/or create boot entry for Debian. Save. Exit.
    System should boot Debian. If not, trouble-shoot Setup boot settings.


    Document every message and prompt displayed, and every command,
    choice, or setting you enter. Use a camera or phone if you do not
    want to type.


    If you get stuck, reply with ISO name and relevant details.


    I would add that many modern computers are almost hardwired for
    Windows. I have a netbook that used to dual-boot with Windows 10. The
    built-in drive was 32GB, and eventually Windows would no longer
    upgrade, as there wasn't enough space on the C: drive. It wouldn't do a
    factory reset or use the media creator to get an new image, because
    there wasn't enough room on the C: drive, even though there was at
    least 20GB spare on the D: drive.

    So I gave up, and just installed bookworm clean. No bootable OS found.
    I'll cut it short: it wouldn't boot because a /boot/efi/EFI directory
    did not contain a Microsoft directory containing bootmgfw.efi.
    Previously, it had been happy to boot from the Linux EFI file, but
    obviously only because this wretched Windows setup was there. Just to
    be on the safe side, I copied shim64.efi and renamed it bootmgfw.efi,
    all in a directory named Microsoft. No problem now.

    Certainly if the computer firmware is expecting UEFI boot software, the /boot/efi partition must be occupied i.e. the installer must have
    recognised its environment and started in UEFI mode (the splash screen
    will say so). It may be possible to force the firmware to legacy mode,
    but my netbook doesn't have this option.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Joe on Mon Dec 16 20:40:01 2024
    On 12/16/24 10:50, Joe wrote:
    I would add that many modern computers are almost hardwired for
    Windows. ...
    So I gave up, and just installed bookworm clean. No bootable OS found.
    I'll cut it short: it wouldn't boot because a /boot/efi/EFI directory
    did not contain a Microsoft directory containing bootmgfw.efi.
    Previously, it had been happy to boot from the Linux EFI file, but
    obviously only because this wretched Windows setup was there. Just to
    be on the safe side, I copied shim64.efi and renamed it bootmgfw.efi,
    all in a directory named Microsoft. No problem now.


    That is a clever work-around. And, good reason to take an archival
    image of a Windows machine the first time you touch it.


    I use BIOS/MBR or UEFI/legacy when available, but the newest Windows
    machines are UEFI/GPT only and I have limited experience. Hopefully,
    the OP will not need such tricks.


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Joe on Tue Dec 17 00:00:01 2024
    On Mon, 16 Dec 2024 18:50:02 +0000
    Joe <joe@jretrading.com> wrote:

    So I gave up, and just installed bookworm clean. No bootable OS found.
    I'll cut it short: it wouldn't boot because a /boot/efi/EFI directory
    did not contain a Microsoft directory containing bootmgfw.efi.
    Previously, it had been happy to boot from the Linux EFI file, but
    obviously only because this wretched Windows setup was there. Just to
    be on the safe side, I copied shim64.efi and renamed it bootmgfw.efi,
    all in a directory named Microsoft. No problem now.

    Certainly if the computer firmware is expecting UEFI boot software,
    the /boot/efi partition must be occupied i.e. the installer must have recognised its environment and started in UEFI mode (the splash screen
    will say so). It may be possible to force the firmware to legacy mode,
    but my netbook doesn't have this option.

    Interesting.

    I have a brand new computer which has never in its life seen hide nor
    hair of any Microsoft product. I ordered it with no OS, and verified
    that it came that way before I did any installation. I then installed
    from "Debian GNU/Linux 12.6.0 "Bookworm" - Official amd64 NETINST with
    firmware 20240629-10:18". It does not have bootmgfw.efi on it. It does, however, have shimx64.efi and several other files, all in /boot/efi/EFI/debian/.

    In the debian installer's disk partitioner, there is an option to lay
    down a file system. Within that, there are several options: ext2, swap,
    etc.. One of them is for an EFI file system, separate from various FAT
    options. That is the option I used to manually create my EFI partition.

    Let that be a lesson: look for and use that EFI option!

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Roger Price on Tue Dec 17 00:00:01 2024
    On Mon, 16 Dec 2024 09:45:59 +0100 (CET)
    Roger Price <debian@rogerprice.org> wrote:

    But I did create a
    small FAT32 partition to be mounted on /boot/efi if one day I needed
    it.

    Which option in the installer's partitioner did you use, one of the FAT options, or the EFI one? The latter will create a partition with the appropriate file system, and install suitable EFI files for you.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Price@21:1/5 to Thomas Schmitt on Tue Dec 17 10:50:01 2024
    On Mon, 16 Dec 2024, Thomas Schmitt wrote:

    Does the USB stick yield the proper checksum when inspected on a running GNU/Linux system ?

    Will check.

    grub> cat (hd0,msdos2)/efi/debian/grub.cfg
    set prefix-($root)/boot/grub

    I see "=" instead of "-" in this file when the partition is mounted:
    Better check whether you see the same when inspecting the file by GRUB.

    That was my typo when I retyped the GRUB output.

    source $prefix/${grub_cpu}-efi/grub.cfg

    Does GRUB find the files:
    (hd0)/boot/grub/x86_64-efi/grub.cfg
    YES
    (hd0)/boot/grub/grub.cfg
    YES

    I assume /${grub_cpu} is "x86_64". A 32-bit EFI might want the other
    file (hd0)/boot/grub/i386-efi/grub.cfg. Both are supposed to just contain
    the instruction
    source /boot/grub/grub.cfg

    grub> cat (hd0)/boot/grub/x86_64-efi/grub.cfg
    source /boot/grub/grub.cfg

    The file (hd0)/boot/grub/grub.cfg is supposed to contain a typical GRUB configuration with 162 lines:

    if [ x$feature_default_font_path = xy ] ; then
    ...
    menuentry --hotkey=g 'Graphical install' {
    set background_color=black
    linux /install.amd/vmlinuz vga=788 --- quiet
    initrd /install.amd/gtk/initrd.gz
    }

    grub> cat (hd0)/boot/grub/grub.cfg

    shows many lines in that style.

    GRUB is supposed to show a graphical menu after having read this file.

    If it does not find the file, then you might get progress by executing
    the commands of your favorite menu item in the shell. E.g with
    "Graphical install":

    grub> set background_color=black
    grub> linux /install.amd/vmlinuz vga=788 --- quiet

    I got the message error: file '/install.amd/vmlinux' not found

    On Mon, 16 Dec 2024, Charles Curley wrote:

    But I did create a small FAT32 partition to be mounted on /boot/efi

    Which option in the installer's partitioner did you use, one of the FAT options, or the EFI one? The latter will create a partition with the appropriate file system, and install suitable EFI files for you.

    I missed the EFI one, which is the one I obviously need.

    Roger

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Schmitt@21:1/5 to Roger Price on Tue Dec 17 12:00:01 2024
    Hi,

    i proposed for booting from the now reluctant USB stick:
    grub> linux /install.amd/vmlinuz vga=788 --- quiet
    grub> initrd /install.amd/gtk/initrd.gz
    grub> boot

    Roger Price wrote:
    I got the message error: file '/install.amd/vmlinux' not found

    Hm. The internet shows such starts with first command "set root".
    https://superuser.com/questions/1237684/how-to-boot-from-grub-shell
    https://askubuntu.com/questions/883992/stuck-at-grub-command-line

    So perhaps:

    grub> set root=(hd0)
    grub> linux /install.amd/vmlinuz vga=788 --- quiet
    grub> initrd /install.amd/gtk/initrd.gz
    grub> boot

    We could need some more experienced GRUB operator for finding the part
    of the boot process wich fails.

    It looks like GRUB is found and started. But then somethig goes wrong.
    For now we know that the various grub.cfg are visible in the stick's
    EFI partition (hd0,msdos2) and in the stick's ISO filesystem (hd0).
    If the kernel can be started and does not abort to fall back to GRUB
    then i am out of guesses about how GRUB fails to find and execute the
    grub.cfg files.


    Have a nice day :)

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Price@21:1/5 to Thomas Schmitt on Tue Dec 17 14:20:01 2024
    On Tue, 17 Dec 2024, Thomas Schmitt wrote:

    Roger Price wrote:
    I got the message error: file '/install.amd/vmlinux' not found
    So perhaps:

    grub> set root=(hd0)
    grub> linux /install.amd/vmlinuz vga=788 --- quiet
    grub> initrd /install.amd/gtk/initrd.gz
    grub> boot

    The "linux" command still produces the "file not found" error message.

    It looks like GRUB is found and started. But then somethig goes wrong.

    To check for bad USB stick, I downloaded debian-12.8.0-amd64-DVD-1.iso and built
    a new 12.8 USB installation stick using command

    dd if=debian-12.8.0-and64-DVD-1.iso of=/dev/sdj1 bs=4M && sync

    I tried booting this and got to a GRUB command line. This time ls -l reports that (hd0) has "no known filesystem detected", although (hd0,msdos1) reports "File system type ISO9660. Label Debian 12.8.0 amd64 1".

    It seems to me that the GRUB command line comes from the T5820 BIOS and not from
    the USB stick. To test this I restarted and hit F2 to get to the BIOS Setup. This reports Boot sequence: 1) debian, 2) UEFI SMI USB DISK 110 (Windows Boot manager is excluded). The boot option is UEFI. It's the mention of "debian" by
    the BIOS itself which says to me that the T5820 contains a GRUB.

    Roger

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Schmitt@21:1/5 to Roger Price on Tue Dec 17 15:40:01 2024
    Hi,

    Roger Price wrote:
    To check for bad USB stick, I downloaded debian-12.8.0-amd64-DVD-1.iso and built a new 12.8 USB installation stick using command
    dd if=debian-12.8.0-and64-DVD-1.iso of=/dev/sdj1 bs=4M && sync

    The "1" in "/dev/sdj1" is surplus. Normally, the ISO image has to be
    copied to the base device "/dev/sdj", so that its MBR and partition table
    get into effect.
    The only exception from this rule would be if partition 1 starts at
    block 0. This is the case with Debian installation ISOs. But partition 1
    of a netinst ISO is too small to take a DVD ISO.

    Is this the same USB stick as the one with Debian 12.7.0 netinst ?
    If so, did you run a partition editor to create a new partition 1 ?


    I tried booting this and got to a GRUB command line. This time ls -l
    reports that (hd0) has "no known filesystem detected", although (hd0,msdos1) reports "File system type ISO9660. Label Debian 12.8.0 amd64 1".

    This is probably a consequence of dd output file /dev/sdj1. Other than
    with the properly copied netinst ISO, this partition 1 is recognizable
    to GRUB.
    Probably because its not an MBR partition of type 0x00 or because its
    start block is not 0.

    Since you don't mention (hd0,msdos2), i guess that the EFI partition
    inside the DVD ISO image does not become visible to GRUB. Probably it is
    not visible to the BIOS either.


    It seems to me that the GRUB command line comes from the T5820 BIOS and not from the USB stick. To test this I restarted and hit F2 to get to the BIOS Setup. This reports Boot sequence: 1) debian, 2) UEFI SMI USB DISK 110 (Windows Boot manager is excluded). The boot option is UEFI. It's the mention of "debian" by the BIOS itself which says to me that the T5820 contains a GRUB.

    Obviously the BIOS found an installation of GRUB. But this GRUB found no grub.cfg which would lead to more than a GRUB shell prompt.
    It is not so obvious whether the BIOS talks of present devices or of
    bootable devices which it has seen recently.

    But as there is some GRUB running, it might well stem from the disk to
    which you have installed Debian. The question remains why this GRUB does
    not find its own initial grub.cfg. Do you see an EFI partition on the
    disk to which you installed Debian ?


    If you want to test the USB stick, then copy the ISO to its base device
    file. Further make sure in the BIOS that this USB stick gets booted and
    not one of the other boot entries.


    Have a nice day :)

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Thomas Schmitt on Tue Dec 17 16:40:01 2024
    On Tue, Dec 17, 2024 at 03:32:03PM +0100, Thomas Schmitt wrote:
    Roger Price wrote:
    To check for bad USB stick, I downloaded debian-12.8.0-amd64-DVD-1.iso and >> built a new 12.8 USB installation stick using command
    dd if=debian-12.8.0-and64-DVD-1.iso of=/dev/sdj1 bs=4M && sync

    The "1" in "/dev/sdj1" is surplus. Normally, the ISO image has to be
    copied to the base device "/dev/sdj", so that its MBR and partition table
    get into effect.

    It's not surplus, it's wrong. (Surplus implies that it is unnecessary
    but harmless, but in reality it will prevent the installer from working
    as expected.)

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