Loading Gparted Live ISO from Grub 2 gives "disk not found" error
I'm trying to extend my Ubuntu partition by shrinking down my Windows partition. Using Windows Disk Management Tool I've shrinked out 99.67 Gb and now I have it unallocated. I need to add this 99.67 Gb to my Ubuntu root partition.
I'm using GParted and following this tutorial.
Here's what the df
command prints out:
➜ ~ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1951080 12 1951068 1% /dev
tmpfs 392684 1040 391644 1% /run
/dev/sda8 50264772 45937836 1750552 97% /
none 4 0 4 0% /sys/fs/cgroup
none 5120 0 5120 0% /run/lock
none 1963416 0 1963416 0% /run/shm
none 102400 32 102368 1% /run/user
/dev/sda1 98304 29567 68737 31% /boot/efi
shmfs 4194304 1162184 3032120 28% /dev/shm
so it seems that my Ubuntu root partition is sda8
.
So, according to the tutorial, in file /etc/grub.d/40_custom
I add the new menuentry. Here's how this file looks like:
#!/bin/sh
exec tail -n +3 $0
menuentry "GParted Live ISO" {
set isofile="/denis/iso/gparted-live-0.27.0-1-i686.iso"
loopback loop (hd0,8)$isofile
linux (loop)/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia findiso=$isofile toram=filesystem.squashfs
initrd (loop)/live/initrd.img
}
However, I get this error when trying to boot "GParted Live ISO" from Grub: and when I press any key to exit, Windows immediately starts to boot.
The iso file gparted-live-0.27.0-1-i686.iso
is located in /home/denis/iso/
directory.
Could you please help me to find out what I'm doing wrong here and how to correctly load my GParted Live image from iso?
Update 1
I've investigated a bit and found the location for my iso file in /boot
folder from grub, it's (hd1,gpt8)/
. Here's the screenshot from Grub console:
Here's how my new 40_custom
menuentry looks like:
menuentry "GParted Live ISO" {
set isofile="/boot/iso/gparted-live-0.27.0-1-amd64.iso"
loopback loop (hd1,gpt8)$isofile
linux (loop)/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia findiso=$isofile toram=filesystem.squashfs
initrd (loop)/live/initrd.img
}
When I boot "GParted Live ISO" menuentry, I receive the following output:
Okay, here's how I finally got this working:
menuentry 'GParted 64-bit ISO' {
set gfxpayload=text # ~= vga='normal'
set isofile_abspath='/boot/iso/gparted-live-0.27.0-1-amd64.iso'
set isofile_devpath="${devroot}${isofile_abspath}"
loopback loop "(${root})${isofile_abspath}"
linux '(loop)/live/vmlinuz' boot='live' union='overlay' username='denis' config components noswap noeject toram='filesystem.squashfs' ip='' nosplash findiso="${isofile_abspath}"
initrd '(loop)/live/initrd.img'
}