You are not logged in.

#1 2019-03-19 18:50:43

gunjah292
Member
From: Hamburg
Registered: 2011-05-05
Posts: 186

[SOLVED] How can I boot GParted from the hard disk on an EFI system?

I have tried to add GParted Live to Grub using this guide https://gparted.org/livehd.php

Unfortunately it doesn't work, since I am on an EFI system. Should I just add the iso to the boot partition?

Last edited by gunjah292 (2019-03-20 13:38:39)


KDE Plasma, ThinkPad X380 Yoga, Intel Core i7-8550U, Intel UHD Graphics 620, 512GB PCIe-NVMe SSD (OPAL 2.0), 16GB PC4-19200 (2400 MHz)

Offline

#2 2019-03-19 19:33:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

There are several methods listed in that guide, please post your actual menuentry.

That guide suggests using set root=(hdx,y) but the device names are not persistent, the ArchWiki recommends UUIDs instead:

https://wiki.archlinux.org/index.php/Mu … uring_GRUB

Btw that page used to have a gparted example as well: https://wiki.archlinux.org/index.php?ti … arted_Live

gunjah292 wrote:

it doesn't work, since I am on an EFI system

It should be possible to boot a UEFI capable ISO image from anywhere with GRUB.


Jin, Jîyan, Azadî

Offline

#3 2019-03-19 20:44:35

gunjah292
Member
From: Hamburg
Registered: 2011-05-05
Posts: 186

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

I have this in /etc/grub.d/custom_40

    menuentry "Gparted live" {
      set isofile="/gparted-live/gparted-live-0.33.0-1-amd64.iso"
      loopback loop $isofile
      linux (loop)/live/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip= $
      initrd (loop)/live/initrd.img
    }

Seems pretty similar as the entry in the Arch guide, except for the [loopback] in front of the name. Changing it, did not make a difference though. Nothing is detected by update-grub


KDE Plasma, ThinkPad X380 Yoga, Intel Core i7-8550U, Intel UHD Graphics 620, 512GB PCIe-NVMe SSD (OPAL 2.0), 16GB PC4-19200 (2400 MHz)

Offline

#4 2019-03-19 21:03:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

Declare the root device as well:

menuentry "Gparted live" {
   search --set=root --UUID $uuid --hint hdX,Y
   set isofile="/gparted-live/gparted-live-0.33.0-1-amd64.iso"
   loopback loop $isofile
   linux (loop)/live/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 toram=filesystem.squashfs findiso=$isofile
   initrd (loop)/live/initrd.img
}

Replace $uuid with the actual UUID of the partition containing /gparted-live/gparted-live-0.33.0-1-amd64.iso and replace X & Y with the correct drive & partition numbers (for example hd0,2 for /dev/sda2 or hd1,3 for /dev/sdb3, etc).


Jin, Jîyan, Azadî

Offline

#5 2019-03-20 04:53:17

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 205
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

In EFI system you should use (hdX,gptY)

Offline

#6 2019-03-20 05:24:54

waitnsea
Member
From: France
Registered: 2013-02-10
Posts: 67

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

mmdamin wrote:

In EFI system you should use (hdX,gptY)

As I added a customized monthly archiso, instead this root line, I put

 # path to the partition holding ISO images (using UUID) 
set imgdevpath="/dev/disk/by-uuid/0acb30**my_good_uuid **" 

after the

 # the 'exec tail' line above. 

Last edited by waitnsea (2019-03-20 05:32:02)

Offline

#7 2019-03-20 05:57:58

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 205
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

waitnsea wrote:
mmdamin wrote:

In EFI system you should use (hdX,gptY)

As I added a customized monthly archiso, instead this root line, I put

 # path to the partition holding ISO images (using UUID) 
set imgdevpath="/dev/disk/by-uuid/0acb30**my_good_uuid **" 

after the

 # the 'exec tail' line above. 

I didn't undrestand you and its relation to my post, but UUID is a unique identification id. You can use it instead of disk number. If you want use disk number you should use gpt for a disk uses GPT partition style.
I found this while playing with grub command line, with 'ls' command.

Offline

#8 2019-03-20 07:26:11

waitnsea
Member
From: France
Registered: 2013-02-10
Posts: 67

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

mmdamin wrote:

I didn't undrestand you and its relation to my post, but UUID is a unique identification id. You can use it instead of disk number. If you want use disk number you should use gpt for a disk uses GPT partition style.
I found this while playing with grub command line, with 'ls' command.

Your post was very pertinent, I only said that one may ommit all root() lines in 40_custom if uuid set in the file beginning

Offline

#9 2019-03-20 09:51:18

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

mmdamin wrote:

In EFI system you should use (hdX,gptY)

The (non-persistent) block device name is only used as a hint in my example, the search is performed for the UUID and falls back to /dev/whatever if that can't be found.

Furthermore it is not necessary to use the gpt (or msdos) identifiers, the plain number will be accepted by GRUB. And it is also possible (but unlikely) that the OP is booting a UEFI system from an msdos disk.

waitnsea wrote:

instead this root line, I put

You forgot to tell the OP how to integrate that variable into the menuentry but yes, the /dev/disk/by-uuid method could also be used, as explained in my ArchWiki link earlier.

Now if we could please desist with this diversion and await the OP's reply that would be just fantastic, thanks.

EDIT: nonsense removed.

Last edited by Head_on_a_Stick (2019-03-20 10:04:08)


Jin, Jîyan, Azadî

Offline

#10 2019-03-20 10:02:18

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 205
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

Sorry and thank you all.
I assumes his disk is GPT.

Offline

#11 2019-03-20 12:00:24

gunjah292
Member
From: Hamburg
Registered: 2011-05-05
Posts: 186

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

mmdamin was right. I am on GPT, but none of your suggested solutions work. Could it have something to do with me having an NVME SSD? I also think that the isofile should be on the EFI partition. I put it to /boot/iso, but it neither works with the menuentry from https://wiki.archlinux.org/index.php?ti … arted_Live

This is really weird...

Last edited by gunjah292 (2019-03-20 12:43:11)


KDE Plasma, ThinkPad X380 Yoga, Intel Core i7-8550U, Intel UHD Graphics 620, 512GB PCIe-NVMe SSD (OPAL 2.0), 16GB PC4-19200 (2400 MHz)

Offline

#12 2019-03-20 12:44:33

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

Sorry OP, I made a mistake with the search command, this works for me:

menuentry "Gparted live" {
   search --fs-uuid --set=root $uuid
   set isofile="/gparted-live/gparted-live-0.33.0-1-amd64.iso"
   loopback loop $isofile
   linux (loop)/live/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 toram=filesystem.squashfs findiso=$isofile
   initrd (loop)/live/initrd.img
}

Again, replace $uuid,X & Y and correct the path to the ISO image as required, the path should be relative to the declared --set=root partition.

EDIT: dropped the --hint, it should work with just --fs-uuid.

Last edited by Head_on_a_Stick (2019-03-20 12:47:17)


Jin, Jîyan, Azadî

Offline

#13 2019-03-20 13:01:11

gunjah292
Member
From: Hamburg
Registered: 2011-05-05
Posts: 186

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

@Head_on_a_Stick: Nope

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/Archlinux/theme.txt
Found linux image: /boot/vmlinuz-5.0-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.0-x86_64.img
Found initrd fallback image: /boot/initramfs-5.0-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.20-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.20-x86_64.img
Found initrd fallback image: /boot/initramfs-4.20-x86_64-fallback.img
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

Last edited by gunjah292 (2019-03-20 13:01:38)


KDE Plasma, ThinkPad X380 Yoga, Intel Core i7-8550U, Intel UHD Graphics 620, 512GB PCIe-NVMe SSD (OPAL 2.0), 16GB PC4-19200 (2400 MHz)

Offline

#14 2019-03-20 13:31:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

gunjah292 wrote:
/usr/bin/grub-probe: warning: unknown device type nvme0n1.

https://forum.manjaro.org/t/grub-doesnt … e-is/37034?

gunjah292 wrote:

Nope

Do you see a menuentry for GParted after updating the configuration?

You can place the stanza in /boot/grub/custom.cfg and it will be sourced by grub.cfg without needing to run `grub-mkconfig`.

If you see a menuentry and it fails then please indicate exactly what you see on the screen when this happens.

As I said that menuentry worked for me but I only have an ancient (non-UEFI, non-NVMe) ThinkPad X201 to test on.


Jin, Jîyan, Azadî

Offline

#15 2019-03-20 13:38:20

gunjah292
Member
From: Hamburg
Registered: 2011-05-05
Posts: 186

Re: [SOLVED] How can I boot GParted from the hard disk on an EFI system?

I am sorry. I seemed to have worked all along. The menuentry is there when I reboot. Update-grub did just not show that it found anything. The "/usr/bin/grub-probe: warning: unknown device type nvme0n1" comes from memtest86+, which is found by update-grub, but doesn't show up in the grub menu after reboot.


KDE Plasma, ThinkPad X380 Yoga, Intel Core i7-8550U, Intel UHD Graphics 620, 512GB PCIe-NVMe SSD (OPAL 2.0), 16GB PC4-19200 (2400 MHz)

Offline

Board footer

Powered by FluxBB