LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 07-06-2007, 03:52 PM   #1
f1f1
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
Unhappy Invalid swap file error upgrading from FC6 to FC7


Hi, I have an Athlon 3000 with a PATA drive and a DRDRW-DL drive running FC6.
The disk has 2 partitions, swap and root on hda1 and hda2; in that order.
After selecting language and keyboard I get an error dialog that swap on sda1 is invalid and a button labeled "reboot."

lspci reveals:

00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
01:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 4000 AGP 8x] (rev c1)

Has anyone seen this before? http://linuxquestions.cachefly.net/i...s/confused.gif
 
Old 07-07-2007, 12:27 AM   #2
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Try this as root:
mkswap /dev/sda1
swapon

Last edited by jay73; 07-07-2007 at 12:28 AM.
 
Old 07-08-2007, 03:16 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,149

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by jay73
Try this as root:
mkswap /dev/sda1
swapon
To get to a place where you can do the above, boot your install CD or DVD, and enter linux rescue at the first prompt. (Or boot a Fedora 7 Live CD.)

Before you do this, I'd advise that you verify that the Fedora install system agrees with you about the drive and partition assignments. For example, a review the output of the fdisk -l command might be helpful.

Also, I'm somewhat curious about your partitioning. A "standard" Fedora installation has two partitions: One exi3 boot partition, and a second "volume group" partition. "Swap" is usually a logical volume in the volume group in the second partition.

Look at your FC6 /etc/fstab. If it starts like this:
Code:
/dev/VolGroup00/LogVol001           /                       ext3    defaults        1 1
LABEL=/boot            /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol000           swap                    swap    defaults        0 0
then you've got a "standard" setup, and your /dev/hda1 is your /boot partition, not your swap partition.

Last edited by PTrenholme; 07-08-2007 at 03:17 PM.
 
Old 07-09-2007, 11:02 AM   #4
f1f1
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Invalid swap file error upgrading from FC6 to FC7

Hi, Thanks for the replies. The message I just received was:
Error enabling swap device hda1: no such file or directory
The /etc/fstab on your upgrade partion does not reference a valid swap partion
Press OK to reboot your system

This is different than the message I got before as it didn't reference sda1.
I then booted back up in FC6 and am writing this on this system.

fdisk -l
Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/hda2 * 263 9726 76019580 83 Linux
 
Old 07-09-2007, 04:44 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,149

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
<edit> Oops. Just remembered a thing: Fedora 7 uses a different naming convention from the one used in older Fedoras: Drives are (almost) all called sd, not hd. So the error message is telling you that the hda1 should be sda1 for things to work properly.

You could try removing (or commenting) the swap definition line in your FC6 /etc/fstab file. The kernel should automatically use the swap space even without the definition, and, in any case, the upgrade should work without it.

You may also need to replace any hda2 references with sda2 ones, or, better, use a LABEL=/ instead of a /dev/hda2 definition.
</edit>

Well, that certainly says that hda1 is a swap partition, and hda2 a Linux one, as you told us above.

Can you show us the first few lines of your FC6 /etc/fstab file? As I said, what you've got is not a "standard" FC6 default installation, although it should still be upgradeable to F7. If we see how it's set up, perhaps we can suggest how you can get the F7 installer to upgrade it.

Also, have you considered just installing F7 on a new drive and migrating everything you want to save from the FC6 drive as you need it? It might be simpler and easier.

Last edited by PTrenholme; 07-09-2007 at 04:56 PM.
 
Old 07-10-2007, 07:41 AM   #6
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Rep: Reputation: 30
I went through the same grief updating to Fedora 7 (the word "core" seems to have been banished from official use).

My notes from my headscratchings on 21 June say Fedora 7 install reported "Error enabling swap device hdb5. No such file or directory."

This machine has three hard drives, with several different distros, so I just booted into Mepis and edited the /etc/fstab on the Fedora drive to change hda/hdb/hdc to read sda/sdb/sdc as appropriate, and that fixed that issue. (The CDROM/DVDROM drives also had to be changed but that's a different problem).

There was also the issue of several different versions of the boot core - it changed from the fc5 version whose number I forget, to 2.6.21-1.3194.fc7 and then to .3228.fc7 at some later stage in the process (which confused me for a while). Editing menu.lst becomes another regular feature of this process.
You'll notice that although FC6 was superseded by Fedora 7, the file suffixes went from .fc6 to .fc7 just the same.

If you can access your Fedora partition some other way, and edit the /etc/fstab then you should be able to boot your Fedora.
If all else fails, a Knoppix boot CD will allow you to do that. I keep one for unscrambling Windows machines, and would be lost without it!
 
Old 07-10-2007, 08:03 PM   #7
f1f1
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Talking Mission accomplished: Invalid swap file error upgrading from FC6 to FC7

I tried adding a line that read sda1 but didn't comment out the hda1 line.
commenting it out did the trick.
Thanks again to all.
 
  


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
libraw1394 changes between FC6 and FC7 ChillyWillie Fedora 2 07-02-2007 09:10 PM
Can't boot after upgrading from FC6 to FC7 dennis Fedora 5 06-15-2007 03:21 PM
Long start-up due to very slow udev after upgrading FC6 to FC7 Baran Fedora 2 06-03-2007 04:42 AM
SAMBA - Invalid parameters when copying a file - FC6 dkinfl Linux - Software 0 01-24-2007 11:43 AM
Disk error - upgrading fc5 to fc6 from CDs fauxn Fedora - Installation 1 11-04-2006 01:24 PM


All times are GMT -5. The time now is 05:39 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration