Red Hat Bugzilla – Bug 159087
(anaconda) wrote garbage into /etc/fstab swap line
Last modified: 2007-11-30 17:11:06 EST
During bootup I see this repeatedly:
[mntent]: line 6 in /etc/fstab is bad
rawhide 20050528 anaconda somehow wrote garbage into the /etc/fstab swap line.
Created attachment 114949 [details]
Did you do an upgrade from FC3-ish?
Nope, fresh install of x86_64 rawhide.
part / --fstype ext3 --size 5000
part /newroot --fstype ext3 --size 500
part swap --size 500
part /tmp --fstype ext3 --size 500
part /var/tmp --fstype ext3 --size 500
Above is the relevant part of my ks.cfg file. I have just installed FC4 on
two systems and had the corrupted swap line on both of them with that .cfg
file. I'll attach the ks.cfg file next.
Created attachment 115360 [details]
kickstart config file to demonstrate the problem
*** Bug 160437 has been marked as a duplicate of this bug. ***
*** Bug 160699 has been marked as a duplicate of this bug. ***
Noted this behavior in the released Fedora Core 4. After installing from DVD, I
saw repeated mntent line 6 entries spread about during the boot process. Line 6
turned out to be the swap partition, and it was a mess. I made no changes to
the installation media, it was just straight out what I downloaded from the
*** Bug 160905 has been marked as a duplicate of this bug. ***
Happens on i386 too. I did three different FC4 "fresh" installs, all on
systems that already had ok partitioning, which I reused (and reformatted);
all of them got LABEL=<garbage> in fstab's swap entry.
Committed a fix to Rawhide for this. Thanks for the patch. Now to begin
tracking down all the bugs that this fixes.
Ville - the swap label problem is bug 159087.
Ignore that last comment - I got confused as to which bug I was looking at.
*** Bug 160999 has been marked as a duplicate of this bug. ***
*** Bug 161302 has been marked as a duplicate of this bug. ***
What's happening here is that for some reason, mkswap does not appear to be
clearing out the section of the swap partition header that holds the label.
Then later we see that there's still something in the label section and decide
we don't need to assign it a new label. Unfortunately, there's only garbage in
the label section.
I got this problem too from a fresh install. But swap is mounted. You can check
that with 'top' command or simply use system monitor. if not or you want a new
label for swap, you could do this:
/sbin/swapoff /dev/hd? !only needed if your swap is on
/sbin/mkswap -L swap /dev/hd?
this will give you an output like:
then you can go back to fstab to get rid of the garbage:
LABLE=swap swap swap defaults 0 0
or you can use the UUID
*** Bug 163582 has been marked as a duplicate of this bug. ***
Looks like this is still more or less an issue in FC5test1. I did an install of
it today, reusing an existing swap partition from my previous FC4 install (for
which the problems are described in comment 11), and got garbage in /etc/fstab's
swap entry label again. Maybe the "damage" had been done at my FC4 install time
as I just switched to using /dev/hd?? for the swap entry back then without
relabeling the partition and it bit back again now?
Did you skip the swap format during this install?
I don't remember, sorry. I don't think I have ever consciously done so though.
Hiya, will there be a fix (or a patch so I can recompile )for FC4 released for
Created attachment 127105 [details]
patch for garbage in swapLabel
tried to backport the anaconda-11.0.5 (FC5) fixes to 10.0.1.5 (FC4). But this
does not seem to solve the problem. Could somebody please point me to the right
Or maybe I'm just not successfull in including this patch onto a bootable
Any comments welcome :)
Thanks for that patch, i'll give it a go today and see if I can get it to work
We can manually fix it by editing the /etc/fstab file. Say if the fstab entry
for swap looks like this.
LABEL=:9r9|999Â¹9Ã9Ã swap swap defaults 0 0
Then do a fdisk -l and see which partition is swap and do the following steps.
vi /etc/fstab and resplace the swap entry to look like this.
LABEL=Swap-sda2 swap swap defaults 0 0
Then, give the following commands.(Assuming that your swap partition is sda2,
please replace sda2 with what ever is your swap partition.
mkswap /dev/sda2 -L SWAP-sda2
swapon -a -e
Now, reboot the box. That should enable the swap for your box.
(In reply to comment #23)
> Created an attachment (id=127105) 
> patch for garbage in swapLabel
> Hi all,
> tried to backport the anaconda-11.0.5 (FC5) fixes to 10.0.1.5 (FC4). But this
> does not seem to solve the problem. Could somebody please point me to the right
> Or maybe I'm just not successfull in including this patch onto a bootable
> Any comments welcome :)
Just to let everyone know: the patch seems to solve the problem
It just takes some work to integrate this in the image (stage2.img etc.) files.
Rebuilding the anaconda-rpms and replacing the original ones, than generate the