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 04-06-2002, 01:03 PM   #1
Rotten Deadite
LQ Newbie
 
Registered: Mar 2002
Posts: 14

Rep: Reputation: 0
Resizing partitions... with a twist


So I installed Linux and Windows on my laptop, but I'm beginning to discover that I use Windows less and less every day. So I wanna delete my Windows partition, and expand my root linux partition to reclaim that space.

Here's my partition information:
/dev/hda1, from 1 to 381, FAT32.
/dev/hda2, from 382 to 993, Extended
/dev/hda3, from 382 to 960, Linux
/dev/hda4, from 961 to 993, Swap

What I wanna know is, is it possible to delete that FAT32 partition and resize hda3 to take up the available space? Or should I just backup a few files and repartition the whole drive?
 
Old 04-06-2002, 01:09 PM   #2
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
Partition Magic
 
Old 04-06-2002, 01:15 PM   #3
Rotten Deadite
LQ Newbie
 
Registered: Mar 2002
Posts: 14

Original Poster
Rep: Reputation: 0
Okay, but how about a FREE solution?
 
Old 04-06-2002, 01:24 PM   #4
deezay
Member
 
Registered: Mar 2002
Distribution: mandrake 8.2, win98
Posts: 76

Rep: Reputation: 15
what distro do you have? you may want to snoop around and see if there's some file tools in there. i know mandrake 8.2 has one. and i did something similar to what you are doing, but it was before i put anything on my ext partition. i partitioned with partition magic and then booted from a mandrake cd, and i didn't have enough space on my ext partition, and it let me alter that.... but i really can't remember if it formatted it or not... sorry
 
Old 04-06-2002, 01:36 PM   #5
Rotten Deadite
LQ Newbie
 
Registered: Mar 2002
Posts: 14

Original Poster
Rep: Reputation: 0
Well, I've got Red Hat 7.2. I've looked around with Google and I haven't found much information on this. ext2resize seems to be able to do it, but the documentation's really sparse.

I'd feel more confident about this if I were resizing my primary partition (the FAT32 partition) to take over the entire drive.

Partition Magic is really the best idea, but I'm poor so I can't afford it
 
Old 04-06-2002, 02:35 PM   #6
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Have you looked into gnu parted? It may do the job for you. If you can't seem to get things right, feel free to email me and ask for help...
 
Old 04-06-2002, 10:43 PM   #7
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
If I was you I'd format the fat32 partition and move /home to it.
 
Old 04-08-2002, 05:22 PM   #8
Rotten Deadite
LQ Newbie
 
Registered: Mar 2002
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Aussie
If I was you I'd format the fat32 partition and move /home to it.
Sounds like a good idea... how would I do that? And, is there a way to ensure that programs will install to that directory only, instead of scattering themselves to /usr/share/doc, /usr/bin, etc.?
 
Old 04-08-2002, 05:34 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
first use cfdisk/fdisk whatever to change the type of the partition to ext2. then format it using:

mke2fs /dev/hda1

that's it really. you'll then need to graft which ever partition over onto it, but i don't wanna explain it all, have a search, or wait for someone else to tell you! if you can use ext3 add a -j to the mke2fs command and that'll automatically make it ext3. then just edit your /etc/fstab

oh and stuff partition magic. no need. ever. Mandrakes installation cd is really handy at times tho. diskdrake is really good for resizign and stuff.

as well as making a /home or /usr (i'd recommend moving /usr personally, but that depends how big your partitions are) being easy, it's also safer, as you'll not alter the partition references, which can be no end of trouble.

oh and as for that scattering thing... everything goes where it does for a reason. but having a dedicated /home or /usr will not cause any trouble like that. if one thing is heading towards /usr/bin, everything else will likely go somewhere in /usr with it...

Last edited by acid_kewpie; 04-08-2002 at 05:36 PM.
 
Old 04-08-2002, 06:34 PM   #10
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
You can direct where programs compiled from source install by using the --prefix switch with ./configure, do "./configure --help" to see the options for a particular program.
 
Old 04-08-2002, 06:47 PM   #11
Rotten Deadite
LQ Newbie
 
Registered: Mar 2002
Posts: 14

Original Poster
Rep: Reputation: 0
Hmmm... an interesting turn of events...

I deleted my MSDOS partition with Partition Magic, but now parted and nparted report my table geometry like this:

/dev/hda: IDE-FUJITSU MHC2040AT(128-63-993 512MB/sec) 3909Mb
/dev/hda-1: free Cil:(1-382) 1500MB
/dev/hda1: primary Cil:(382-960) 2279MB ext3
/dev/hda2: extended CIL: (961-993) 129MB
/dev/hda5: logical Cil:(961-993) 129MB linux-swap

Now, what the hell is up with that hda-1? I can't format it 'cause mke2fs doesn't recognize anything called /dev/hda-1...

I'm getting the impression that I should just reformat this entire installation and start from scratch.
 
Old 04-08-2002, 06:52 PM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
see.. now you *REALLY* should follow instructions. you shouldn't have deleted the partition. only change the type. you've no reason to use apps like parted. you ONLY need fdisk and such.

you should be ok you recreate the partition as ext2 and everything should fall back into place. as you'ev deleted it, the partition number have changed, no handy.

preusmably hda-1 means hda minus one, implyign it's not a partition. not seen it before tho.
 
Old 04-08-2002, 09:20 PM   #13
Rotten Deadite
LQ Newbie
 
Registered: Mar 2002
Posts: 14

Original Poster
Rep: Reputation: 0
I've been looking through the man entries for fdisk and sfdisk and I haven't seen anything about renaming partitions as ext2... am I missing something obvious here?
 
Old 04-08-2002, 09:28 PM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
heh, yes.

cfdisk:
t Change the filesystem type. By default, new partitions are created as Linux partitions,
but since cfdisk can create partitions for other operating systems, change partition type
allows you to enter the hex value of the filesystem you desire. A list of the know
filesystem types is displayed. You can type in the filesystem type at the prompt or
accept the default filesystem type [Linux].

just run cfdisk, and you'll get a usable interface.
 
Old 04-08-2002, 09:57 PM   #15
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
In cfdisk you go to "type" to change a partition.
 
  


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
Resizing Partitions dokunut Linux - Newbie 2 06-18-2005 08:56 PM
Resizing Partitions ece30675 Linux - General 3 12-12-2004 07:47 PM
Automounting Samba partitions with a twist PiMoGo Linux - General 1 11-06-2002 09:35 PM
Resizing partitions..can it be done? dj_relentless Linux - General 5 01-27-2002 05:16 PM
resizing partitions suselinux Linux - General 7 09-07-2001 07:28 AM

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

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