Page 1 of 1

grub error 21 boot problems hidden partitions

Posted: Sat Jul 12, 2008 2:14 am
by mcurran
I had a multiboot system setup with Vista/OS X/Elyssa. I was trying to work around the darwin bootloader's limitation where the default selection is always the active partition, because I was sick of selecting OS X in grub, and then having to select it again in darwin because the linux partition was the active partition and darwin would just loop it back. I decided to try and use the makeactive grub line and was also attempting to hide all the irrelevant partitions for each grub entry. So basically I had entries like this:

(linux mint kernel entries which I did not edit)
and then something kinda like

title MAC OS X "Leopard" Kalyway OSx86
unhide (hd0,2)
root (hd0,2)
hide (hd0,0)
hide (hd0,1)
hide (hd0,3)
hide (hd0,4)
hide (hd0,5)
makeactive
savedefault
chainloader +1

the basic idea I was messing with, was to hide all partitions except the ones I wanted each entry to see, so if I was editing the Windows partition, I thought I would hide OS X and Linux, but unhide Windows, Windows Recovery, and linux swap.

After: I can't boot Elyssa anymore and post my actual grub; however, I am pretty familiar with it and I remember clearly what I did. I just don't know how to use hide or makeactive. Makeactive seems self explanatory, so I think these hide entries messed up my system. I did this to my OS X entry like above, and I also did it to my Windows Vista and Windows Vista Recovery entries. Obviously this is not how to properly use the hide function. So now I get error 21 line on black screen after I saved grub and rebooted. Elyssa can no longer boot, so I used my GParted cd and made my Windows partition active so I could do some research.

I tried using the Elyssa live cd and repair grub, however it won't even mount the extended partition where my 72GB ext3 Elyssa partition and 6GB swap partition are held. In fact, GParted and QDParted both now show my extended partition as one partition and no longer identify the two within it. When I tried to look in the partition with nautilus in the live cd, it said something about it being superblocked...

Does anyone have any ideas on what I actually did by putting in all those hide lines? Is there anyway I can open the /boot/grub/menu.lst file with the live cd or other, and just remove the hide entries and be on my way? I don't even know if I can just delete and do a clean install of Elyssa; because I don't I'll be able to completely delete what was there. Maybe the unmountable partitions will prevent the installation - which is what I'm assuming since even GParted won't see them now). PLEASE HELP - I'M SCARED and I really don't want to attempt a reinstall without knowing what's wrong and possibly ruin my drive.

Oh yeah, I also tried supergrub and it did not see the partitions either... Oh, man. How could grub control what outside disks (live cds) see, even after I set Windows as root with GParted (very strange).

So basically I think my extended partition is hiden and the swap partition is hidden completely, and now I have a non-working ext3 partition only. I really hope the space is not lost forever.

Re: grub error 21 boot problems

Posted: Sat Jul 12, 2008 9:56 am
by Husse
Jikes! This is a hard nut
What you do when you hide a partition is that you set a flag in the PBR (same as MBR but for a Partition)
After that, well it's hidden
And the reference to superblock you mention is correct, because it's in a superblock you find the flag (not called so in Win)
So - you have to find some software that can unhide
I know that Acronis (which has versions for both windows and Linux) can hide and unhide (unless my memory fails me)
There are trial versions - perhaps install a trial version and unhide
Also do a search for
unhide partition vista
Perhaps even the built in disk tool in Vista and XP can hide/unhide
This has nothing to do with file format - to my knowledge it should work with ext3 or ntfs - only win will see an ext3 partition as unknown
I will split this to a separate topic