Instruction for custom partitioning during Ubuntu install anywhare?

Bo Berglund bo.berglund at gmail.com
Sat Jan 22 11:07:12 UTC 2022


On Fri, 21 Jan 2022 23:57:14 +0100, Liam Proven <lproven at gmail.com> wrote:

>On Fri, 21 Jan 2022 at 20:37, Bo Berglund <bo.berglund at gmail.com> wrote:
>
>> This HP "BIOS" does not look anywhere like the Lenovo one I discussed here a
>> while ago, but I tried to find and set the relevant items as best I could to
>> boot to USB.
>[...]
>
>But you haven't answered my question. :-(

That is because I didn't know...
How can I find out? Maybe:

Anyway when I let the second Ubuntu install session run its course to erase the
disk and install on the now empty disk it succeeded and I have a system that
runs.
And when I check with GParted I see this (note that I have shrunk the system
partition and created a new home partition to which I copied the original data.
Then I created a mountpoint for it in /home):

/dev/nvme0n1p1       fat32   /boot/efi         512.00 MiB    boot
/dev/nvme0n1p2    extended                     465.26 GiB
  /dev/nvme0n1p5      ext4    /       system    30.00 GiB
  /dev/nvme0n1p6      ext4    /home   home     250.00 GiB

So it looks like an UEFI system, lots of such info also in the "BIOS"

>If it is a UEFI machine, or if it is set to boot UEFI first, then you
>*must* configure the hard disk UEFI style.
>
>This has bitten me before.
>
>That means:
>
>* You _must_ have an EFI System Partition (ESP)

It is there now after the second install, I guess.

>* It must be set as that type, formatted FAT32, and marked bootable.
>* Ubuntu must know where it is and that it is the ESP. You may have to
>tell it while partitioning.

Well I skiped partitioning while installing the 2nd time, did the /home move
work afterwards. Ubuntu did what it needed to do. One big all-disk partition
with Ubuntu plus the small initial fat32 partition.

But it would be good to add to my notes *how* to do it correctly, though. What I
find via Google does not mention this situation at all...

>
>If you do not have a working ESP, and you try to install the "old" way
>with GRUB in the MBR, the PC will not boot. That method doesn't work
>with UEFI.
>
>The easiest way to get a working ESP on a UEFI machine in case of
>problems is to install Windows 10 on it. :-(

As part of the first test I blew away Windows10, and now I have no way of
re-installing it neither on this nor any future system. I do not have install
media available and if I try to get it via my Windows PC it always gets to a
page where I am steered towards upgrading my existing system to Windows11...

>That is why I asked about the boot *order*. If you have both and both
>are enabled _but BIOS boot is tried first_ then the old GRUB-in-MBR
>method should work.

Right now there is only Ubuntu. But *if* I insert a bootable USB then it will
boot that so it looks like USB then SSD.

>
>But -- caveat! -- here is a bug in Ubuntu since 20.04 or so: it
>creates an ESP partition even on BIOS systems. It is not needed and it
>doesn't do anything, but it makes one anyway, and if you remove it,
>Ubuntu gives an error and won't finish installing correctly.

I think I saw during installation that it talked about installing grub on that
partition..

>I have filed a bug:
>https://discourse.ubuntu.com/t/20-10-needs-esp-on-bios-systems-existing-confirmed-unassigned-bug/21789
>
>It hasn't been fixed properly and the bug came back in 21.04. :-(
>
>If you have partitioned the disk with GPT, there is no difference
>between primary and secondary partitions any more. GPT does not have
>that distinction. But since you mentioned a partition inside an
>extended partition, I guess it is partitioned with MBR.

When I check via GParted/DeviceInformation it says:
...
Size: 465.76 GiB
Path: /dev/nvme0n1
Partition table: msdos
...

>
>If the SSD is NVMe, you _must_ use GPT, but we covered that in our
>previous thread.
>
>I think it is a model of this?
>
>https://support.hp.com/us-en/document/c06047054

Right, that is it!

>It mentions NVMe drives as an option, so I think it _must_ have UEFI.
>So the question is, which boot mode is it using -- UEFI then BIOS, or
>BIOS then UEFI?

Only way to find out, I guess, is to reboot and force it into BIOS using F10. I
will do that a bit later and take pictures of each page as backup of the
settings like they are now.

>
>The route I used on my old office PC was:
>
>* Partition with and install Win10, in a fairly small partition.
>* Dual-boot with 2+ Linux distros, allowing them to use the Windows ESP.
>
>This was before I discovered the question of firmware boot type and priority.

Not for this machine unless it crashes badly...


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list