Chameleon

Issue 62: Multiboot, grub, and partitions

Reported by Peter DiCamillo, Feb 17, 2011

I have the following use case.  I have a single drive with Snow 
Leopard in one partition and Leopard in a different partition.  I 
also have small boot partitions (on the same drive) with Extra 
folders for each, a leopardboot partition and a snowboot partition.  
I would like to have a boot menu which allows me to choose booting 
Leopard using the leopardboot partition, or Snow Leopard using the 
snowboot partition.

I thought I would be able to do this using grub 2 with multiboot.  I 
set up the grub menu so I could choose to run the copy of 
"boot" on either boot partition.  I was hoping that when I 
did that, boot would use the Extra folder from the same partition 
with that copy of boot.  However, by trial and error, and then by 
examining the source code, I found that boot discards the partition 
number from multiboot.  So regardless of which copy of boot I run, 
Chameleon uses the first Extra folder it finds by scanning 
partitions from the start.

When grub multiboot is being used, I'd like Chameleon to either use 
the partition from multiboot, or try that partition first, before 
scanning as usual.  Has anyone attempted anything like that, or is 
there another solution to my use case?  I'm experienced developer, 
and I'm considering trying to implement that in boot myself, but 
first I want to know what the current state is for attempts to do 
that, and generally what the developers think of it.

Comment 1 by Peter DiCamillo, Feb 21, 2011

I discovered that Chameleon supports using partno on the multiboot 
command line to specify a partition to use.  With partno specified, 
Chameleon ignores all but the specified partition.  That's close to 
what I need, but doesn't work because I want Chameleon to use two 
partitions, one with my Extra folder and the other with the OS X to 
boot.  For example, if I specify partno for the partition with 
Extra, then using Default Partition to specify the OS X to boot 
doesn't work.

I realized that the solution to my situation is the opposite of 
partno.  When I'm booting one version of OS X, I want Chameleon to 
ignore the partition with the Extra folder for the other version of 
OS X.  I implemented a "skip_partno" parameter, which 
causes Chameleon to ignore the specified partition.  Using that 
works perfectly.

The code changes for skip_partno are almost trivial, and I've 
attached the svn diff file.  The attached file also shows how I use 
it in grub.  Ideally, skip_partno would accept a list of partitions 
to skip rather than just one.  In any case, it would be great if 
skip_partno were included in a future version of Chameleon.

Comment 2 by Cosmosis Jones, Jun 2, 2011

mek, this may help fix teh multi boot.
Status: Accepted
Owner: meklort

Comment 3 by Evan Lojewski, Jul 9, 2011

I've applied the patch to trunk (revision 1137)
Status: Fixed

Created: 13 years 1 month ago by Peter DiCamillo

Updated: 12 years 8 months ago

Status: Fixed

Owner: Evan Lojewski

Followed by: 1 person

Labels:
Priority:Medium
Type:Defect