[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: Andrei Borzenkov
Subject: Re: How to install gparted live on grub boot menu?
Date: Sun, 31 Oct 2021 12:25:39 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 31.10.2021 12:14, Bo Berglund wrote:
> 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)

nvme0n1p10 is the 10th partition, not the 9th.

> 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

You tested what? os-prober is standalone tool that does not change grub.cfg.

> /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.

Of course it does. /etc/grub.d/40_custom has nothing to do with os-prober.

After editing any file in /etc/grub.d you need to update grub.cfg by
running grub-mkconfig or some distribution specific tool that runs
grub-mkconfig. On Ubuntu it would be update-grub which just runs

grub-mkconfig -o /boot/grub/grub.cfg

> I have tried changing the partition using this:
>   set root=(hd0,9)
> But same bad result...

reply via email to

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