[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to install gparted live on grub boot menu?

From: Bo Berglund
Subject: Re: How to install gparted live on grub boot menu?
Date: Sun, 31 Oct 2021 10:14:33 +0100

On Sat, 30 Oct 2021 14:54:18 +0200, "Bo Berglund"
<> wrote:

>I have a PC with these operating systems:
>Windows 10
>Ubuntu 20.04.3 Desktop
>Ubuntu 20.04.2 Server
>This is an EFI installation.
>The boot menu was installed on the PC when I installed Ubuntu 20.04.3 Desktop 
>in dual boot mode.
>Then I also copied over my server to this disk using GParted on Ubuntu Desktop.
>And I used update-grub on the Desktop to get the server on to the boot menu.
>So this works OK now.
But I also want to put the GParted Live on my hard disk as a boot menu option
and this has failed so far...

GParted has published a method to put the files from the ISO (or zip actually)
into a disk partition and then add it to the grub boot menu:

But when I try to follow this I get into trouble because the partition names on
my computer do not follow the description. It assumes my new partition
containing the GParted files is located at /dev/sda4 and they use the following
syntax in the /etc/grub.d/40_custom file:

set root=(hd0,4)

Where the hd0 means the first hard disk and the 4 means the 4th partition.
My PC only contains one disk but it holds partitions with names like this for
the partition holding GParted: /dev/nvme0n1p10
And since /dev/nvme0n1p4 is placed at the end of the disk the GParted partition
is actually the 9th from the start of he disk.
So I set the line above to:

set root=(hd0,9)

I edited the /etc/grub.d/40_custom file and added the following to the end (5
lines, the newsreader wraps long lines):

menuentry "GParted live" {
  set root=(hd0,9)
  linux /live-hd/vmlinuz boot=live config union=overlay username=user components
noswap noeject vga=788 ip= net.ifnames=0 live-media-path=/live-hd
bootfrom=/dev/nvme0n1p10 toram=filesystem.squashfs
  initrd /live-hd/initrd.img

Then I tested with:
sudo os-prober
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/nvme0n1p6:Ubuntu 20.04.3 LTS (20.04):Ubuntu:linux

So it only finds Windows and the other Ubuntu server installation.

I have tried changing the partition using this:
  set root=(hd0,9)

But same bad result...

Bo Berglund
Developer in Sweden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]