|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
Join Date: Oct 2004
Location: Somewhere in Malaysia...
Posts: 953
|
Swap file required?
Oh, I just installed a Damn Small Linux (DSL) in one of my old comp, and it's even good for a 200MHz computer.
But should I make a Linux Swap-file partition in the cfdisk? How can I make the installed Linux in my HDD to use the Swap-file partition? I made one, but not sure whether the operating system itself utilises the Swap-file as well. Or is it not required at all?
|
|
|
|
|
|
#2 |
|
Member (5 bit)
Join Date: Aug 2003
Posts: 20
|
I forget how to use cfdisk.(though it's not hard) But you can do the same thing with fdisk (the one provided with a Linux distro NOT WINDOWS/MSDOS. There is a difference)
Type the following [CODE]'ed commands: I believe on DSL, to become in console, you just type the following (if not, it shouldn't be hard to figure out; read their documentation) Code:
# sudo su /dev/hda1 /dev/hda2 /dev/hda3 There is no difference in the naming scheme if you make one some filesystem or a swap partition. So now type the following, but change the drive name to the one that you want to install a swap partition on. (note: if you want to resize a partition, you'll be better off using GParted that is either on an Ubuntu (6.06 or later), or GParted organizations own live cd. Both free.) For the remainder of this tutorial, I'm going to use /dev/hda as the drive I want to edit, but change if necessary! Code:
# fdisk /dev/hda Code:
geotop george # fdisk /dev/sda The number of cylinders for this disk is set to 7113. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): Code:
geotop george # fdisk /dev/hda The number of cylinders for this disk is set to 7113. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/hda: 58.5 GB, 58506416640 bytes 255 heads, 63 sectors/track, 7113 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): NOTE: If you want to EXIT at ANY TIME WITHOUT SAVING CHANGES. Press and hold ctrl and while holding, pressing c... a couple times if necessary. Assuming it is a blank drive, or have space, type `n' to go through the procedure to create a new partition: Code:
Command (m for help): n Command action e extended p primary partition (1-4) Code:
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-7113, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-7113, default 7113): +512M Command (m for help): Code:
Disk /dev/hda: 58.5 GB, 58506416640 bytes 255 heads, 63 sectors/track, 7113 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 63 506016 83 Linux Command (m for help): You need now to type `t' to change the type of a partition. If you had more then one partition, it would ask you to choose the partition number, but since there is only one in this example, it defaults to the only one. When asked for the `Hex code' type 82 for Linux Swap. Enter `p' once again and you shall see (maybe more or less) the following: Code:
Command (m for help): t Selected partition 1 Hex code (type L to list codes): 82 Changed system type of partition 1 to 82 (Linux swap / Solaris) Command (m for help): p Disk /dev/hda: 58.5 GB, 58506416640 bytes 255 heads, 63 sectors/track, 7113 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 63 506016 82 Linux swap / Solaris Command (m for help): You should be back at the command line. Now you need to make the swap partition into an actual swap partition that can be used. Type the following for the drive AND the partion number of that drive that is going to be used as swap: Code:
mkswap /dev/hda1 You now have a working swap partition. DSL has it's own way to install DSL... I haven't used DSL since 0.6.1 so it's been a while and it sorta left my mind. It's like `hdinstall', but really, read the doc found on DSL's web site and you should be fine. If you need to have your swap partition activated at some time with any distro, type the following: Code:
swapon /dev/hda1 Hope this helps. |
|
|
|
|
|
#3 |
|
Member (10 bit)
Join Date: Oct 2004
Location: Somewhere in Malaysia...
Posts: 953
|
Thanks, I did that in the DSL and finally got it working fine with the swap thingy.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Computer Acronyms | Floppyman | Computer Hardware | 156 | 06-18-2006 06:25 AM |
| External Dvd Burner Not Working | PreDeadMan | Computer Hardware | 1 | 09-17-2005 03:48 PM |
| Swap file size? | AzCoastie | Windows Legacy Support (XP and earlier) | 8 | 01-18-2003 07:32 PM |
| Partitioning with Unattended Installation (XP Pro) | catch23 | Windows Legacy Support (XP and earlier) | 6 | 10-01-2002 12:16 AM |
| swap file... | TazZ_Nc | Windows Legacy Support (XP and earlier) | 5 | 09-20-2002 03:09 PM |