LinuxQuestions.org
Help answer threads with 0 replies.
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 12-20-2003, 06:04 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question Shrinking Linux Partition w/ Partition Magic


Hello all. Its been a while since I've posted a topic to the board but I have another question that I'm sure one of you can help me with.

When I set up this computer, I only gave Windows a tiny partition (something like 3 or 5 gigs out of a 25 gig HD), because I assumed I'd be using Linux the majority of the time. Now, I am simply too busy to troubleshoot Linux and I need to use Windows for the rest of the school year. However, I keep needing more disk space on the Windows partition and I'm running out of useless things to delete. I have Partition Magic and I know it can shrink or reduce the size of partitions if you want to. I've done this with Windows partitions before by defragmenting, then shrinking. However, Linux partitions won't shrink because they are not defragmented and the data is spread over the partition. I've looked around and tried to find some tool to defrag an ext3 filesystem, but I can't find anything. Aside from completely deleting my Linux partition, is there any other way of shrinking it to make more room for my Windows one?

Thanks,
Johnathan
 
Old 12-20-2003, 07:52 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
i'd have to reccomend getting rid of the windows partition, and using linux more.
as far as shrinking a linux partition, there is parted (short for partition editor), however, i have not done any reading on this and it could be dangerous. the last thing i would do is try to shrink a linux partition from windows. so there's my

Last edited by Peacedog; 12-20-2003 at 07:54 PM.
 
Old 12-20-2003, 08:02 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I see what you're saying and I definitely think that Linux is better than Windows, but I simply don't have the time to devote to configuring Linux so that it will do everything that I'm used to doing in Windows now (what with college applications, school work, and finals going on right now). I don't need to be told how wonderful Linux is because I already know, and in another six months I'll be getting a laptop and using Linux for everything possible (all but proprietary software). I was just wondering if there was any way to defrag ext3 so that I could shrink the partition. I've done some reading at other sites online and it sounds like the only way is to back up all the data, delete, and recreate the partition. If this is what needs to be done, I guess I have no choice, but I was just wondering if anyone was aware of software that will defrag ext3.

Thanks for your help,
Johnathan
 
Old 12-20-2003, 08:37 PM   #4
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
i was unaware that ext3 would need defraging, as it does not fragment nearly as much as a windows file system. i did not intend to tell you how great linix is, and, if i came off that way, my apoligies. it was unintended, as i still and will probably always use windows for the office. (i have at least 10 or 15 ? every monday morning..why is this happening?...w/ a windows environment.) i simply don't have time to teach everyone in my office windows and linux. hopefully someone here will have some knowledge on this and educate us both. w/that said, i still wouldn't try to resize a linux partition from windows, unless it was a box i could afford to lose info on.
 
Old 12-20-2003, 09:49 PM   #5
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I wasn't accusing you of trying to tell me how great Windows was, I was just anticipating further remarks telling me not to bother getting rid of part of my Linux partition. I apologize if my comment sounded harsh. With that said, you're right that ext3 doesn't need defragmenting to help it function correctly. I also agree that I shouldn't do any partitioning from within Windows. I use Partition Magic which is started from a boot disk so you're not in any operating system when doing the partitioning. I wanted to defrag not because my system needed it, but because Partition Magic won't resize/shrink partitions without all the data being moved to the beginning of the partition, thus the need to defrag. I would appreciate if anyone could tell me how to do this, but I've done more research on the net and it seems like it just can't be done. I apologize for not doing all this research before I posted, but I'm still open if anyone has any other suggestions.

Thanks,
Johnathan
 
Old 12-20-2003, 10:24 PM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
I've recommended Norton Ghost 2003 in the past as that is what I use for Both Windows 2000/XP ( NTFS ) and Linux ( Ext3 ) partitions. For some odd reason, people seem to discard that as an option but I haven't had any problems with it.
I put the images on a partition off to the side which is not likely to get accidently removed by me.
I use the Ghost boot floppy to create and to restore the images.
For the Linux image, I backup the root and swap partitions onto one image. That way, I don't have to worry about going into fdisk just to create a swap partition. Works great!
When I go to restore the image, I can change the size of the target partition up or down without worry if it will work or not.

All you need to do afterwords is use the linux boot floppy to restore the boot loader. In my case that would be as simple as grub-install /dev/hda because the restored image has a working grub.conf .

I find this especially handy when trying out different distributions which I am doing all the time.
 
Old 12-20-2003, 10:26 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Partition magic may be able to resize an ext2 partition without losing data. You could try first typing sync ; sync in the shell under linux to read the journal, and then boot up with the rescue disk and use fdisk to change the partition type byte to ext2. Then partition magic will work on the partition. I believe the structure of the two types of partitions are the same except for the journal which is a file.

You might want to wait for further feedback on this in case I'm wrong. Finding a non-destructive Linux tool to resize an ext3 partition may be the safest bet. However, I'm thinking that this can only be done on the root partition if it is unmounted. This implies a resizing tool on a rescue disk, or using a live-linux cd like Knoppix with a resizing tool installed.

If the Mandrake install resizing tool (written by Partition Magic) works non-destructively, you could download the first install disk, and use this tool to do the job you want.
 
Old 12-20-2003, 11:02 PM   #8
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Thanks for the suggestions. I didn't know Ghost could do that (changing size while restoring an image), but I don't have that program and this isn't so important that I need to go buy it... I just wanted to know if it could be done. And I didn't think that Partition Magic could resize ext2 partitions that weren't defragged so that data was at the beginning, but if that's the case I'll look into that (converting filesystems).

Last edited by jrdioko; 12-20-2003 at 11:04 PM.
 
Old 12-21-2003, 04:46 AM   #9
miaviator278
Member
 
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237

Rep: Reputation: 30
i have succesfully used gnu parted to resize, move, create, format, ext2, fat, and ext3 partitions

it moves the data and resizes.
 
Old 12-21-2003, 01:33 PM   #10
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I thought I heard that gnu parted won't resize ext2 and ext3 due to the fragmenting issue, but I just found this on their site:

"Note that Parted does not require a file system to be "defragged" (Parted can safely move data around if necessary). It's a waste of time defragging. Don't bother!"

I guess that answers my question! Thanks all for your help.
 
Old 12-21-2003, 04:30 PM   #11
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Partition Magic will work on ext2 or ext3 but if you have formatting your LINUX partitions with other filesystems. It will not work.

There's a resize tool for ext2 and ext3. Be very cautious on what you are doing.

I suggest backing up your data just in case something screws up or a black out occurs.
 
Old 12-21-2003, 04:46 PM   #12
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
How can partition magic resize ext2 and ext3? I use a boot disk to get into the program and then right click on the partition. For a defragged windows partition, a "resize" option appears, but it is grayed out for my Linux partition (since the data is spread all over). That's the way I understood it at least. It looks like that gnu parted will do it, but it would be even better if PM could. Is there something that I'm not seeing?

Thanks.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using partition magic to create Linux partition then install EviLBoX Linux - General 5 09-12-2008 06:01 AM
Deleted linux partition (using partition magic) Geminias General 7 10-09-2005 05:14 PM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 01:42 PM
No ext3 partition capability in partition magic.... randon Linux - General 2 10-23-2003 08:04 PM
How do I install slackware on a partition made by partition magic in windows bling bling Slackware 4 06-29-2003 12:16 AM


All times are GMT -5. The time now is 08:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration