LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-24-2004, 11:58 PM   #1
rkes7
LQ Newbie
 
Registered: Jan 2004
Location: Chennai - India
Distribution: Redhat 9.0
Posts: 2

Rep: Reputation: 0
Question 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.
 
Old 01-25-2004, 02:41 AM   #2
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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:

mkdir /home/me/documents
su
(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
 
  


Reply



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
Add Fedora to Windows Boot Sector? alexgsummer Fedora 11 02-26-2005 09:16 AM
add unallocated free space to existing disk drives!! ajaymyeg Linux - Networking 1 07-21-2004 08:17 PM
Linux doesn' boot due to lack of hard disk space ravykanth Linux - General 1 10-27-2003 03:44 PM
Hard disk failure-Sector ID not found eswarkumar Linux - General 1 01-02-2003 01:30 PM
Disk space wastage 73 GB Hard disk rajgopalhg Linux - Hardware 2 10-18-2002 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration