LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-30-2003, 05:58 AM   #1
Ross Clement
Member
 
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171

Rep: Reputation: 30
Strange Disk Partition Problem


Hi. My disk partitions appear to be moderately screwed. If I fdisk -l as root, I get the following:

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ b Win95 FAT32
/dev/hda2 1021 1033 104422+ 83 Linux
/dev/hda3 1034 14471 107940735 83 Linux
/dev/hda4 14472 14593 979965 f Win95 Ext'd (LBA)
/dev/hda5 14472 14593 979933+ 82 Linux swap


Everything is fine, except that I seem to have the same set of blocks set up as the last two partitions. Also, I'm not sure that the size is being reported correctly. The linux swap is the true partition, I don't know where the Win95 partition came from. The first partition has Windows 2000 on it.

Context was that I needed to copy some stuff from another windows disk. I put it in the machine, booted into windows, copied the relevant material over to the 120gig disk, then shut down and removed the hard disk. Upon booting into (rh9) linux again, I found that swap wasn't working properly.

Any hints as to how I can fix this?

Thanks in anticipation,

Ross Clement.
 
Old 06-30-2003, 06:10 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
hda4 is an extended partition, it's simply being reported as win95 ext'd because of the LBA it's using (possibly from how it was created) IMG.

Either way though, it's just fine since the extended partition type is showing up correctly as a swap partition.

What is making you think swap is not working correctly? Can you post up your /etc/fstab and also what you get from typing:
free
into a terminal?

Cool
 
Old 06-30-2003, 06:20 AM   #3
Ross Clement
Member
 
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171

Original Poster
Rep: Reputation: 30
Re: Swap partition woes

Hi. During bootup, the system complains that the swap partition can't be mounted, with the error:

swapon /dev/hda5: invalid argument.

Here's my /etc/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/hda4 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

I tried changing the 'defaults' for swap to 'swap sw' as recommended in another post, but that had no effect. I.e. the line was:

/dev/hda4 swap swap swap sw 0 0

free reports that there is no swap space.

# free
total used free shared buffers cached
Mem: 481392 212760 268632 0 14024 108044
-/+ buffers/cache: 90692 390700
Swap: 0 0 0

Any hints?

Thanks in anticipation,

Ross-c
 
Old 06-30-2003, 06:24 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Edit /etc/fstab to hda5 instead of hda4

Use:
/dev/hda5 swap swap sw 0 0
As your entry.

Reboot, or simply remount:
mount -a

However, you find that error at boot so go ahead do that.



Cool
 
Old 06-30-2003, 06:32 AM   #5
Ross Clement
Member
 
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171

Original Poster
Rep: Reputation: 30
Re: Problem solved!

Hi. Thanks very much. The problem is now solved. IIRC, my hard drive was previously hdc. Hence, it appears that when I had to take the machine to bits to add (and remove) the hard drive (even had to remove the memory!, so much for a 'micro' ATX board), I must have swapped the ide cables. Then, when fdisk gave what I thought was an 'extra' partition, I was looking for a way of fixing it (and using hda4 as swap), rather than just fixing the partition name.

Thanks muchly,

Ross-c
 
Old 06-30-2003, 06:34 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
You're welcome, glad I could help

Cool
 
  


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
problem with linux partition on external USB disk poncho4u Linux - Hardware 3 10-01-2005 11:08 AM
disk partition problem whee Linux - Newbie 2 05-28-2005 07:58 PM
strange partition table - boot partition empty etanter Linux - General 0 12-23-2003 09:46 AM
Help: Disk partition problem during install groston Linux - Distributions 1 10-07-2002 07:06 PM
Problem mounting SunOS disk on RedHat - unknown partition table jerrymc Linux - Software 2 12-03-2001 05:53 PM

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

All times are GMT -5. The time now is 02:48 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