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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-30-2003, 06:58 AM
|
#1
|
Member
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171
Rep:
|
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.
|
|
|
06-30-2003, 07:10 AM
|
#2
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
06-30-2003, 07:20 AM
|
#3
|
Member
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171
Original Poster
Rep:
|
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
|
|
|
06-30-2003, 07:24 AM
|
#4
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
06-30-2003, 07:32 AM
|
#5
|
Member
Registered: Jun 2003
Location: UK
Distribution: Redhat 9 (work) Fedora 1 (home)
Posts: 171
Original Poster
Rep:
|
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
|
|
|
06-30-2003, 07:34 AM
|
#6
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
You're welcome, glad I could help
Cool
|
|
|
All times are GMT -5. The time now is 12:15 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|