LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 01-04-2007, 07:44 AM   #1
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Rep: Reputation: 30
Debian install - swap partition


I am installing a dual boot system. I have used GParted to partition the hard drive divided like so:
/dev/hda1 ntfs 40 gb
/dev/hda2 ext3 71 gb
/dev/hda3 fat32 1 gb

I have installed Win2K on the nfts partition.
The fat32 partition is intended to be shared between windows and linux.
I am currently installing Debian Etch on the ext3 partition.
It is telling me that I should have a swap partition.
I don't see how to do this in the Debian installer.
How do I do this? Do I need to go back into GParted?
How big should the partition be?
 
Old 01-04-2007, 08:23 AM   #2
junme
Member
 
Registered: Oct 2004
Location: ~/.au
Distribution: Mepis Kanotix SUSE
Posts: 189

Rep: Reputation: 31
Yes you need to make a swap partition 512MB or so
 
Old 01-04-2007, 08:37 AM   #3
int0x80
Member
 
Registered: Sep 2002
Location: Cincinnati
Distribution: Debian GNU/Linux
Posts: 310

Rep: Reputation: 31
Depends on how much RAM you have and whether you will need to swap. My desktop has 2 GB of RAM, it never swaps, ergo I do not have a swap partition. My laptop has 1 GB of RAM, and occassionally swaps. It never swaps more than 256 MB, ergo the size of 256 MB for the swap partition is fine in my case. One way you can see how much you are swapping is by checking the output from /proc/meminfo
Code:
int0x80:~$ cat /proc/meminfo
MemTotal:       905916 kB
MemFree:         94136 kB
SwapTotal:      500344 kB
SwapFree:       500344 kB
Notice this machine is not swapping at all. If that behavior is consistent, then the swap partition is unnecessary.
 
Old 01-04-2007, 08:43 AM   #4
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Original Poster
Rep: Reputation: 30
Ok, so I'll create a swap partition.
How do I do it? Can I do it in the Debian intstaller? If so, how?
 
Old 01-04-2007, 09:02 AM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
When you get to the disk partitioning section of the installation, select manual partitioning. Destroy the 71 G partition and replace it with a 70 G and a 1G swap.

I would also reconsider the size of your Fat32, and replace the 70 G with a 9 G / and a 61 G /home
 
Old 01-04-2007, 10:57 AM   #6
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Original Poster
Rep: Reputation: 30
rickh, thanks for the response. some questions:

After deleting the 71gb partition, I then selected "Autmotically partition free space" and then "All files in one partition". It automagically created a 3.1 gb swap partition. Did it make an educated guess on how much I need based on my hw?

Why divide the 70g into 9 and 61?

By "reconsider the fat32 size", do you mean make it larger or smaller?
 
Old 01-04-2007, 11:45 AM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
Assuming you have a 120 GB disk, this is how I would divide it.

15 GB NTFS ... Windows
40 GB FAT32 ... Shared Windows & Linux
9 GB Ext3 ... Linux / (root)
1 GB ....... Linux swap
The rest .... Linux /home

The reason for separating /home is similar to the reason for separating OS from Data in Windows. If you get a corrupted HD, the corruption usually occurs in the OS section. Makes it possible to retrieve data from the uncorrupted Data partition.

Also in Linux, if you decide to reinstall the OS, it's easy to re-install only the OS section and keep /home which includes all your data. Same thing for Windows.

Note: Disk partitioning schemes sometimes create as much controversy as distro selection. This is my theory.
 
Old 01-04-2007, 01:54 PM   #8
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Original Poster
Rep: Reputation: 30
I am starting over with Gparted. I cannot create more than 4 primary partitions, so I have to create an extended partition. How does this look?

primary - 15gb - ntfs
primary - 25gb - fat32
primary - 9gb - ext3 (linux / root)
extended
----1gb - linux swap
----62.78gb - ext3 (linux /home)

I'm not certain whether it best to have the swap partition with the linux/root or with linux/home.

Last edited by allelopath; 01-04-2007 at 03:25 PM.
 
Old 01-04-2007, 03:34 PM   #9
Nishtya
Member
 
Registered: Feb 2004
Location: The armpit of the universe, or at least the armpit of the U.S.
Distribution: PCLinuxOS, Sabayon, Debian & willing to try any noob friendlies
Posts: 170

Rep: Reputation: 30
I remember back when I started with Debian and I came across, several times, advice to have the swap partition placed on the disk before root. I recall at least once seeing that poohpoohed recently so perhaps it is no longer so. I am still doing it myself since it is no fun to have to repartition after the install
 
Old 01-04-2007, 03:58 PM   #10
int0x80
Member
 
Registered: Sep 2002
Location: Cincinnati
Distribution: Debian GNU/Linux
Posts: 310

Rep: Reputation: 31
From http://www.pcguide.com/opt/opt/osSwapLocation-c.html

* Locate At the Front of the Disk: The physical beginning of any hard disk is the area that has the fastest data transfer, because of the use of multiple zone recording. If you put the swap file at the front of the disk, it should give better performance than putting it at the back. This is virtually impossible to do if you are leaving the swap file on the same disk as you have Windows installed into (because Windows itself will be at the front of the disk) but is easy to do if putting the swap file on its own hard disk.

Note: Remember that a hard disk can have several logical volumes. For example, if you divide a disk into two equal partitions, C: and D:, and put the swap file as the first file on D:, you aren't putting the swap file at the front of the disk because D: starts in the middle of the physical disk (C: is at the front.) This can still be a good move, however, see below.

* Locate At the Geographical Center of the Disk: Another trick for minimizing average seek time is to locate the swap file near the geographical center of the hard disk. This may be preferred in a situation where data is used all around the hard disk, and where a second physical hard disk for the swap file is unavailable. By putting the swap file in the center of the disk, the average seek distance to the swap file from a random spot on the disk is minimized. The easy way to do this is to split the disk into two equal partitions and put the swap file as the first file on the second partition (i.e., exactly what I described in the note immediately above.)
 
Old 01-04-2007, 04:18 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,283

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Don't waste your time attempting to optimize the placement of swap.
Back in the days of (small) MFM, uncached disk, there was some buy-back, but now is a pointless exercise on a typical home system.

Of all the partitions you are ever going to see, adding (or moving) swap partitons is the most trivially easy. Even if in use.
And of course, under 2.6 swap files perform as well as swap partitions.

The article referenced above is old, and windows specific.
 
Old 01-04-2007, 05:07 PM   #12
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Original Poster
Rep: Reputation: 30
In the debian install, there is a 'bootable' setting.
Do I want to make the ntfs and linux/root partitions bootable?
 
Old 01-04-2007, 06:19 PM   #13
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
Only the Linux /

Assuming you already have Windows installed in the ntfs partition, don't touch it during the Linux install, other than to write Grub to the MBR.
 
Old 01-04-2007, 06:39 PM   #14
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Original Poster
Rep: Reputation: 30
ok, got that working. Debian is installed, Xwindows not working though ... off to search the internets.
 
  


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
Can I install linux without a swap partition? jbeedham Linux - General 26 11-16-2010 02:58 AM
How to start debian install cd with a predefined swap partition? stormrider_may Debian 5 03-07-2006 05:10 PM
Swap partition not available/on on Debian sarge JoeneB Linux - General 5 01-26-2006 04:46 AM
swap partition not mounted after Debian installation codeape Linux - Hardware 4 02-12-2004 03:11 PM
RH 7.2 install and swap partition hedstrom Linux - Software 2 12-31-2001 10:20 PM


All times are GMT -5. The time now is 09:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration