LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Repartitioning Debian partition to make room for another distro? (https://www.linuxquestions.org/questions/debian-26/repartitioning-debian-partition-to-make-room-for-another-distro-313624/)

microsoft/linux 04-15-2005 02:52 PM

Repartitioning Debian partition to make room for another distro?
 
Where does debian store all of it's stuff? I have one partition of WinXP, on of FAT32, one 10GB of Debian, and a swap. My question is could I shrink the debian partition to 5GB, the make another 5GB partiton for another distro?

thegeekster 04-15-2005 03:46 PM

Resizing a Linux partition is possible with some tools on certain partitions, but generally I would strongly advise against it..........Your best bet is to backup the Deb partition somewhere, then split it in two (remove the old and make two partitions) and copy the Deb backup back to one of the newly created smaller partitions........

For backing up the Deb installation, you can use the command 'cp -a', or if you have rsync you can use 'rsync -a'...........The "-a" switch is necessary for both as it means to "archive" and is a shortcut for several switches to preserve permissions, timestamps, and symlinks............

:)

microsoft/linux 04-15-2005 06:38 PM

so, how would I copy my debian partition to something? I don't have an external HD or anything, I want to do this, but I don't have something to copy my Debian partiton to. Thoughts?

thegeekster 04-15-2005 09:20 PM

How do you make backups?..........If you're not making backups, you should seriously think about doing so...... :)

Do you have a CD-RW burner? Or a DVD-RW burner?...............

Also, how big is your XP partition? Can you resize it small enough to create a temporary backup partition?...........

Do you have a friend that will let you borrow a hard drive to use as a temp backup drive?.........

BTW, what type of Linux partition is Deb installed on.....ext2, ext3, reiserfs? (Just in case you _will_ have to resize the Linux partition)..........

microsoft/linux 04-15-2005 10:11 PM

Debian is on an ext3 partition, no, I haven't been making backups. Yes I have a CD burner, but I don't think 5 GB will fit on an 800MB CD. Other thoughts?

harken 04-16-2005 04:02 AM

Quote:

Yes I have a CD burner, but I don't think 5 GB will fit on an 800MB CD.
You could use a backup tool such as DAR to create a compressed backup (you may use gzip or bzip2, which has a better compression ratio). Such a tool can split the resulted backup into several slices, so you could burn them on CDs. 5 gigabytes, compressed with the bzip2 algorithm would probably mean something like an 2-2.5 GB archive == 3 CDs.
Just an idea.

thegeekster 04-16-2005 04:43 PM

How much room do you have on the XP partition?...........Following along with harken's suggestion of using some sort of backup compression scheme (dar, tar.gz, tar.bz2), will there be enough room if you resize the FAT32 partition XP is installed on and create a temp partition to hold the compressed backup?..........You can always reclaim the space after splitting the 10GB partition........

And you can resize an ext3 partition with GNU Parted.........The Knoppix LiveCD also has QtParted, which is a Linux clone for Partition Magic..............Be aware, though, that qtparted is no longer being developed, but should still work for your purposes.......GNU Parted is still being developed, but it is a command line tool, not a gui tool, and would be the better choice of the two (if you're comfortable using command line tools)..............

When resizing, you can shrink the partition in half, but know that you cannot move it, only resize it, and the current data will stay at the front of the partition when resizing.........This will create free space at the end, only.........

But I only recommend resizing as a last resort.............You may be successful, but if something goes wrong you will lose your Deb installation, unless you have a current backup to replace it with..........

:)

thegeekster 04-16-2005 04:52 PM

Another thought is to backup the XP installation to CD using Ghost, and then you can use the whole partition for a temp backup for your Deb installation using the Knoppix LiveCD as a work platform.............It has all the tools needed to make the backup with and then split the 10GB partition...........

:)

microsoft/linux 04-18-2005 11:45 AM

yes, all I want to do is resize the debian partition, so that I can make room to play around with other distros. I have a 30GB HD. 16GB NTFS(XP) 4GB(FAT32 transfer) 10GB Ext3(debian). I gues my question is, if I resize my partition down, will I lose my debian install?

thegeekster 04-18-2005 01:09 PM

While in Debian, run the command df -h to see how much space is left on the Deb partition...............This will output the disk usage of all the mounted partitions...................Look for the partition that has the Root Directory (/), and under the column "Use%" it will tell you how much of the partition is used, in percent.......This will give you an idea of how much space is available..........You want it to be less than 50% (40% or less would be better as there will be some fragmentation) to be able to split it in half..............

I haven't used the resize option for these partition tools, but I think they won't let you resize more than the amount of unused blocks which are available, thus keeping the current data intact...........Both the partition tools use the utilities for the applicable filesystem (e2fsprogs in your case) when working with a partition............

:)


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