LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to do triple boot (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-do-triple-boot-600998/)

AudioBandit 11-19-2007 10:27 PM

Trying to do triple boot
 
Okay here's the situation. I'm trying to go completely linux, but I can't get my usb phone to work, and I need Autocad.

Anyway, unfortunately I have an HP computer so I have an 8 gig partition holding the operating system and that junk software.

At some point, I got a virus on my windows operating system so I decided to reformat it, and install a new operating system(kubuntu 10) from Mandriva 2007 at the same time. I decided to change the partition sizes of all of the partitions, except of course the install partition. The end result is I didn't like kubuntu, so I went back to Mandriva 2007 for the moment.

I've resized the partitions several times, and booting up the install partition I can install the operating system on the windows partition (I can only confirm this by mounting the windows partition under NTFS-3G. Everything seems to be there.).

The install partition has become sda2, and the windows partition has becomes sda8.

I've tried changing the grub bootloader's menu.lst file and found out I don't know what I'm doing. It just tells me that it doesn't know what file system it is.

Selecting the "windows" option from grub only loads the install partition, whereas previously it would automatically detect the windows partition.

Basically what I'm asking is, how can I fix my mistakes and make it all better?

I hope I've provided enough information to start off with. If you need any other information, I'll be more than happy to provide it! As long as you tell me how to get it!

blackhole54 11-20-2007 12:07 PM

Quote:

Originally Posted by AudioBandit (Post 2964832)
The install partition has become sda2, and the windows partition has becomes sda8.

I don't follow you. They shifted postions on the disk???

Quote:

I've tried changing the grub bootloader's menu.lst file and found out I don't know what I'm doing. It just tells me that it doesn't know what file system it is.
Why don't you post your menu.lst file.

archtoad6 11-20-2007 01:27 PM

Welcome to LQ.

And the output of fdisk -l, in a "Code:" block.

AudioBandit 11-20-2007 03:41 PM

Here is the menu.lst

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,5)/boot/gfxmenu
default 5

title linux
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda6 splash=silent vga=788
initrd (hd0,5)/boot/initrd.img

title linux-nonfb
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/sda6
initrd (hd0,5)/boot/initrd.img

title 2.6.17-13
kernel (hd0,5)/boot/vmlinuz-2.6.17-13mdv BOOT_IMAGE=2.6.17-13 root=/dev/sda6 splash=silent vga=788
initrd (hd0,5)/boot/initrd-2.6.17-13mdv.img

title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/sda6 failsafe
initrd (hd0,5)/boot/initrd.img

title windows
root (hd0,1)
makeactive
chainloader +1

title WindowsMCE2
root (hd0,5)
chainloader +1


Here is the fdisk -l


Code:

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1      23171  186121026    5  Extended
/dev/sda2  *      23172      24321    9237375    c  W95 FAT32 (LBA)
/dev/sda5  *          1      17303  138986284+  7  HPFS/NTFS
/dev/sda6          17304      18722    11398086  83  Linux
/dev/sda7          18832      23171    34861018+  83  Linux
/dev/sda8          18723      18831      875511  82  Linux swap / Solaris

Partition table entries are not in disk order

-------------------------------------------------------------------------------

No they didn't physically move on the hard drive. It's just that the install partition is the default windows partiton that loads up, even when I install windows on the large partition. So it just seems that the install partition has taken the default boot partition.

AudioBandit 11-20-2007 03:50 PM

1234567890

AudioBandit 11-20-2007 05:34 PM

root (hd0,4)
Filesystem type unknown, partition type 0x7
makeactive

Error 12: Invalid device requested


I figured it would be helpful to know what the exact error message that was occuring.

blackhole54 11-20-2007 10:31 PM

Let me give you a little tip about posting computer output: wrap it in "code tags". This will cause everything to line up the way it was on your computer screen. (Normal text is proportionally spaced, and I think it suppresses strings of spaces. A "code box" is mono spaced and leaves spaces alone.) One way of wrapping something in code tags is to highlight the text and then click the hash symbol (#) above the edit box. (The Quick Reply box apparently doesn't have this.) Or you can type the tags in manually. To see how to do that, just look at what happens when you highlight and click the hash symbol.

Back to your problem ...
It looks like what you've titled "windows" is set to boot into the installer. And I believe what you've titled "WindowsMCE2" is where you are trying to boot into the actual MS Windows partition. If so, you've listed the wrong partition. Your NTFS partition is (hd0,4) rather than (hd0,5). I would start off by making that change and see if it works.

The GRUB documentation I have handy says that makeactive is only for use on primary partitions. In post #6, you tried to use it on a logical partition, and I believe that is the reason for the error message. "Active partitions" have always been a bit of a mystery to me when it comes to GRUB and LILO. For those boot loaders, I don't see why they are needed at all, but do not take me as an authority on this. There may be something I am still missing.

Your partition layout strikes me as strange. I am used to seeing the extended partition be after the other used primary partitions, both numerically (/dev/sda1 vs /dev/sda2, for example) and on the disk location (cylinders, etc.). Also, as fdsisk points out, /dev/sda8 is physically before /dev/sda7. And I believe at one time the main MS Windows partition insisted on being on a primary partition, but I believe I have read this is no longer true. So let's hope none of this matters. At this point just try making that one change to menu.lst and see where it gets you.

archtoad6 11-21-2007 08:28 AM

AudioBandit,
You could make life a lot easier for us if you would go back & edit the "Code:" blocks into post #4 rather than put that long output into yet another long post. Having done that, you could also edit post #5 down to the 10 character minimum.

If you don't (yet) know how to edit your posts, please ask.


blackhole54,
Nice explanation of "code tags", thanks.
Normal text definitely suppresses strings of spaces.
Although legal, that layout is strange to abnormal & I wonder how it got that way.

AudioBandit 11-21-2007 05:05 PM

blackhole54: I had already made the change to the menu.lst but I had forgotten to update the table in post #4. I did post the error message that I received booting from MCE in post #6.

I know that the Windows partition was originally a primary partition... Is it possible that while making all those changes the FAT32 partition became the primary? And that resulted in the windows partition to become a logical partition?

Yes the layout of the partitions concerns me too.

Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1      23171  186121026    5  Extended
/dev/sda5  *          1      17303  138986284+  7  HPFS/NTFS
/dev/sda6          17304      18722    11398086  83  Linux
/dev/sda8          18723      18831      875511  82  Linux swap / Solaris
/dev/sda7          18832      23171    34861018+  83  Linux
/dev/sda2  *      23172      24321    9237375    c  W95 FAT32 (LBA)

I think this is what it should be.

And thank you archtoad6 and blackhole54.

blackhole54 11-22-2007 02:17 AM

AudioBandit,

Just to make sure I understand, you had made the change I suggested, and it did not work?

If I read it correctly, the partition table you posted in post #9 is simply the old table where you have rearranged the line order. Assuming my proposed change did not fix things, then perhaps that strange arrangement of the partitions has something to do with the problem.

Please, if archtoad6 or anybody else sees something here I am missing, jump in here and potentially save AudioBandit a lot of effort and perhaps grief.

If nobody sees anything else, you might have to do something about the partition layout. That could be messy and ugly. Before you proceed I would recommend saving a copy of any critical partitions. I would think at a minimum you would want to save your install partition (sda2), which if I am reading things correctly is about 9 MB. Depending upon what you have available, you can use a tool like dd or a program like partimage. Your eventual goal should be to get the information needed to (if necessary) recreate this partition onto a different computer, CD, or different hard drive. Then probably the easiest thing to do is to delete all other partitions besides /dev/sda2, and then use parted, Gparted, or Qtparted to copy /dev/sda2 to /dev/sda1 and then delete /dev/sda2. (Its been I while since I've used these tools; you might just be able to move it in one operation.) Then from the installation partition re-install MS-Windows. (You will have to find a way to boot that partition. One option is using a GRUB command line from a live CD.) Presumably MS Windows will then be on the second primary partition (sda2) and physically immediately after the installation partition. Make sure you can boot MS Windows, and then go ahead and re-install Mandriva.

What I am proposing is fairly drastic, so you might want to wait a while in case anybody else sees something simpler for you to try. If at any point you don't understand something, please post (and wait for an answer!) before proceeding.

saikee 11-22-2007 03:16 AM

The partition table looks healthy to me. Users say it is odd just because the order the partitions were created. It is totally normal.

The reason is sda1 and sda4 are reserved primaries. When a user opted to have logical partitions, even one logical, the next empty primary (from sda1 to sda4) will be used up to make the extended partition. Thus if a user starts to make a logical partition before anything then sda1 will become the extended partition. The OP has done this. When the first primary partition is created it will be at the end of the extended partition. In this case it is the 23171 cylinder or at the end of sda7. Since no primary was created so sda2 was selected by default.

Whenever a logical partition is created it always starts at the sda5.

The OP has said there has been a lot of resizing and my suspicision is Windows in sda5 may have been unbootable for sometimes.

I don't know how to cure this problem but it is obvious to me sda5 was booted by a MS boot loader in sda2. Thus the original Grub command
Code:

title windows
root (hd0,1)
makeactive
chainloader +1

is correct because (hd0,1) is sda2.

Since sda5 has no boot loader it cannot be chainloaded by Grub. As far as I am aware no operating system uses an "active" logical partition in the booting process. All MS, Solaris and BSD use a primary partition for booting. In fact up to and including XP all MS MBR boot an operating system simply by searching the booting flag of the 4 primaries and boot it if one if found. I have used this characteristic to use XP to boot up Grub by placing it in a data-only primary partition. One can uses Diak Management inside XP to switch the booting flag on and off of any primary partition.

A MS system cannot be installed and booted as a stand alone system in a logical partition. It can only do so if its boot loader is in another MS system in a primary partition.

In this case I think the MS boot loader in sda2 is functional but the system in sda5 may have suffered damages that it is no longer bootable possibly by repeated partition changes without running its system to verify the changes in each stage.

The files inside should be recoverable.

blackhole54 11-22-2007 03:34 AM

Quote:

Originally Posted by archtoad6 (Post 2966498)
Although legal, that layout is strange to abnormal & I wonder how it got that way.


Thanks for you kind words, archtoad6. When I first read your above quoted statement, I was in the wrong context. I believe (now) you are talking about the partitions. I wondered how they got that way too, but I figure at this time the question moot. I have a vague recollection I have seen something like that previously posted on LQ, but I can't remember enough about it to search for it. (And my memory has been wrong before! :) ) If you see something I am missing please speak up to save the OP from the drastic steps I suggested in my last post.

EDIT: Note -- this post was posted before seeing saikee's post above.

blackhole54 11-22-2007 03:51 AM

Quote:

Originally Posted by saikee (Post 2967275)
The partition table looks healthy to me. Users say it is odd just because the order the partitions were created. It is totally normal.

That seems logical to me. But I remember one time getting myself in trouble by (deliberately) creating partitions that were out "out of order" because that was the easiest way (I thought!) to do what I was trying to do. After much hair pulling, I finally, using parted and sufficient effort, set things up the way the were `spozed to be and all the problems went away. I still believe what I did was "legal," but something didn't like it. Unfortunately, I have forgotten the details.

saikee 11-22-2007 09:48 AM

blackhole54,

I always recommend a Linux user to partition a hard disk with terminal programs like cfdisk and fdisk because one can learn more from the terminal programs. You can see what is happening if you use cfdisk which does not have a facility for creating an extended partition.

Graphic programs like Gparted mixes the partition creation with formatting. The two are completely different tasks. The former is reversible while the latter is permanent.

As long as any operating system can access the files without any complaint the partition table is healthy. The primary partition order has no operational merit if they are in ascending order. Logical partitions on the other hand must be continuous and has no break in between.

blackhole54 11-22-2007 11:40 PM

Quote:

Originally Posted by saikee (Post 2967275)
I don't know how to cure this problem but it is obvious to me sda5 was booted by a MS boot loader in sda2. ...
Since sda5 has no boot loader it cannot be chainloaded by Grub.

AudioBandit,

Do you understand what saikee said? When you boot into sda2 does it give you an option to go ahead and boot the main MS Windows partition in sda5?


All times are GMT -5. The time now is 07:22 PM.