LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2006, 05:28 AM   #16
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54

I'm crazy enough to write this even if you are not going to read it - explaining it to others helps me seeing clearer.
And to correct some wrong statements you made...

Just yesterday there was a thread here (in OTW) which discussed the issue you are referring to in your first paragraph.
That last sentence puts the truth quite eloquently and I too need to remind me of this sometimes.

Apparently you got hit by a few things which in turn made your situation look so awkward - nothing really bad but to solve it, a certain knowledge is needed, which you did not (yet) have.

Its about a few things:
1.) the automatic installer helps you the best it can - and it did in fact not destoy anything.
If you wold have known more about how partitioning worked - and if you had used another tool - you would have immediately seen what happened.
2.) If you then knew how to setup the bootloader - everything would have worked fine.

for 1.)

-there can be 4 primary partitions at the most on a disk - if you want more partitions, you need to create extended partitions.
-what your starting point was, is still not clear - you had 3 partitions...these where created by windows and it could have been eighter of the following:

one primary and two extended
two primary and one extended
three primary partitions

You (or the automatic partitioning tool) should have just created (more) extended partitions.
The tool fdisk is not as easy to comprehend as it's more graphical counterpart - cfdisk.
Maybe you see better what happened when using this one to do the job...
After this you know the names and numbers of your partitions.
These you need to set up the bootloader (grub).

The address you gave here along with your comment:
Quote:
Of course, I canít load Windows directly with GRUB
is a good source of information - but there are really more easy to grasp tutorials on how to set up grub.
(even here in the forum are lots of references to howtos wikis and examples)
and the conclusion you draw is - of course I need to add - wrong - sorry!

I'll give you my setup as an example - together with my partition-layout

Code:
fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         869     6980211    7  HPFS/NTFS  --> WindowsXP
/dev/hda2             870         873       32130   83  Linux      --> /boot for linux  
/dev/hda3             874         901      224910   83  Linux      --> linux swap partition
/dev/hda4             902        7296    51367837+   5  Extended   --> the "container" for the rest
/dev/hda5             902        7211    50685043+  83  Linux      --> / (root) partition for linux
/dev/hda6            7212        7296      682731   83  Linux      --> I made this to meet my personal preferences
/dev/hda1 to /dev/hda3 are primary partitions then comes one extended (/dev/hda4) which holds all the rest.
/dev/hda4 is not a partition I can use - it is just the container for all the rest.
It would have worked equally with only one primary partition - the second (and firs extended) would have been the container for all the rest of the partitions...

this is the file /boot/grub/menu.lst

Code:
default 0
timeout 5

splashimage=(hd0,1)/grub/splash.xpm.gz


root (hd0,1)

title=Gentoo-2.6.15-r1
kernel /kernel-2.6.15-gentoo-r1 root=/dev/hda5 video=radeonfb:1024x768-16@60

title=Gentoo-2.6.15
kernel /kernel-2.6.15-gentoo root=/dev/hda5 video=radeonfb:1024x768-16@60

title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
The linux kernels are referenced by:
root (hd0,1) - which points to the /boot partition (where the kernels are - which is the same as /dev/hda2, since grub starts numbering the partitions from 0 instead of 1)
and then by:
kernel /kernel-2.6.15-gentoo root=/dev/hda5
this line could have been also: kernel (hd0,1)/kernel-2.6.15-gentoo root=/dev/hda5
for a little redundance
the statement at the end: ...root=/dev/hda5 tells the kernel where it finds the / of linux /dev/hda5 in this case

the windows-entry:

Code:
title=Windows XP
rootnoverify (hd0,0) --> it is on the firs partition of the first disk and it does not need to be mounted by grub
makeactive           --> make this grub's root - ( it really is in (hd0,1) )
chainloader +1       --> points to the same location NTLDR does when booting windows - and boots it
all you need to do is:
add another entry like this one to grubs configuration-file
replacing rootnoverify (hd0,0) for rootnoverify (hd0,1) if the second windows is on the second partition
 
Old 03-27-2006, 08:40 PM   #17
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
Minor correction

Quote:
Originally Posted by jomen
-there can be 4 primary partitions at the most on a disk - if you want more partitions, you need to create extended partitions.
-what your starting point was, is still not clear - you had 3 partitions...these where created by windows and it could have been eighter of the following:

one primary and two extended
two primary and one extended
three primary partitions
According to the CompTIA A+ cert classes, and personal experience I have, you can only have one extended partition maximum. This means you could have

4 Primary partitions total or,
3 Primary partitions and one extended
2 Primary and one extended, etc.

I believe what you meant to say is that you can have multiple logical partitions (23, to be exact) within an extended partition.

Also, I believe from what I read that drives D and E were to be within an extended partition.


As for the boot loader problem, if you are unable to recover your boot loader for your Windows partitions, I recommend using a Knoppix Live CD to access partitions. This will give you a chance to backup data.
 
Old 03-28-2006, 03:54 AM   #18
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
Thanks for that - I was too sloppy and wrong there - should have noticed from my own example, had I compared the output of fdisk with that of cfdisk (which I normally use).

fdisk shows the extended partition - but not that all the others are logical ones inside it.
cfdisk does not show the extended - instead, all partitions are visibly marked "primary" or "logical" while leaving out the extended as it cant be used for storage (because it is a container for the logical ones).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot Installation littlebeagle Linux - Newbie 3 02-26-2006 12:52 PM
Dual Boot Installation kaplan71 Linux - General 1 04-27-2005 02:50 PM
dual boot + RAID + XP troubles hardyduncan Linux - Newbie 1 01-11-2005 03:49 PM
usb troubles on dual boot the15th Linux - Hardware 1 03-23-2004 10:12 PM
Slackware dual boot, lilo troubles... lt1derful Linux - Newbie 2 07-01-2003 09:58 PM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration