Author Topic: More Dell Laptop Booting Woes - SOLVED  (Read 2712 times)

More Dell Laptop Booting Woes - SOLVED
« on: 23 March, 2023, 06:09:41 pm »
I previously posted about installing Debian on a refurbished Dell laptop, and the boot problems this was giving, which just resolved and I didn't know why, so didn't learn anything.

I have now (hopefully) installed Debian 11 on a different Dell laptop (Latitude 5591), but can't boot.

I believe this might be because the installer hasn't created an EFI Boot Loader partition, and I've used the USB stick with the installer program on it to access Rescue Mode, giving me a number of options:

I'm being asked to

Code: [Select]
"Enter a device which you wish to us as your root file system

[...]

Device to use as root file system:

/dev/nvme0n1p1
/dev/nvme0n1p2
/dev/nvme0n1p5
/dev/sda1
/dev/sda2
Assemble RAID array
Do not use a root file system"

My bootable stick is inserted into the machine, but I need to identify it from this list.  I thought sda would be referring to the SSD on this machine, but that didn't come up as an option when installing, so have I perhaps somehow formatted the memory stick rather than the drive??  But I've just re-run the install, so the install data on the stick must still be OK.

What should I do next?  (It was all so much easier with old laptops - these new ones are defeating me!).
 

Re: More Dell Laptop Booting Woes
« Reply #1 on: 23 March, 2023, 06:21:38 pm »
Have found this, which might be useful to work through when I'm not so tired!

Re: More Dell Laptop Booting Woes
« Reply #2 on: 23 March, 2023, 06:59:55 pm »
There is no folder /sys/firmware/efi

The command modprobe efivars produces:

Code: [Select]
modprobe: FATAL: Module efivars not found in directory /lib/modules/5.10.0-20-amd64

Re: More Dell Laptop Booting Woes
« Reply #3 on: 23 March, 2023, 08:54:23 pm »
Redoing the installation and pausing at the partitioning section.

This is what is displayed and prompting to write changes:

/dev/nvme0n1 - 512.1 GB PC400 NVMe SK hynix 512GB
       #1  primary  511.1 GB    F   ext4   /
       #2  logical        1.0 GB    F   swap  swap
SCS14  (0,0,0) (sda) - 61.9 GB  General UDisk


I presume nvme0n1 is the Solid State Drive (SSD), but why is is not labelled as sda?

What is labelled as sda is the bootable memory stick 64GB

Does this all look OK so far?

Re: More Dell Laptop Booting Woes
« Reply #4 on: 23 March, 2023, 10:26:03 pm »
Most older computers can boot in two different modes EFI and non-EFI. When you booted to install were there two options for the USB stick? If so then one is EFI and the other is non-EFI, often labelled "MBR" or "legacy". If you boot the USB installer in non-EFI mode then it will make a non-EFI install and attempt to make the new installation boot via the non-EFI mode as well. It appears that this is what has happened.

The installation has probably used the whole disk for the non-EFI install, if you want to convert to EFI you will need to resize a filesystem, then resize a partition, then create the EFI partition. It will probably be simpler to reinstall while making sure that you boot the installation USB via EFI.

I don't know if you can make the non-EFI install work, you may need to change a BIOS setting to enable non-EFI boot from NVMe. It's possible the machine does not even support it, allowing non-EFI boot only from USB.

Just seen your latest post, yes you are booting the USB in non-EFI mode.

Re: More Dell Laptop Booting Woes
« Reply #5 on: 23 March, 2023, 10:38:47 pm »
Thinking a bit more, you typically connot convert an install from MBR to EFI because you need the disk partition table to be GPT rather than MBR. While it is possible to convert, it's a non-trivial step. Reinstalling, making sure you boot the USB in EFI-mode, is probably the best bet.

Re: More Dell Laptop Booting Woes
« Reply #6 on: 23 March, 2023, 11:13:40 pm »
Yes, /dev/nvme is your internal disk. It's not /dev/sd because it's not a SATA disk, it's an NVMe disk.

Re: More Dell Laptop Booting Woes
« Reply #7 on: 24 March, 2023, 08:09:58 am »
Thanks, Philip.

I think I had to set the boot settings to 'Legacy' to get the USB stick to work. 

Perhaps I should go back to the USB stick and see if it is possible to re-create it to accept booting under EFI?

I also thought that the rEFInd Boot Manager might be useful, and now wondering whether it might be able to change the usb stick to accept EFI mode.

