LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-02-2004, 11:29 AM   #1
lobo78
Member
 
Registered: Oct 2003
Location: Wyoming
Distribution: Gentoo, Ubuntu, FreeBSD
Posts: 46

Rep: Reputation: 15
Shrinking an extended partition


I have a disk layout like this:

Code:
Device       Boot   Start       End      Blocks   Id   System
/dev/hda1    *          1       393     2971048+   c   W95 FAT32 (LBA)
/dev/hda2    *        394       398       37800   83   Linux
/dev/hda3             399      3876    26293680    5   Extended
/dev/hda5             399       465      506488+  82   Linux swap
/dev/hda6             466      2791    17584528+  83   Linux
/dev/hda7            2792      2857      498928+   b   W95 FAT32
That is XP on /dev/hda1, a gentoo boot partition on /dev/hda2, and a gentoo swap, gentoo root, and FAT32 partition inside an extended partition. Unfortunately, the extended partition has about 5 or 6 GB of unallocated space at the end. I would like to use this space for the 4th primary partition to install FreeBSD. Is it safe to use QTParted to shrink the extended partition and then use the allocated space to create a 4th primary partition? Or will this screw up Linux?

Note: /dev/hda2 is ext3 and /dev/hda6 is reiser
 
Old 12-02-2004, 11:59 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
i do this kind of crap all the time. write down the starting and ending cylinders for each partition
/dev/hda5 399 465 506488+ 82 Linux swap
/dev/hda6 466 2791 17584528+ 83 Linux
/dev/hda7 2792 2857 498928+

delete your extended partition in linux, NOT windows, then recreate the extended partition for cylinders 399-2857. then recreate each of your partitions, keeping them the same type as before, and most importantly, the same starting and ending cylinders.
then you will have the same free space from 2867-the end of the disk to make another partition. if you type something wrong, exit without saving and start over. mine is similar to yours./dev/hda1 * 1 260 2088418+ 6 FAT16
/dev/hda2 261 1500 9960300 c W95 FAT32 (LBA)
/dev/hda3 1501 23000 172698750 85 Linux extended
/dev/hda4 23001 24321 10610932+ 83 Linux
/dev/hda5 1501 3500 16064968+ 83 Linux
/dev/hda6 3501 3700 1606468+ 83 Linux
/dev/hda7 3701 4000 2409718+ 83 Linux
/dev/hda8 4001 23000 152617468+ 83 Linux


parted is probably safe too, but i haven't used it for that. linux fdisk just edits the partition table and doesn't do much else. the windows fdisk will blank the first so many sectors of a partition, ruining it, and besides, will not let you create partitions by starting and ending cylinder.
if you you get a starting location cylinder wrong for a logical drive, the logical partition information will overwrite data at that cylinder. that's the important thing not to mess up.

Last edited by whansard; 12-02-2004 at 12:04 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shrinking Root Partition celticdaddio SUSE / openSUSE 1 10-06-2005 10:00 AM
Shrinking an LVM partition Sabre_X Linux - Software 6 09-30-2005 11:13 PM
Shrinking the Windows partition trainee Linux - Software 8 07-06-2005 09:37 PM
Shrinking Linux Partition w/ Partition Magic jrdioko Linux - Newbie 11 12-21-2003 03:46 PM
partition or shrinking? M@tt Linux - Newbie 2 11-12-2001 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:06 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