Hi, I'm not new to linux, but I'm having a problem with grub. I'm trying to setup a multi-boot between Ubuntu, Windows 7, and 6 other operating systems I haven't installed yet. I'm using an old version of Kanotix. I used System rescue 1.1.6 to set up the boot drive.

I'm trying to make sdb12 my boot partition. It boots into grub, but when I try to boot from any of the options on the menu it gives me grub error 22. It's kinda weired, I think my bios boot order effects the hard number. I have an old IDE drive, it had openSolaris on it. I think openSolaris wanted to be free because the boot order keeps changing so the IDE drive boots 1st. I reformated the old 20gb drive because it was getting annoying.

It appears you installed grub to the MBR of the 20GB drive, which is the second drive /dev/sdb. This must also be the drive set to boot first in the bios. In grub language this is (hd1).
All your operating system partitions are on the first drive /dev/sda, or (hd0).
Change the root to (hd0,x) in all entries. Although it is not imperative, you may also want to change the title to reflect the same, ex: sda8 instead of sdb8.

According to the grub manual, error 22 is produced when the partition does not exist.

Junior Hacker

04-15-2009 05:27 PM

I take it you created an extended partition first, then Windows 7 (/dev/sda2) and one Linux (/dev/sda3) are in primary partitions.

Keep in mind, the first partition is the fastest partition due to zoned bit recording. If you use swap allot due to small amount of RAM memory, then it is good to have it near the beginning of the drive as you now have it. But for performance reasons, you may want to consider putting your favorite, most used OS towards the beginning also. If it is Linux, use /dev/sda5 for your fave.

EDIT:
Take a look at "The mother of all booting schemes - Grub in a data-only partition" in this thread for setting up the grub partition.

Radikll

04-16-2009 03:26 AM

I fixed error 22 and I can now boot into Windows 7, but I still can't boot into Ubuntu. I get error 13 now.

Code:

Error 13: Invalid or unsupported executable format

I'm not really sure what it means, but at least I can boot into windows. It only happens when I try to boot into Ubuntu or one of the blank drives.

ps
I formatted my drive with gparted; for some reason it messed up the partition names.

Windows deleted all my partitions (except swap) when I tried to put it in my extended partition. So, I had to give it's own primary partition. The sda3 is going to be my main storage drive once I can figure out how to encrypt it. Right now sda3 is formatted in Ext4, but I think I'm going to use truecrypt to format it to encrypted Ext2, Ext3, or NTFS(maybe). I plan on using symlinks to link directories in sda3 to directories in my /home.
If you guys know of any other encryption programs that will work on Windows and Linux, tell me.

widget

04-16-2009 01:03 PM

You are booting from /dev/sda12 [in grub this will be (hd0,11).

Boot to a LiveCD and pull up the terminal and as root;

Code:

sudo (or whatever to get root status)grub
grub find /boot/grub/stage1

this will give you a list of where there is a grub boot. From your info above it should be;

If this lets you boot to there you can edit (with gedit, kate, krite, vi, vim - some text editer) your /boot/grub/menu.lst to have all the others listed.

Usually the last OS that you install has that menu.lst to include all OSs. You could just try installing some more and seeing what happens. If you have problems try the grub stuff above using the partition for the last installed for root and setup. Should work.