LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Invalid swap file error upgrading from FC6 to FC7 (https://www.linuxquestions.org/questions/fedora-35/invalid-swap-file-error-upgrading-from-fc6-to-fc7-567226/)

f1f1 07-06-2007 03:52 PM

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

jay73 07-07-2007 12:27 AM

Try this as root:
mkswap /dev/sda1
swapon

PTrenholme 07-08-2007 03:16 PM

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.

f1f1 07-09-2007 11:02 AM

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

PTrenholme 07-09-2007 04:44 PM

<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.

Keithj 07-10-2007 07:41 AM

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!

f1f1 07-10-2007 08:03 PM

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.


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