Bug 159087 - (anaconda) wrote garbage into /etc/fstab swap line
(anaconda) wrote garbage into /etc/fstab swap line
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Lumens
Mike McLean
:
: 160437 160699 160905 160999 161302 163582 (view as bug list)
Depends On:
Blocks: FC5Target
  Show dependency treegraph
 
Reported: 2005-05-29 02:10 EDT by Warren Togami
Modified: 2007-11-30 17:11 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-22 16:24:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/etc/fstab auto-generated (709 bytes, text/plain)
2005-05-29 02:10 EDT, Warren Togami
no flags Details
kickstart config file to demonstrate the problem (2.11 KB, text/plain)
2005-06-13 13:31 EDT, Russell Coker
no flags Details
patch for garbage in swapLabel (3.87 KB, patch)
2006-03-31 02:23 EST, Niels de Vos
no flags Details | Diff

  None (edit)
Description Warren Togami 2005-05-29 02:10:04 EDT
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 02:10:04 EDT
Created attachment 114949 [details]
/etc/fstab auto-generated
Comment 2 Jeremy Katz 2005-05-30 23:06:16 EDT
Did you do an upgrade from FC3-ish?
Comment 3 Warren Togami 2005-05-31 00:03:32 EDT
Nope, fresh install of x86_64 rawhide.
Comment 4 Russell Coker 2005-06-13 13:29:50 EDT
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 13:31:05 EDT
Created attachment 115360 [details]
kickstart config file to demonstrate the problem
Comment 6 djh 2005-06-15 04:54:09 EDT
*** Bug 160437 has been marked as a duplicate of this bug. ***
Comment 8 Jeremy Katz 2005-06-16 16:35:42 EDT
*** Bug 160699 has been marked as a duplicate of this bug. ***
Comment 9 Brian Lusk 2005-06-17 18:12:44 EDT
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 10:51:29 EDT
*** Bug 160905 has been marked as a duplicate of this bug. ***
Comment 11 Ville Skyttä 2005-06-19 03:39:28 EDT
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 11:07:42 EDT
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 11:16:08 EDT
Ignore that last comment - I got confused as to which bug I was looking at.
Comment 14 Chris Lumens 2005-06-20 12:45:15 EDT
*** Bug 160999 has been marked as a duplicate of this bug. ***
Comment 15 Chris Lumens 2005-06-22 10:02:14 EDT
*** Bug 161302 has been marked as a duplicate of this bug. ***
Comment 16 Chris Lumens 2005-06-22 10:06:57 EDT
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 03:37:27 EDT
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 11:00:43 EDT
*** Bug 163582 has been marked as a duplicate of this bug. ***
Comment 19 Ville Skyttä 2005-11-27 18:21:04 EST
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-27 19:32:03 EST
Did you skip the swap format during this install?
Comment 21 Ville Skyttä 2005-11-28 04:03:02 EST
I don't remember, sorry.  I don't think I have ever consciously done so though.
Comment 22 Evan Fraser 2006-03-28 10:06:04 EST
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 02:23:43 EST
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 02:57:56 EST
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 04:49:14 EDT
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 10:51:52 EDT
(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.