LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-23-2004, 06:16 AM   #1
discShredder
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Rep: Reputation: 0
Unhappy getting rid of an extended partition preserving the inner ones


Hi all there,
I have an extended win95 partition (fdisk system id: f)., which Linux refuses to mount. That's not the bad thing about it, but I can' t create any new partitions larger than 2 gigs although the disk is a 80 GB with about 25 gigs unpartitioned space. The first partition seems to be a "frame" for my other ones, which contain my data. The data partitions can be accessed without any problems. My main goal is to delete the "frame" partition (hda1), while preserving the data partitions(hda5, hda6).

Here's my output of fdisk -l:
################################################
Disk /dev/hda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 66 9733 77658210 f Win95 Ext'd (LBA)
/dev/hda5 844 5177 34812823+ 7 HPFS/NTFS
/dev/hda6 7205 9733 20314161 b Win95 FAT32
################################################

the output of cat /proc/partitions is as follows:
################################################
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

3 0 78184008 hda 3349 199 4064 630 6 1 7 0 -2 3643600 35663102
3 1 1 hda1 0 0 0 0 0 0 0 0 0 0 0
3 5 34812823 hda5 188 6 440 80 0 0 0 0 0 80 80
3 6 20314161 hda6 3136 6 3200 390 6 1 7 0 0 390 390
################################################

When I delete hda1 (extended partition) using fdisk 4 linux, all my other partitions are also gone!
Seems like hda5 and hda6 are a kind of linked inner partitions?!?
After deletion, I re-created the partition table manually with the old
start and end cylinder values for hda5 and hda6, but as a surprise the number of blocks of each partition changed by a few byte, although the cylinder values were the same! I saved the so-created partition table and after a reboot, tried to mount the partitions, but it didn't work out anymore (invalid argument error), also a try on a winXP gave the little result, that windows tried to format the partitions.
So I replaced the bootsector with a backup of the old one. but the problem still remains...
thanks for any advise!
 
Old 02-23-2004, 06:40 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
You are correct an extended partition is a container for logical partitions and can not be mounted. The extended / logical was implemented as a way to create more then 4 partitions on a hard drive. When hard disk drives were first developed for PC's 4 parititions was the limit. Now the original 4 are called primary which have an ID 1-4. Logical parititions are any ID >=5.

You can not delete the extended partition. You've probably deleted the pointer structure for all of the logicals. You could probably edit the disk by hand but I do not know how.

A FAT filesystem type b max size I do believe is 2GB. It needs to be c. I've seen previous post that mkfs can not format a large filesystems. I've also always formated windows filesystems using windows so I do not know if mkfs has any limitations with vfat filesystems.

You can create additional primary parititions.

Last edited by michaelk; 02-23-2004 at 06:42 AM.
 
Old 02-23-2004, 07:04 AM   #3
discShredder
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Original Poster
Rep: Reputation: 0
thx for your fast reply!
fdisk (linux) shows me after deleting the extended partition an empty list.
Also as you said partition numbers >4 are logical, fdisk can convert the type of hda5 and hda6, without any errors. But when I create a new logical one and try to change to the corresponding type, I'll get an error message. So I'm not very sure if the hda5 and hda6 partitions are logical.
The max size for a new primary partition is also only about 2 gigs, because the extended is about 78 gigs. Something's wrong with the table I guess, as the mandrake 9.2 installer told me that it's "too corrupt "
greets...
 
Old 02-23-2004, 10:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Hopefully you don't have important data on the drive that isn't backed up.

You will need to repartition the drive from scratch.
 
Old 02-23-2004, 11:00 AM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
yup, sounds like you up a creek without a paddle... for future refernces, i'd backup the partitions you want to preserve, either with tar or with dd, do your deletion, repartition and hope your tar archives are an a partition not being messed with... then when done repartitioning, restore the backed up information to the partiton

before you go and repartition i'd google for software, i have heard there are softwares (albeit commercial) that can rebuild partition tables

Last edited by frieza; 02-23-2004 at 11:01 AM.
 
  


Reply



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
Ubuntu on an Extended Partition? ampfp@yahoo.com Ubuntu 2 08-18-2005 01:22 AM
Slackware on an extended partition? AxXium Slackware 6 06-17-2005 11:18 AM
Moving from extended partition to primary partition joelbudgor Linux - General 5 05-26-2004 06:08 PM
Booting from an extended partition - need a partition table editor Ouch_Taser Linux - General 2 02-10-2004 06:22 PM
Linux on extended partition darkangel Linux - General 7 08-12-2002 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:35 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
Open Source Consulting | Domain Registration