D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Debian 9 reinstall. UEFI stuckness

 

On 29/06/17 17:13, M. J. Everitt wrote:
> On 29/06/17 17:11, Adrian Midgley wrote:
>> Not a new machine, but I did an upgrade from Jessie to Stretch,
>> followed by a new system drive and new netinstall to that.
>>
>> It won't so far make itself bootable.
>>
>> The first time round I seem to have said yes to UEFI, which in
>> retrospect probably wasn't ideal, now I don't get an option to boot
>> via grub.
>>
>> Nuisance.
>> -- 
>> A Midgley
>>
>>
> You -can- use grub2 with UEFI, but you need the right partition setup
> for UEFI ... I've always plumped for Ye Olde BIOS
> legacy-whatever-is-necessary so far, but I'm sure the time will
> (eventually) come when I have to cross that bridge ..
> 
> Maybe The Apple can stick an oar in here .. ?


I have been invoked...

Do you actually get to the emergency grub rescue prompt or does the
system entirely fail to boot? You can actually boot the incomplete
system and repair the grub configuration from the rescue prompt if you
know the exact arcane utterances.

First things to check are your PC's firmware settings to see if you're
booting in UEFI or BIOS mode on the hardware: pick your poison and stick
with it. It sounds like the computer is preferring UEFI as it and your
Stretch install medium both support UEFI and wisely default to it. Make
sure optional Secure Boot is disabled though.

The culprit will most likely be in the details of your disk structure,
which Stretch should have automatically taken care of for you but
apparently has not (there have been some bugs with the Stretch UEFI
implementation but I'm presuming you're using a fresh netinstall image).
Technically for full UEFI support the disk should be GPT format, 4K
sectors for SSD optimisation if appropriate and should have a minimum of
two partitions: one bootable FAT32 EFI system partition of 200-1024Mb
and one or more standard Linux partitions of any type/filesystem for the
rest of the system. The EFI partition must be mounted or bind-mounted to
/boot for Grub to work automatically. Debian should have done all of
this for you but it most likely has inherited an old MBR type layout
disk and didn't correctly re-initialize it.

Your best bet is probably to boot a gparted live ISO or any other
installer/live Linux system you're comfortable with to examine the
target disk and prepare it manually, specifically wiping it and setting
it up as GPT and not MBR layout. Parted and cfdisk both handle this
perfectly, don't be tempted to use fdisk as it doesn't always implement
GPT correctly. Then let Debian reinstall itself as normal and you should
be fine the second time around.

Alternatively manually disable everything UEFI related in the PC
firmware and force BIOS style boot and installation all the way through,
sticking with MBR disklabels. This is "cheating" though especially as
the Debian team put a lot of effort in to make sure that Stetch was
their first proper release with a full UEFI implemention integrated. And
it is 2017 after all :/

Cheers

Report back if things don't go as planned.
-- 
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq