[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Good fdisk Practices



On Fri, Aug 24, 2007 at 08:10:41AM -0500, Martin McCormick wrote:
> 	It appears after reading the fdisk manual, that it is
> best to put swap on whats left of the disk after calculating
> one's other partition needs. The boot image should end up in the
> lowest sector numbers. Do I understand this right?
> 
> 	I am about to reformat a 20-gig hard disk on a
> 5-year-old Dell laptop that used to run Windows XP. You might
> say, I am giving it a whole new outlook.
> 
> 	The present fdisk report for /dev/hda shows a 32-MB
> partition 1 and a 19-gig partition 2. I think I will probably
> make it 19-gigs for partition 1 and 512 MB for partition2 since
> the system has 256 K of RAM. Partition 1 will be Linux and
> partition2 will be swap.

A few thoughts:

With badblock remapping, you never really know where on a drive a block
is.

I like to have separate filesystems to prevent some runaway of hosing
the system.  / 300 M, perhaps a separate /boot of 32 M, /usr 3 G, /var
3G, then separate /home and perhaps /srv for things like chroots and
mirrors.

If you want to be able to resize them, use LVM even though you only have
one drive.  You can put swap on LVM.  While you're at it you can encrypt
swap too.  Since its a laptop, you could encrypt the /home directory
(password provided at boot up) and put /tmp on tmpfs so its encrypted by
swap as needed.

All this can be done by the standard Etch installer.

As for swap size, don't just go by a simple 'double of ram' formula.  Go
to an existing Debian system and start up all the apps you usually run
concurrently, including the biggest app (e.g. Iceweasel with lots of
tabs open).  Run top in an xterm and look at how much memory + swap is
used and this becomes your memory footprint.  Add 20%, subtract the 256M
(hopefully not K) and you have the size of your swap.

If swap is on LVM, you can resize it as needed.

Good luck,

Doug.



Reply to: