LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Resize the linux partition (https://www.linuxquestions.org/questions/linux-software-2/resize-the-linux-partition-348747/)

guideweb 08-01-2005 01:31 AM

Resize the linux partition
 
Hi,

I currently have on my FC3 instaled into a 10Gb partition and i would like to increase the size of the partition to 25Gb
Now
WinXP 30Gb
FC3 10Gb
I want
WinXP 15Gb
FC3 25 Gb
*I dont care to delete my XP partition

[root@sam ~]# fdisk -l
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3569 28667961 7 HPFS/NTFS
/dev/hda2 3570 3582 104422+ 83 Linux
/dev/hda3 3583 4866 10313730 8e Linux LVM



1) If i delete my hda1 partition and create a new one of 25Gb can i copy my FC3 on the new partition (from the FC3 boot CD ) ?

2) can i resize a partition without corrupting data ?

3) How can i burn my FC3(+/- 8Gb) on DVDs (to make a full backup) ?

4) to make the new linux boot in the first partition, i need to change in grub.conf root (hd0,1) TO root (hd0, ## ) where ## is the new partition ID , Exact ?




Thanks

tkedwards 08-01-2005 01:43 AM

AFAIK Fedora doesn't include any good repartitioning tools. Download either the PCLinuxOS or Knoppix LiveCDs. PCLinuxOS has the excellent Mandrake repartitioning thingo (its in the 'PCLinuxOS Control Centre' in the menus) and Knoppix has qtparted.

DaWallace 08-01-2005 02:07 AM

ooh... resizing a partition whose end is at the end of the disk is a bit difficult, you might have to make a new partition and copy the whole thing. then you can resize using whatever (resize2fs, resize_reiserfs).

unfortunately copying a partition takes hours, and to the same disk would probably be worse.

guideweb 08-01-2005 03:39 AM

Anybody know how to backup my FC3 on DVDs ?

rarsa 08-07-2005 07:55 PM

You can use partimage.

(I am right now writting the full answer to your questions, it's a long answer but has all you need)

rarsa 08-07-2005 09:22 PM

Warning: this post is quite long!

Actually, I've just done something very similar to what you are asking for. Its completelly doable.

*** Note 1: This steps have worked for me. I don't make any direct or implied assumption that they will work for you. Thinkering with partitions is a delicate business. Following this steps you may loose ALL your data. I accept no responsibility in such case. Follow them at your own risk.
*** Note 2: I used only standard linux utilities that you can find in any distribution. There may be other tools that make this process easier.

Having said that. Here are the responses to your questions:

Quote:

1) If i delete my hda1 partition and create a new one of 25Gb can i copy my FC3 on the new partition (from the FC3 boot CD ) ?
I see that you already know that you should not modify a HDD while working on it. Good. I used Knoppix as my liveCD. FC3 rescue disk would have most of the tools required. (e2fsck, resize2fs, fdisk, cp)

Quote:

2) can i resize a partition without corrupting data ?
Yes, If you use the right tools. I resized my NTFS using QTparted from the Knoppix CD.

Quote:

3) How can i burn my FC3(+/- 8Gb) on DVDs (to make a full backup) ?
Have a look at partimage. I will explain latter.

Quote:

4) to make the new linux boot in the first partition, i need to change in grub.conf root (hd0,1) TO root (hd0, ## ) where ## is the new partition ID , Exact ?
It will be root (hd0,0)
Remember that GRUB starts from 0 so hda1 will be (hd0,0)

==============================
Now the details:

There are several ways. I will only list the steps, I won't put the details until you decide which one you prefer. (too much writing)

A) If you really don't care for your XP partition, you could just
1. delete de partition,
2. create the new FC3 partition,
3. copy the FC3 partition,
4. modify your grub.conf,
5. test
6. delete the old FC3 partition.

B) If you still want to keep your WindowsXP:
1. Resize the XP partition,
2. create the new FC3 partition in the 15 GB that you freed up,
3. copy the old FC3 partition to the new one,
4. modify your grub.conf,
5. test,
6. delete the old FC3 partition
7. resize the new FC3 partition

C) If you want to start fresh from Windows XP plus having a full backup of your FC3.
1. Delete the XP partition,
2. create a new linux partition
3. create a FC3 image with partimage saving it to the new linux partition,
4. backup that partition to DVD
5. delete the new linux partition
6. install XP creating a 15 GB partition
7. delete the FC3 partition
8. create the new FC3 partition
9. restore the FC3 partition.

Remember this is an overview. There are some important details for each of the options. (like turning off swap)

I still have a nagging question:
Why do you want to resize your FC3 to 25 MB? I just resized mine from 20 GB to 10 GB. I have a large 'shared' partition where I keep all my data. That makes it easier to backup and to access from other OS's. e.g. XP, FC4, SuSE.


All times are GMT -5. The time now is 10:14 PM.