LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 07: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 07:47 PM.
 
Old 04-11-2018, 12: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 06:52 PM.
 
Old 04-11-2018, 12:50 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Thanks for the solution and update.
 
Old 04-11-2018, 06: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, 07:12 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
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, 07:14 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
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, 07:33 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
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, 07:51 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
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, 12:57 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
The OP claims it was fixed so we can't know other than that.
 
Old 04-14-2018, 01: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, 07:37 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
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



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 02:25 PM
Partition/format advice: SSD + HDD, MBR/GPT mixture, win7 x64 dual-boot dad_ Linux - Hardware 6 01-17-2015 12:34 PM
GPT - grub2 wants BIOS partition CollieJim Gentoo 5 01-05-2015 12:52 AM
Grub2 Installation on GPT partition Emrod Slackware 5 06-24-2013 08:59 PM

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

All times are GMT -5. The time now is 03:01 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
Open Source Consulting | Domain Registration