Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159087 - (anaconda) wrote garbage into /etc/fstab swap line
Summary: (anaconda) wrote garbage into /etc/fstab swap line
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Mike McLean
URL:
Whiteboard:
: 160437 160699 160905 160999 161302 163582 (view as bug list)
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2005-05-29 06:10 UTC by Warren Togami
Modified: 2007-11-30 22:11 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-22 20:24:57 UTC


Attachments (Terms of Use)
/etc/fstab auto-generated (deleted)
2005-05-29 06:10 UTC, Warren Togami
no flags Details
kickstart config file to demonstrate the problem (deleted)
2005-06-13 17:31 UTC, Russell Coker
no flags Details
patch for garbage in swapLabel (deleted)
2006-03-31 07:23 UTC, Niels de Vos
no flags Details | Diff

Description Warren Togami 2005-05-29 06:10:04 UTC
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.

Comment 1 Warren Togami 2005-05-29 06:10:04 UTC
Created attachment 114949 [details]
/etc/fstab auto-generated

Comment 2 Jeremy Katz 2005-05-31 03:06:16 UTC
Did you do an upgrade from FC3-ish?

Comment 3 Warren Togami 2005-05-31 04:03:32 UTC
Nope, fresh install of x86_64 rawhide.


Comment 4 Russell Coker 2005-06-13 17:29:50 UTC
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. 

Comment 5 Russell Coker 2005-06-13 17:31:05 UTC
Created attachment 115360 [details]
kickstart config file to demonstrate the problem

Comment 6 djh 2005-06-15 08:54:09 UTC
*** Bug 160437 has been marked as a duplicate of this bug. ***

Comment 8 Jeremy Katz 2005-06-16 20:35:42 UTC
*** Bug 160699 has been marked as a duplicate of this bug. ***

Comment 9 Brian Lusk 2005-06-17 22:12:44 UTC
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
Fedora website.

Brian

Comment 10 Warren Togami 2005-06-18 14:51:29 UTC
*** Bug 160905 has been marked as a duplicate of this bug. ***

Comment 11 Ville Skyttä 2005-06-19 07:39:28 UTC
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. 

Comment 12 Chris Lumens 2005-06-20 15:07:42 UTC
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.

Comment 13 Chris Lumens 2005-06-20 15:16:08 UTC
Ignore that last comment - I got confused as to which bug I was looking at.

Comment 14 Chris Lumens 2005-06-20 16:45:15 UTC
*** Bug 160999 has been marked as a duplicate of this bug. ***

Comment 15 Chris Lumens 2005-06-22 14:02:14 UTC
*** Bug 161302 has been marked as a duplicate of this bug. ***

Comment 16 Chris Lumens 2005-06-22 14:06:57 UTC
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.

Comment 17 CE YI 2005-07-07 07:37:27 UTC
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:

su
/sbin/swapoff /dev/hd?    !only needed if your swap is on
/sbin/mkswap -L swap /dev/hd?
/sbin/swapon /dev/hd?

this will give you an output like:
LABEL=swap, UUID=e074f449-5f5e-4b97-a2ae-07e82ef96664

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

Comment 18 Chris Lumens 2005-07-19 15:00:43 UTC
*** Bug 163582 has been marked as a duplicate of this bug. ***

Comment 19 Ville Skyttä 2005-11-27 23:21:04 UTC
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?

Comment 20 Warren Togami 2005-11-28 00:32:03 UTC
Did you skip the swap format during this install?


Comment 21 Ville Skyttä 2005-11-28 09:03:02 UTC
I don't remember, sorry.  I don't think I have ever consciously done so though.

Comment 22 Evan Fraser 2006-03-28 15:06:04 UTC
Hiya, will there be a fix (or a patch so I can recompile )for FC4 released for
this bug?

Cheers, Evan.

Comment 23 Niels de Vos 2006-03-31 07:23:43 UTC
Created attachment 127105 [details]
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
direction?
Or maybe I'm just not successfull in including this patch onto a bootable
image...

Any comments welcome :)

Comment 24 Evan Fraser 2006-03-31 07:57:56 UTC
Thanks for that patch, i'll give it a go today and see if I can get it to work
myself.

EVan.

Comment 25 Abdul Khader 2006-04-15 08:49:14 UTC
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.

Comment 26 Niels de Vos 2006-04-19 14:51:52 UTC
(In reply to comment #23)
> Created an attachment (id=127105) [edit]
> 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
> direction?
> Or maybe I'm just not successfull in including this patch onto a bootable
> image...
> 
> 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
CDs again...


Note You need to log in before you can comment on or make changes to this bug.