LinuxQuestions.org
Review your favorite Linux distribution.
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 03-08-2004, 10:23 AM   #1
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Rep: Reputation: 34
Partitioning advice for a non-newbie


I've read a lot of different guides to partitioning under Linux, every one of them seems to be different, and none really apply to how I want to use my system.

I looked through quite a number of threads here on LQ on that subject, and while it seems to be one that pops up quite frequently ("OMG! Im a n00b and i dont no hwo 2 partition mi b0x! kthx!" ), I'm still not quite sure how I want to do this.

I have one Slackware box already (and it dual-boots with Win2k), so I'm familiar with the concept of partitioning, dual-booting, and setting Linux up on a machine.

I'm about ready (I think) to take the plunge and repartition my Toshiba Satellite 1905s laptop and put Slack on it. I'm really looking forward to seeing how it runs on it, and I'm just about ready to repartition.

But, I'm not positive how I want to do it and I was hoping some of you fine people would have some good suggestions.

Here's the hardware that's relevent to my partitioning question:

512mb RAM
40gb hard drive


Windows 2000 I use for gaming and some other fairly large programs, so I'm thinking about 10gb for Windows 2000.

The Slackware part I'm not sure of yet. Here's one idea I've had for it:

/swap -> 256mb
/boot -> 10mb
/ -> 2gb
/home -> 5gb

And the rest of the hard drive I want to make FAT32 shared data between Slack and Windows.

I've yet to find a hard fast rule of thumb for /boot partition size, so I'm clueless on that one... the / and /home partitions I would like to keep large enough so that I don't run out of room eventually, so I figure 2 and 5 gigs respectively should handle that pretty well. My experience with swap partitions is limited to my other Slackware box, which I have hardly seen USE the swap space, so I'm not too concerned about that either.

I've read a number of guides that suggest making /usr a separate partition, but those vary wildly on size and necessity. Should I consider making a /usr partition on this machine, and if so, how big should I make it given my system?

How would you partition the rest of this drive (if it were yours) and why?

Last edited by Melkor; 03-08-2004 at 10:25 AM.
 
Old 03-08-2004, 10:35 AM   #2
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
One thing that I see that may not be the best for you is your /home partition. Since you are dual booting and you will have a fat32 parition to share data in, then you could move anything you download, create, or what-have-you to a directory in you fat32 partition. That way you don't have to worry as much about space when adding programs to your system and whatnot. Plus you easily can access the stuff on both OS's.
What I do is leave the /home directory in the / parition and move all my downloaded/created stuff to my /mnt/data/LinuxStuff directory.
 
Old 03-08-2004, 10:35 AM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I would do 256MB of Swap, like you have
50MB ext2 for /boot (I always keep a few kernel images around)
5GB reiserfs for /
10GB reiserfs for /home
14.6 GB FAT32 for shared partition


In reality I probably wouldn't even bother with a shared partition, but I wanted to keep with your theme. I'f it were truely my system it would look more like this:

256MB swap
50MB ext2 for /boot
15GB reiserfs for /
24.6GB reiserfs for /home
 
Old 03-08-2004, 10:49 AM   #4
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Original Poster
Rep: Reputation: 34
Thanks for the (very prompt) responses.
Quote:
Originally posted by jtshaw
I would do 256MB of Swap, like you have
50MB ext2 for /boot (I always keep a few kernel images around)
5GB reiserfs for /
10GB reiserfs for /home
14.6 GB FAT32 for shared partition
50MB for boot sounds good to me... my other Slack box I think I made my boot partition 200MB (mostly because I had no idea what I was doing and didn't want to make the mistake of making it too small), which I figured was too big, but 50MB should give me some breathing room.

I've read that in doing upgrades it can be advantageous to have /home on a separate partition so that it's not affected.... does that go for /usr as well?

I'm kind of confused about the pros/cons of that. I see a lot of people splitting /usr off, but I'm just not sure why that would be a good idea.

To keep things simple, I prefer to make fewer rather than more partitions.


benjithegreat98, you're probably right as far as not needing that much space for /home, particularly since I'll be using the FAT32 shared partition for data and storage... I'm just not sure about upgrades and other things that I might want /home to be separate from root for. I could probably drop /home to 2 or 3 gigs instead though, considering.

My other Slack machine is set up with /home as a part of the root partition, which is only about 4 and a half gigs. On that machine I have a separate physical 30gig drive that's all formatted into one big 30gig FAT32 partition, and that's where I keep pretty much everything from both Windows and Linux on that box... that seems to work pretty well so far, so I probably don't need much space for /home... but I do think I want it separated from the root partition.
 
Old 03-08-2004, 09:07 PM   #5
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Original Poster
Rep: Reputation: 34
All right... I understand the need for an extended partition for dividing up a hard drive into more than 4 chunks.

But how the heck do I create one?

Whenever I try to, all I get is "cannot change FS type to extended" in cfdisk.

I've been looking all over the place and nobody seems to be having this problem but me.
 
Old 03-09-2004, 08:36 AM   #6
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Original Poster
Rep: Reputation: 34
Okay, I got it partitioned, but I don't understand why I had to do it this way.

This is how it looks now:


/hda1 NTFS (Windows 2000)
/hda5 linux boot
/hda6 linux swap
/hda7 linux root
/hda8 linux /home
/hda9 FAT32 (shared)


Everything after hda1 is a logical partition.

Two questions:

1. I thought that in order to have more than 4 partitions period, there needed to be an extended primary partition that contained the rest... is that NTFS partition an extended partition that just doesn't look like one in cfdisk?

2. Why the heck did it go from "hda1" to "hda5"?


Everything seems to be working fine on this laptop (see my success story in "Member Success Stories"), but I think I don't understand what I had to do where partitioning is concerned.
 
Old 03-09-2004, 09:00 AM   #7
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
1. You can have 4 partitions on a Hdd. In order to have more you need to have 3 primary partitions and a 4th extended partition which will contain the other partitions. Your NTFS partition is a primary partition. Everything else is in the extended partition.

2. The jump from 1 to 5 occured because you have your first primary parition (hd1), then you scipped the other primaries (not that there's anything wrong with that) (hd2-hd3) and went to the extended. Your 1st extended partition is hd5 and increments up based on that. I guess the extended partition as a whole would be hda4, but there's no need in showing that.

An alternative could have been
/hda1 NTFS
/hda2 boot
/hda3 swap
/hda5 root
/hda6 home
/hda7 fat32

In this case you have 3 primaries, ntfs, boot and swap. Everything else is in the extended partition.

What you have is fine.

Last edited by benjithegreat98; 03-09-2004 at 09:02 AM.
 
Old 03-09-2004, 09:02 AM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I don't know right off hand any way to hide an extended partition. If you do a fdisk -l /dev/hda the extended is likely /dev/hda2 and of the type 5 or db.
 
Old 03-09-2004, 09:34 AM   #9
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Original Poster
Rep: Reputation: 34
That's the thing though... I wasn't able to make an extended partition. At ALL. It refused to.

hda5 thru hda9 are all logical partitions.

So what you're saying is that hda2, hda3, and/or hda4 are there, but hidden from cfdisk, and one of them is an extended partition?

WTF? Why bother having "extended" as an option in cfdisk if it can't create one or even SEE one?
 
Old 03-09-2004, 09:49 AM   #10
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Far as I know it's there, has to be. Maybe you could double check with linux fdisk.
 
Old 03-09-2004, 10:09 AM   #11
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Quote:
Originally posted by Melkor
That's the thing though... I wasn't able to make an extended partition. At ALL. It refused to.

hda5 thru hda9 are all logical partitions.

So what you're saying is that hda2, hda3, and/or hda4 are there, but hidden from cfdisk, and one of them is an extended partition?

WTF? Why bother having "extended" as an option in cfdisk if it can't create one or even SEE one?
You did make extended partitions..... hda5-hda9 are extended.
hda1 - hda4 are reserved names for your 4 primary partitions. hda5 on up are the reserved names for your extended partitions.

Nothing is hidden from you. If you don't have a 2nd primary partition, then hda2 will not show up.
 
Old 03-09-2004, 11:21 AM   #12
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Original Poster
Rep: Reputation: 34
Quote:
Originally posted by benjithegreat98
You did make extended partitions..... hda5-hda9 are extended.
hda1 - hda4 are reserved names for your 4 primary partitions. hda5 on up are the reserved names for your extended partitions.

Nothing is hidden from you. If you don't have a 2nd primary partition, then hda2 will not show up.
But I didn't make hda5-hda9. That's what I'm trying to say.

I made hda1 with the Windows 2000 install CD. Left the rest unpartitioned. Installed Windows on the 10 gig NTFS partition that the Windows 2000 install CD created.

Booted from the Slackware installation CD. Tried to make an extended partition. Got the "cannot change FS type to extended" error.

I gave up, since it wouldn't let me create an extended partition. Tried making logical partitions instead of an extended partition and it let me do that.

Did something get made all on its own as far as an extended partition goes? I'm not getting the process here. I was under the impression that one had to create one manually, but it wouldn't let me do that.


EDIT

Sorry if I keep harping on this, but it's rather frustrating. I have no idea why it wouldn't let me create an extended partition no matter how I tried, and even less idea how THREE of them got on there without my being able to successfully create even one after 45 minutes of fighting with it... or why it wouldn't show any of the three even though they are obviously there.

I'm thinking I don't like cfdisk very much anymore....

Last edited by Melkor; 03-09-2004 at 11:30 AM.
 
Old 03-09-2004, 02:09 PM   #13
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Oh I think I see what you mean now. Are you used to using a program like Partition Magic, where you designate your extended partitions area and then put the extended partitions within it? fdisk does not work that way (I prefer fdisk over cfdisk). All you have to do it make the partition and designate it as extended or primary when you create it. I don't use cfdisk, but in fdisk when you create a new parition the very first thing it will ask if it is primary or extended. cfdisk must default to extended for some reason (just a guess). Every partition you created was an extended partition. You can tell by the numbering scheme. 1-4 is primary 5 - <max num> is extended.

edit: saw something else in your post. I think that logical and extended partitions are the same thing... I'll check up on that and see.

Last edited by benjithegreat98; 03-09-2004 at 02:12 PM.
 
Old 03-09-2004, 02:40 PM   #14
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Original Poster
Rep: Reputation: 34
Quote:
Originally posted by benjithegreat98
I don't use cfdisk, but in fdisk when you create a new parition the very first thing it will ask if it is primary or extended. cfdisk must default to extended for some reason (just a guess). Every partition you created was an extended partition. You can tell by the numbering scheme. 1-4 is primary 5 - <max num> is extended.
In cfdisk you hit "N" for "new" to create a new partition. Then you enter in what "type" it is from a numeric list. "Extended" is on the list as "05".

When entering any type -- whether it was Linux swap, FAT16, FAT32, NTFS, whatever -- it will create an entry in the partition table of that type.

EXCEPT if you pick "05" ("Extended"). It would spit about it, saying "cannot change FS type to extended". That's why I was confused.

I'm thinking that there was already somehow an extended partition on the disk, or that Windows 2000 creates the partition it resides on as an extended partition by default -- and that cfdisk just doesn't show you that information.

That would explain why I was able to create as many logical partitions after the NTFS one as I wanted, even though it didn't appear (from within cfdisk) that everything was set up the way it should have been.

I think I'll be going back to using fdisk from now on. I figured I'd go out on a limb and try cfdisk to see how it worked, and I'm not too impressed... it confused the hell out of me and I'm still not totally sure what exactly it did.

Thanks for your suggestions though.

Last edited by Melkor; 03-09-2004 at 02:42 PM.
 
Old 03-09-2004, 06:19 PM   #15
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Melkor - for Linux, the file types you want to use are 82 (for swap) and 83 (for Linux native) -- you would not want to use file type 05. cfdisk gives you a wide range of choices, some of which run over to a second page, and it's possible that you might not have navigated over to that second page. (FWIW benjithegreat98's comments about how primary and logical paritions are numbered are spot on, nicely done.)

Anyway, based on your description, it sounds like you were trying to change the file type of a partition after it was created (which threw the error message) and what you'd need to do instead would be delete the partition first, then recreate it under the correct file type. That's just a guess, but it seems it would fit your description pretty well.

If you've got everything working the way you like then I'd leave it alone, but perhaps if you've got an extra PC for experimenting, you might want to give cfdisk another shot. Personally I think cfdisk a lot better than fdisk, although it does take a little getting used to. -- J.W.
 
  


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
Advice on partitioning simcox1 Mandriva 4 04-25-2005 09:44 AM
newbie advice partitioning 160Gig harddrive will only have suse 9.2 on it samspade SUSE / openSUSE 9 12-23-2004 12:02 AM
Need partitioning advice lancelott Linux - Newbie 1 06-11-2004 05:12 PM
NEED HELP! Partitioning Advice Hesperuax Linux - Newbie 1 04-06-2003 05:23 PM
Partitioning advice booyabazooka Linux - Newbie 6 04-05-2003 02:10 PM

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

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