Re: More Dell Laptop Booting Woes
« Reply #8 on: 24 March, 2023, 08:15:14 am »
Interesting stuff from the same author on Managing EFI Boot Loaders for Linux, but I'd appreciate some guidance on its contents from someone more knowledgeable.

Is it a sensible option to consider making the USB stick accept booting under EFI?  If so, how?

Re: More Dell Laptop Booting Woes
« Reply #9 on: 24 March, 2023, 10:57:48 am »
The Debian install image you are using is already capable of booting both in UEFI and non-UEFI mode, the decision is made by the laptop and you. When you select the boot device you should see a list if options, some will look like disks, say:

  HDA: description of internal disk
  SDA: description of thumbdrive
  PCI: LAN

those typically correspond to the legacy MBR options. You should also see an option such as

  debian

which is the UEFI option and that's the one you want.

Re: More Dell Laptop Booting Woes
« Reply #10 on: 24 March, 2023, 11:09:22 am »
The reason it's so messy is that Debian have no control at this stage of boot, it's the laptop's internal firmware that determines what shows up in the boot list. It may clearly distinguish between MBR and UEFI options, or it may simply list them all. My current Lenovo shows MBR options as disk descriptions and UEFI options via short names such as  "debian" (a name it picks up from the executable in the UEFI partition), but I do recall an older machine that simply had two different descriptions of the USB drive.

Debian could make images that only boot via UEFI, then the user would not be able to pick the wrong item, but that would mean images don't install on older machines.

Re: More Dell Laptop Booting Woes
« Reply #11 on: 24 March, 2023, 05:41:40 pm »
The Debian install image you are using is already capable of booting both in UEFI and non-UEFI mode, the decision is made by the laptop and you. When you select the boot device you should see a list if options, some will look like disks, say:

  HDA: description of internal disk
  SDA: description of thumbdrive
  PCI: LAN

those typically correspond to the legacy MBR options. You should also see an option such as

  debian

which is the UEFI option and that's the one you want.

Thanks again, Philip.

I think I need to get clearer on what you’re asking here.  It’s not clear quite which stage of the whole procedure we’re referring to here.

1.  When I insert the USB installation stick into the laptop, nothing happens unless I have previously set the basic boot option to ‘Legacy Boot’ and set the boot sequence to USB media or whatever the USB option is called.  If the option is set to UEFI, the stick will not start.  Once I have set the boot option to ‘Legacy Boot’, the installation starts and completes, including the installation of the GRUB2 boot loader in the final phase.

2.  Once installation is complete, and I remove the USB stick and reboot the laptop, nothing happens first, and then a very basic machine check runs briefly before the laptop tells me it cannot find a drive (or equivalent message).  We don’t get to a GRUB2 boot screen with any options, it just won’t start.

So my question is really whether I need to somehow re-create the USB stick so that it WILL boot under EFI, thereby perhaps creating an installation on the laptop’s SSD that WILL boot properly

or

whether I need to tinker with the existing installation on the laptop’s SSD with a utility like parted to create an appropriate partition allowing for EFI booting (GPT?)

Re: More Dell Laptop Booting Woes
« Reply #12 on: 24 March, 2023, 07:07:51 pm »
The Debian images you download support both UEFI and MBR at step 1. Which image are you using?

In your case step 1 is going wrong. You need to persuade the laptop to see the USB stick using UEFI when it first boots, before you install to the hard disk. There are a various BIOS settings that can interfere, e.g. secure boot, BIOS RAID, SATA mode, boot order, etc. Getting this to work is the best way forward, but if the hardware won't cooperate then you are stuck with MBR.

Using MBR boot in step 1 means the Debian installer will attempt to make the hard disk boot using MBR as well. It will not create a UEFI partition, it will not install the UEFI boot loaders, it will attempt to install an MBR grub boot loader instead.

I've not used MBR for a few years, and I've never used MBR on NVMe, so I cannot say for sure what you need to do to make it work. Something like this to install MBR grub:

  grub-install /dev/nvme0n1

If you run

  fdisk -l /dev/nvme0n1

it will list the partitions. You might also be able to install grub on the root partition, something like:

  grub-install /dev/nvme0n1p1

You might also need to use fdisk to mark the root partition as bootable. I haven't had to use MBR for years, so my memory is a bit hazy.

Re: More Dell Laptop Booting Woes
« Reply #13 on: 24 March, 2023, 09:57:49 pm »
I don't seem to get any choice about different ISO images.

Here's a screenshot of the page, which obviously displays differently depending on which machine you download it from, hence the screenshot rather than the link.

Maybe I'm going to have to tinker around with fdisk.

I'll have to come back to this later in the weekend, but thanks for all your help so far!


Feanor

  • It's mostly downhill from here.
Re: More Dell Laptop Booting Woes
« Reply #14 on: 24 March, 2023, 10:26:47 pm »
No, that's right.
The ISO you have will boot on both UEFI and MBR mode.
The problem is not with your boot disk, it's fine.

The problem is getting your laptop to do a UEFI boot and recognise the USB drive in that boot mode.
As has been said, there are other BIOS options which may interfere with that.

If it *just won't* then you might need to leave the laptop in MBR mode, then let it install in legacy MBR mode.
Then you need to forget about all the UEFI stuffs.



Re: More Dell Laptop Booting Woes
« Reply #15 on: 24 March, 2023, 10:59:55 pm »
Does the BIOS show a version number? It's possible that a more recent BIOS will behave differently.

https://www.dell.com/support/home/en-uk/product-support/product/latitude-15-5591-laptop/drivers
https://www.dell.com/support/home/en-uk/drivers/driversdetails?driverid=m9cwd&oscode=wt64a&productcode=latitude-15-5591-laptop

You can install the new BIOS at boot by pressing f12.

Re: More Dell Laptop Booting Woes
« Reply #16 on: 24 March, 2023, 11:20:42 pm »
I suppose one possibility is the the BIOS refuses to use UEFI because the internal NVMe disk has an MBR partition table. The BIOS might be trying to "help" by preventing you mistakenly booting into UEFI mode.

If that is the case you could:

- boot the Debian rescue disk
- get a shell and use gdisk or fdisk to delete all the partitions, delete the partition table, create a new GPT partition table, write the result to disk
- reboot

Once the NVMe has a GPT partition table the BIOS might stop "helping" and allow you to boot in UEFI. That's assuming the BIOS is "helping" in this way.

[edited to remove duplicate]

Feanor

  • It's mostly downhill from here.
Re: More Dell Laptop Booting Woes
« Reply #17 on: 25 March, 2023, 11:35:21 am »
Hmm, this is triggering a memory of something similar (but not exactly the same)...

When I went to install "ubuntu-22.04-desktop-amd64.iso" from a USB stick (created by Rufus) onto an old Dell for junior a year or so back, I ran into some issues with the installer.

It would boot from USB just fine, but when it got to the screen where you select which drive to install to, it could not see any drives.
It turned out it was refusing to offer up the nVME drive because there was the remnants of some old RAID config on it.
I needed to blow away all existing partitioning on the drive do it was truly bare metal before being offered the drive as a destination.
I did that by allowing the USB to boot into 'live' mode ( ie running directly off the USB, not installed anywhere) and using disk partitioning tools from there.
I did not need to manually create any partitioning, it was happy to do that itself on the bare metal.

So yes, I think there may be value in totally removing any existing partitioning on the drive, because that may change what options become available once you get it to boot.

Re: More Dell Laptop Booting Woes - SOLVED
« Reply #18 on: 25 March, 2023, 07:43:55 pm »
Progress!

The issue has been resolved!  Encouraged by your thoughts and ideas, I stumbled across did some assiduous googling and found a help article on the Dell site , relating to BIOS settings, which I worked through.

First, I re-selected UEFI as the boot option, thereby unselecting 'Legacy Boot Options'.

Dell's first suggestion - to set the Fastboot mode to 'Thorough' under 'POST Behaviour' - was already selected.

The next suggestion, to select, under 'System Configuration', 'USB/Thunderbolt Configuration' and then select 'Enable Thunderbolt Boot Support' seems to have been the decisive move!

The third suggestion, under 'General' and 'Advanced Boot Configuration', to select 'Enable Legacy Option ROMs' was already selected; the other option they mentioned, 'Enable UEFI Network Stack' was not available under this laptop model/BIOS version.

Having made these changes I re-ran the installation from scratch, and could see that the partitioning had been done differently, including an ESP partition, and after installation the system presented a new GRUBv2 options screen, and did the normal countdown to the startup - all normal.

Many thanks for your persistence and support, Philip and Feanor! :thumbsup: