LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-24-2004, 01:52 PM   #1
joelbudgor
LQ Newbie
 
Registered: Feb 2004
Posts: 11

Rep: Reputation: 0
Moving from extended partition to primary partition


Hello,

I am currently running Mandrake 9.2.
I have a dual boot configuration in which XP is stored on a primary partition
and Linux is stored in an Extended Partition. I use the XP bootloader to dual
boot into either environment.

Below is a copy of the current partition table:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 892 7164958+ 7 HPFS/NTFS
/dev/hda2 893 3589 21663652+ f Win95 Ext'd (LBA)
/dev/hda3 3590 4864 10241437+ 1c Hidden Win95 FAT32 (LBA)
/dev/hda5 893 1784 7164958+ 83 Linux
/dev/hda6 1785 1848 514048+ 82 Linux swap
/dev/hda7 1849 2740 7164958+ b Win95 FAT32
/dev/hda8 2741 3589 6819561 7 HPFS/NTFS
#Ignore /dev/hda8 for now. I have future plans for it.

What I would like to find out is a simple, non-destructive way of
moving the Linux partition to a primary partition.

I tried using Partition Magic to designate the Linux partition (currently hda5) as a
primary partition. What's not clear to me is the device id assigned to the primary
partition. I assumed it to be hda2, but I am not certain of this. Assuming the new
partition was hda2, I modified lilo.conf, indicating the new device to be hda2
rather than hda5, and wrote the resulting information to a bootsect.lnx file
that I then mounted in the root directory of drive C, where my current working
boot file resides.

Unfortunately, when I choose Linux from the XP boot loader, all I get is gibberish
on the display. Other variations I have tried (ie. boot floppy) have gotten started
with the boot process, but always result in a kernel panic indicating that the
file systems cannot be found.

Is there a simple way to do what I am trying to do, or must I reinstall the OS from
scratch on the clean primary partition.

Thanks very much,
Joel Budgor
 
Old 04-24-2004, 02:45 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 65
You can only have 4 primary partitions, and if you want more than 4 partition on you HDD then one of them needs to be the extended partition, which holds the logical partitions.

From your listing I assume that /dev/hda4 is the extended partition which holds logical partitions /dev/hda5 - /dev/hda8

If you really want linux on a primary partition you need to delete one of them first to make room....probably not what you want since I assume hda2 and hda3 hold your windows file.

I think you are getting gibberish because, if I understand you correctly, you told lilo to boot linux from hda2, where obviously linux is not installed.

So: if you free up a primary partition you can try PM again...I have never used it so I can't say whether it will do the trick.
 
Old 05-05-2004, 12:44 PM   #3
joelbudgor
LQ Newbie
 
Registered: Feb 2004
Posts: 11

Original Poster
Rep: Reputation: 0
It was the wrong drive

Thanks for the reply.

After further experimentation I discovered that you were correct;
the drive in question was hda4 and not hda2. After some tinkering
I finally got things to work the way I wanted.

Thanks again,
Joel
 
Old 05-05-2004, 09:47 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,753

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
Even though you figured it out I wanted to add some additional info.

Quote:
/dev/hda2 893 3589 21663652+ f Win95 Ext'd (LBA)
/dev/hda5 893 1784 7164958+ 83 Linux
hda2 is your extended partition, note the ext'd. 1-4 are your primary partitions. Anything >= 5 is a logical partition. In a nutshell an extended partition is a container for logicals. I take it you created a hda4 since that was the last primary partition ID available.

You see how hda2 and hda5 have the same starting block number. Also all of your logicals will have a start and end blocks within the start and end blocks of hda2.
 
Old 05-06-2004, 05:59 AM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 65
Good call michaelk, I totally missed that...
 
Old 05-26-2004, 06:08 PM   #6
delanosan
LQ Newbie
 
Registered: May 2004
Posts: 1

Rep: Reputation: 0
Hey Joel it is Frank!
Remember your old Java Student?
You have time for a question?

Oh and I will tell you the answer soon.

Frank
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to convert primary partition into extended? foxy123 Linux - General 4 11-03-2005 05:19 AM
Primary, Logical or Extended partition? mrpc_cambodia Linux - General 3 09-12-2004 11:10 PM
Booting from an extended partition - need a partition table editor Ouch_Taser Linux - General 2 02-10-2004 06:22 PM
Primary vs extended partition installation Cisco Shaolin Linux - Newbie 1 04-13-2003 08:34 AM
setting up a linux partition and primary/extended partitions joemamma Linux - Newbie 6 02-23-2003 01:47 PM


All times are GMT -5. The time now is 01:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration