Click to See Complete Forum and Search --> : partioning hard drive


Degrado
04-24-2001, 08:08 PM
i've ordered the 7.1 version of red hat(cheapbytes!) and while i'm waiting i've been doing some research on different ways to partion your hard drive(i've never used linux before or seen it running but it looks neat ;) ). i have a 27.9 gig hard drive and want to dedicate 17.9 of it to windows 98 and the rest to linux. i want to start my windows partion from scratch so i'm going to format that first (i've read reinstalling windows after installing linux does something to lilo). Would the best way to partion my drive be using gnu parted, fdisk, the included disk druid, or another? Also please tell me about this partioning scheme.
1) 17.9 gig partion for windows
2) 32 megs for /boot partion, the kernal
3) 128 megs for swap partion (i have 128 RAM)
4) use the rest of the drive for the root partion? or use like 2.4 GB for the root partion to install all the packages.
5) doesn't my home directory go in this partion so that i can seperate my custom files from the red hat install so that re-installation is painless? i don't know how this would look or how the \usr\home_directory thing works

and last, how would the system of hda1, hda2 etc..., need to look like? i'm assuming the boot partion has to be hda1 but i'm confused with the presence of windows.

mucho thanks in advance from the newbie that wants to be prepared :)

FallNAngel
04-24-2001, 08:34 PM
well, I'll give the problem a shot. I haven't installed windows then linux yet, but I'll give you what advice I can. First off, you don't need 32MB for the /boot partition. I have 7 which will easily hold 3 or 4 kernels (more than enough). 10 wouldn't be too bad though. Also, just so you know, the more RAM you give linux, the more linux will use. If you give it 256MB, it'll probably use it all (it will use some to cache info). Since you're just starting out, going with one big root partition won't be bad. Though when you get more advanced, I would suggest you get used to using separate partitions. This allows you to format partitions, but still keep some info.
So, if you were to put a 5GB partition for var and a 10GB partition for root (just throwing out numbers), then you could delete your root partition, but still keep the files in /home for the next time you install. All of your user files are stored under /home btw.
Linux does not organize it's filesystem with drives. There is no C and D drive. There is just a file "tree" it starts with the root filesystem and branches from there. It's hard to imagine, but it makes sense once you see what I'm talking about
As far as what would the system of hda1, hda2, etc look like? well, that depends on how you partition the disk. I would suggest doing this:
[device] [mountpoint] [size] [filesystem]
/dev/hda1 /boot 10MB ext2
/dev/hda2 none(for win) 17GB vfat (fat32)
/dev/hda3 / 8GB ext2
/dev/hda4 <-- make this a extended partition
/dev/hda8 none(swap) 128MB linux-swap
/dev/hda9 /home ~2GB ext2

You may run into problems with this setup however. I'm not sure if windows will install on a partition that is not the first (hda1).

Hope that helps a little

DMR
04-24-2001, 09:23 PM
Check out the multi-partition NHF (http://www.linuxnewbie.org/nhf/intel/installation/partition/multi_partition.html). It discusses the pros and cons of different schemes, and gives an example layout you can use as a guideline. Personally, I'll go with Fallnangel on the separate partition advice.
i've read reinstalling windows after installing linux does something to liloYes, Window$ will rewrite the Master Boot Record, wiping out LILO. Not such a big deal really, you can boot from your Linux floppy and rerun LILO to get it back.
As fallnangel mentioned, Windows may want to live on the first primary partition of the primary master drive.

bdg1983
04-25-2001, 06:38 PM
Dammit, I've been sentenced to an eternity of Junior Grasshopper-ness

And you deserve every bit of it. ;) ;)

How I usually partition my drives for Win/Lin and to avoid any of the 1024 cylinder limitations is,

WinME - Fat32 - 750MB
Win98 - Fat32 - 750MB
W2K - NTFS - 1GB
Linux1 - ext2 - 2.5GB
Linux2 - ext2 - 2GB
Linux Swap 128MB
Multiple Fat32 Logical Partitions for Apps, Data, Games, CD Images etc.

The first 3 partitions are primary, while the ext2, swap and multiple fat32's are all logical. All my Win* applications are installed in the 7GB apps fat32 logical partition under 'Program Files ME', 98, W2K. Keeping the ext2 partitions under the 1024 cylinder helps to minimize any complications.

Works for me and I use BootMagic for the 5 os's.

Craig McPherson
04-25-2001, 07:08 PM
Okay, I've been dubbed the resident partitioning junkie, so listen here for a second.

You don't need a /boot partition. Nobody should have one. Your root partition should be a primary partition on the first disk drive. If you do this, you don't need a /boot parition. Anybody who has one is a Communist. Sorry, that's the way it is.

You MUST have a seperate /var partition. If you don't have one, you're wide-open to extreme denial-of-service attacks. Anyone will be able to disable or destroy your system over the Internet, no questions asked.

You do NOT have to have a seperate swap partition. It's optional. You can use a swap file instead and it'll just work as well. If you have a ton of disk space, it's a good idea, though.

Seperate /home and /usr partitions are optional.

Partitioning is an area where 92% of this community seems to be mostly clueless, so be careful of any advice you read here. Let me know if you have any other questions and I'll be happy to help.

FoBoT
04-25-2001, 07:25 PM
Originally posted by Craig McPherson:
<STRONG>You MUST have a seperate /var partition.

Partitioning is an area where 92% of this community seems to be mostly clueless</STRONG>

FoBoT raises hand

hey, how do i know how big to make /var ??
what type of stuff goes into it?

Degrado
04-25-2001, 07:57 PM
Thanks for the input guys, i think i've got it. I opted not to go with a seperate /usr and /home because i wasn't quite sure how much space those needed(let me know how much you all use in those directories. and for example, would programs like gimp be installed in /use while say mp3s go in /home?). I still haven't done it yet so theres still time to fine tune it. I'm wondering how the bios knows to boot from /boot when root is in the first sectors. Or does lilo inside the MBR sort things out? I think i'll be ok being past 1024 cylinders on this because i read on the lilo page that freshmeat.net has "FINALLY!! The 1024 cylinder limit has been broken. At least on post-1998 motherboards. But still, it's one giant leap for linuxkind. Well done fellas." cause i bought my computer in early november. what i'm going to do about installing this is format everything with disk druid, then set up my partions and installing redhat. then install windows, then re-install lilo after windows deletes it. though i've heard that disk druid won't let you make any kind of partioning scheme violating the 1024 cylinder thing even though new bioses allow it so i might have to learn f-disk. no biggie. well heres what i plan to do so far:

hda1 = / 10 gigs
hda2 = Windows 98 15 gigs
hda3 = (extended partition)
hda4 = none
hda5 = swap 128 megs
hda6 = /var 250 megs

Craig McPherson
04-25-2001, 07:59 PM
Well... if you have a gigantic disk, go ahead and make it 1GB or so. That should probably be more than enough for anybody.

If you don't have space to burn, make it proportionally smaller, but I wouldn't recommend making it smaller than a few hundred MB, unless you're very carefull to turn down the level of logging.

Debian systems should have a /var larger than that, because that's where package files go after downloading -- they're deleted from there after they're installed, but during an upgrade they can take up a lot of space.

/var is the place for anything that's allowed to change or be added to during normal system operation -- log files, mail spools, newsfeeds, temporary files, etc. It's the only part of the system that strictly HAS to be writeable. Many administrators mount their / and /usr partitions as read-only, because nothing there should change during normal system operation, only during upgrades.

uriah.k
04-25-2001, 09:11 PM
A tool you might also want to try is partition magic.(dos version) I have it uploaded and availible to download from the page: http://www.nettrash.com/users/uriah/pqmt.html
(its one file, 372 kb)
BTW, in the setup process of a linux install is when you make the hda partitions.
hda stands for hard disk a and hda1 would be partition one on hda. sd(a) is used for scsi hdd(hard disk drives) and hd(a) is used for ide hdd. I put the a like so(a) because its a variable. I have two physical
ide hdd, so the first one is called hda and the second is called hdb.

Degrado
04-26-2001, 07:04 AM
where can i find information on partion magic for dos?

Molecule Man
04-26-2001, 09:06 AM
In addition to /var one should relly have a seperate /home /usr /usr/local.

Assuming you have 10 gigs for linux a typical partioning scheme might go like:


swap- 256mb
/ - 1.5gb
/usr -3gb
/tmp -500mb
/var -500mb
/usr/local -2gb
/home -2.5gb

The numbers can be massaged a bit, but that should work pretty well for starters.

bdg1983
04-26-2001, 06:53 PM
where can i find information on partion magic for dos?
www.powerquest.com (http://www.powerquest.com)

bdg1983
04-27-2001, 10:20 AM
A tool you might also want to try is partition magic.(dos version) I have it uploaded and availible to download from the page: http://www.nettrash.com/users/uriah/pqmt.html

Nice to offer, but highly illegal. I would advise against this practice. If you want a commercial package, then buy it. If not, then use freeware. There are some very good ones available at freshmeat and others.

Be warned. Sensei and Strike will delete the url you posted and you could loose your membership at LNO. We wouldn't want this to happen, would we?

If you want to pirate software, then fine as it's up to you. Please don't advertise the fact.