Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 04-03-2006, 02:55 PM   #1
LQ Newbie
Registered: Oct 2003
Location: pittsburgh
Distribution: Slackware 10.2,ubuntu
Posts: 10

Rep: Reputation: 0
Can I add a Partition to the front of / partition?

Ok here's what I want to do with my hard drive partitions, if its posiable
First off here's how my drive is set up.

sda1 fat32 3.9gb hidden win
sda2 ntfs 72.33gb main windowsxp
sda3 fat32 60.72gb shared between win ubuntu
sda4 extended linux is in here
sda5 ext3 11.57gb /
sda6 swap 541.22 swap

What I want to do is resize sda3 15gb less and put it into the extended part.
Then make the new free space ext3 sda7(I need this for video
editing, I forgot fat32 has file size limitations)
at the beginng of the extended partition.

I was going to use qtparted on my knopix live cd.

My question is can I do this?
Will it mess up my root partion(I know adding to the front of my root will)?
will grub still see it the same way?
Old 04-03-2006, 03:51 PM   #2
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The answer is NO or very involved.

You have already used up the 4 primaries with one concerted into the extended partition. So resizing sda3 can only produce dead space that cannot be linked to or integrated with the end of the extended partition of sda4.

An extended partition must have logical partitions in a continuous chain so that the ith logical partition carries the address for the i+1th logical partition. You can read up extended partition in many well documented literature.

You only chance is to delete the entire extended partition or write it out on another hard drive (say an external hard disk), resize sda3 so that the reclaimed space can be integrated into one unalloacted area. You can then recreate sda5 and sda6 as the original sizes, copy back the partitions and proceed to create your intended sda7.

The alteration will cause a Grub failure because the hard disk location of sda5 would have changed. However replicating the boot loader with command "grub-install" will cure it if you boot up a Live CD and chroot to the Linux in sda5.
Old 04-03-2006, 03:53 PM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
For grub, if you change your menu.lst file to reflect the changes, and edit /etc/fstab, you should be OK. For Lilo, you would need to rerun /sbin/lilo.

Even if you make a mistake, and grub won't boot, you can use the grub shell and autocompletion to locate and load the kernel and initrd files.

If your tool allows resizing partitions, I think after shrinking /dev/sda3, you will need to resize /dev/sda4 before creating a new partition in the hole.

Last edited by jschiwal; 04-03-2006 at 03:58 PM.
Old 04-03-2006, 05:15 PM   #4
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,186

Rep: Reputation: 52
i second saikee. i could do it by hand in about 20 or 30 minutes, but i have never been able to get someone else through it by hand. partition magic could probably do it, (several hours), but wouldnot handle the boot loader for linux. that's easy enough to do by hand, boot with a rescue disk, chroot into the partition and run lilo or grub, like
# chroot /dev/hda5 lilo

are you using the nt boot loader to get to lilo or what.

a key to making partition moves go well is to have the partition have the exact same number of cylinders, heads and sectors. that way you can restore a full partition with dd.
Old 04-08-2006, 04:24 PM   #5
LQ Newbie
Registered: Oct 2003
Location: pittsburgh
Distribution: Slackware 10.2,ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Guys
Sorry it took so long to get back to you, I decided just to convert my sda3 drive to ext3, I figure I'll be needing more space for the linux side anyways. It was easy enough just using the disk manager in ubuntu and adding fstab entry for the newly formatted partition. Although I haven't booted into windows to see if it had a problem with it.


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
Front End to Partition Tools kornerr Linux - Newbie 3 12-27-2005 01:07 PM
How to add a new partition bennett Linux - Newbie 3 10-11-2003 12:31 AM
How to add new partition before Linux partition in an existing Linux box? ashutosh Linux - Software 3 04-23-2002 03:26 AM
How to Add a partition Ismark Linux - Newbie 1 01-13-2002 06:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:58 AM.

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