Add Hard disk for swap space with problems in boot sector
I have a 17GB hard disk with problems in its boot sector, discovered while reinstalling win98, so purchased a new HD & hv installed both win98 & Linux, would like to know whether the old one can be used for swap space for linux? I am a newbie to Linux, so would like to advice the procedure also if possible.
17 GB is a _LOT_ of swap space, but yeah, you could do it. In fact, if the only error is in the boot sector (I assume you mean the MBR) then you can set up the drive with normal linux partitions. First, install the drive in your computer. Then, type "fdisk /dev/hdX" at a command prompt where X is the letter corresponding to your hd. Set up your partitions however you want. To create a filesystem, type "mke2fs -j /dev/hdXY" where Y is the partition number you want. To create a reiserfs filesystem (better than ext3, IMO, but i'm not sure if RedHat supports it out of the box), type "mkreiserfs /dev/hdXY". To set up swap space type "mkswap /dev/hdXY" followed by "swapon /dev/hdXY"
Now you need to mount your partitions. Create some directories where you want to mount partitions. Here is what I would type, but you can change it to suit your needs:
(it asks for root password)
mount /dev/hdXY /home/me/documents
nano -w /etc/fstab
Now add these line to /etc/fstab:
/dev/hdXY /home/me/documents reiserfs UID=yourUid,GID=gidForUsers 0 0
/dev/hdXZ none swap sw 0 0
You can check the values of "yourUid" and "gidForUsers" by typing "id" (make sure you AREN'T logged in as root to do this)
Now your partitions are set up and they should mount automatically at boot.
PS double your RAM is the max useful amount of swap to have. If this is unclear, feel free to ask questions
|All times are GMT -5. The time now is 11:17 PM.|