[SOLVED] How to boot up .iso file in a GPT partition via GRUB2 on an MBR drive
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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??
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.
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
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
}
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.