LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2018, 08:00 PM   #1
Malibyte
Member
 
Registered: Dec 2001
Location: California, USA
Distribution: Ubuntu, Debian
Posts: 128

Rep: Reputation: 15
How to boot up .iso file in a GPT partition via GRUB2 on an MBR drive


Trying to boot into the SystemRescueCD .iso file on a small partition on my third drive (a 3TB HD that necessarily needs to be set up with a GPT partition table).

I use gparted on the System Rescue CD to make image backups. Since I back up all of the rest of the partitions on the machine, and none that are being imaged can be mounted, I need this in its own partition. I want it on the HD because I get tired of looking through all of my flash drives to find the current USB version, and it's easy to update it - just copy the new .iso to the partition and change the GRUB entry.


I can't get GRUB2 to boot it. Here is the entry in /etc/grub.d/40_custom:

<snip>
menuentry "System Rescue Partition" {
insmod part_gpt
search --no-floppy --fs-uuid --set=root 2d8fdc0a-01bf-42f1-ad5b-51aae4fe7de1
loopback loop /systemrescuecd-x86-5.2.2.iso
linux (loop)/isolinux/rescue64 isoloop=systemrescuecd-x86-5.2.2.iso
initrd (loop)/isolinux/initram.igz
}

Basically, when I select it, I get "no such device" with the UUID; "hd2 cannot get C/H/S values". This last indicates to me that Grub2 can't read the GPT partition table. Can anyone tip me off as to how to get this to work? Thanks.


I'm sure that a *lot* of people have had a similar issue. Has anyone discussed this with the GRUB coding team? Seems if the EFI version of Grub can read the GPT partition table, it should be easy enough to allow the MBR version to do it - I would think that the "part_gpt" module would allow this, no??

Last edited by Malibyte; 04-10-2018 at 08:47 PM.
 
Old 04-11-2018, 01:13 AM   #2
Malibyte
Member
 
Registered: Dec 2001
Location: California, USA
Distribution: Ubuntu, Debian
Posts: 128

Original Poster
Rep: Reputation: 15
Doh! The partition containing the .iso file was the wrong type - changing it to type 8300 (Linux fs) from EF00 (EFI filesystem) - don't know how that happened, as it's ext4 - fixed it.

Last edited by Malibyte; 04-11-2018 at 07:52 PM.
 
Old 04-11-2018, 01:50 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017
Thanks for the solution and update.
 
Old 04-11-2018, 07:51 PM   #4
Malibyte
Member
 
Registered: Dec 2001
Location: California, USA
Distribution: Ubuntu, Debian
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jefro View Post
Thanks for the solution and update.
You're quite welcome.
 
Old 04-11-2018, 08:12 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,905

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
I haven't had any problem booting any Linux iso directly from Grub2 on an ntfs or vfat partition in the past. This of course was on MBR systems so it could be EFI/GPT but I would think it is most likely because it was an EFI partition
 
Old 04-12-2018, 08:14 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,905

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
I'm not sure why the entry you initially posted failed. The only thing I see is you do not have a set root=' ' line. I have an iso of bodhi Linux on a GPT ntfs partition and it booted without problem with the entry below from an old install, Lubuntu 14.04.

Quote:
menuentry "bodhi-2.4.0-sda10-hd1" {
insmod part_gpt
set root='hd1,gpt10'
loopback loop (hd1,gpt10)/bodhi-4.5.0-64.iso
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/bodhi-4.5.0-64.iso quiet splash --
initrd (loop)/casper/initrd.lz
}
 
Old 04-12-2018, 08:33 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017
It wasn't his command I think. Seems his partition was marked wrong. When he set it to correct setting it worked. ?
 
Old 04-13-2018, 08:51 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,905

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
Quote:
Seems his partition was marked wrong. When he set it to correct setting it worked. ?
Shouldn't matter as booting an iso from a Linux or windows partition isn't a problem as the filesystem type of the iso will be iso9660 and it thus does not matter if the filesystem on which the iso file resides is ext2/3/4, vfat, ntfs or other. That's been my experience anyhow. I don't know enough about EFI but I would guess it is some limitation on EFI, maybe?
 
Old 04-13-2018, 01:57 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017
The OP claims it was fixed so we can't know other than that.
 
Old 04-14-2018, 02:58 PM   #10
Malibyte
Member
 
Registered: Dec 2001
Location: California, USA
Distribution: Ubuntu, Debian
Posts: 128

Original Poster
Rep: Reputation: 15
Sorry for the confusion. Not sure why (maybe because it was the first partition on a GPT drive?) the small ext4 partition was given type EF00 (EFI partition) by gparted. EFI system partitions are usually FAT32, but it was ext4, so perhaps Grub was "confused". When I changed it to 8300 (Linux extX), it was able to boot from the .iso just fine.
 
Old 04-14-2018, 08:37 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,905

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
Quote:
so perhaps Grub was "confused".
As reasonable an explanation as any. I booted a Linux iso from the vfat efi (EF00) partiton so I expect either way would have worked, EF00/vfat or 8300/ext4. Since you wanted a Linux filesystem, seems like the best solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need to chainload Clover bootloader on GPT drive from GRUB2 on MBR drive Malibyte Linux - Software 14 04-26-2018 03:25 PM
Partition/format advice: SSD + HDD, MBR/GPT mixture, win7 x64 dual-boot dad_ Linux - Hardware 6 01-17-2015 01:34 PM
GPT - grub2 wants BIOS partition CollieJim Gentoo 5 01-05-2015 01:52 AM
Grub2 Installation on GPT partition Emrod Slackware 5 06-24-2013 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration