LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2004, 01:55 AM   #1
BarkingBonefish
Member
 
Registered: Feb 2004
Posts: 52

Rep: Reputation: 15
SWAP partition fix needed for funky configuration


First I will explain the configuration and how I got there, and then the problem.

Machine is Dell C840 with 60gb primary and 40gb modular. Wanted dual boot, XP on primary already, and RH9 on secondary. Did not want to mess up the XP bootloader, as installing new BL would prevent me from removing secondary drive (modular bay) and still be able to boot to XP (I am migrating to Linux, just going to take a while). I tested GRUB - when I removed the Linux install on the mod drive from the bay and rebooted, GRUB hung every time. And could not create boot disk, as can't have floppy and HD in mod bay at same time, so LILO chainload was out too. Plus, I wanted the independence of two opsys, two drives, in case a drive failed I wasn't out of work for a day and a half rebuilding it.

So, I physically dismantled the drive bays, stuck the secondary drive in the primary bay, re-initialized it during the RH9 install, then switched them back. Now I have MBRs on both disks, and I can quick change the booting drive from BIOS when powering up. They are completely independent of each other, but each work fine on their own with the system. Also the tail end of the secondary drive (last 10GB) is formatted logical NTFS, and works fine in XP. Have not yet tested Linux access to NTFS, but I do not foresee a problem.

But there is one big problem...the swap partition does not mount (says FAILED) on boot up. The system does allocate space (about 500mb) but the swap part was 2GB, and it isn't working.

I checked the system monitor, and find out something interesting. Despite the fact I installed RH9 with no other drive/opsys present at the time (it took to HDA nicely), once it boots and sees the NTFS (and associated MBR) on the primary drive, the boot and / partitions DEMOTE themselves to HDC. The swap, which started out HDA3, and otherwise should have demoted itself to HDC3 like its brethren, did not. It just died.

I guess the swap part is not dynamic or something, but it likely needs fixing. I suspect there is someway to get this thing to think it is HDC3, but I don't know where to look, or how to make that happen.

Any thoughts would be greatly appreciated. Also, big thanks to vectordrake for helping me make this happen in the first place.

Cheers.
 
Old 02-12-2004, 02:24 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Let's get the Linux partition booted up and try the following
'fdisk -l' should present a nice list of your partitions
If your swap is still there, you'll see it as something like this (note that yours will be a different device and start/end, etc.)
Code:
/dev/hda2              10          41      257040   82  Linux swap
Try a 'swapon' for the swap partition 'swapon /dev/hda'. If that's proves a success then open up your /etc/fstab and edit the line with the swap partition to match your disk layout. In the above example you'd have something like
Code:
/dev/hda2        swap             swap        defaults         0   0
 
Old 02-12-2004, 10:15 AM   #3
BarkingBonefish
Member
 
Registered: Feb 2004
Posts: 52

Original Poster
Rep: Reputation: 15
Right on

I did as instructed, and now, no failure on boot. I have attached my fdisk -l output, and the fstab contents for review. Is the Win95 Ext'd (LBA) necessary? I think that was created by the "tmpfs" line in the fstab, when the swap was not working. Or is that necessary as I have an NTFS disk on there?

fdisk -l

Disk /dev/hdc: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 3277 26218080 83 Linux
/dev/hdc3 3278 3531 2040255 82 Linux swap
/dev/hdc4 3532 4857 10651095 f Win95 Ext'd (LBA)
/dev/hdc5 3532 4857 10651063+ 7 HPFS/NTFS

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 7292 58572958+ 7 HPFS/NTFS


fstab

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0


Let me know if this looks ok to you. Seems to be running fine though.


THANKS!!!!!!!!!!!!!!!
 
  


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
Swap partition needed for every drive? lagu2653 Linux - Hardware 2 06-21-2005 06:15 PM
all attempts to fix the problem failed... can someone help me fix partition space? foreverdita Linux - Enterprise 2 05-11-2005 10:02 AM
is swap partition really needed ? rajorshi Linux - General 10 07-27-2003 08:12 PM
memory swap - still needed ??? xen_chris Linux - Newbie 8 04-08-2003 04:48 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 09:45 AM


All times are GMT -5. The time now is 06:35 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration