grub error 21 boot problems hidden partitions

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
User avatar
Level 2
Level 2
Posts: 98
Joined: Sun Jan 20, 2008 10:32 pm

grub error 21 boot problems hidden partitions

Postby mcurran » Sat Jul 12, 2008 2:14 am

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)
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.
IBM IntelliStation Z Pro [6227-ACU]
Intel Xeon (3.4GHz) | Irwindale (x2)
nVIDIA GTX 460 (1024MB-DDR5)
6GB RAM (800MHz)
MULTI-BOOT: Metro/Mountain Lion/LMDE

    Level 23
    Level 23
    Posts: 18703
    Joined: Sun Feb 11, 2007 7:22 am
    Location: Near Borås Sweden

    Re: grub error 21 boot problems

    Postby Husse » Sat Jul 12, 2008 9:56 am

    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
    Don't fix it if it ain't broken, don't break it if you can't fix it

    Return to “Installation & Boot”

    Who is online

    Users browsing this forum: BG405 and 13 guests