Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47932 - swapfile on rootfs makes checkroot unable to remount root ro
Summary: swapfile on rootfs makes checkroot unable to remount root ro
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 121118 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-15 09:14 UTC by Tomasz Sterna
Modified: 2006-06-16 02:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Sterna 2004-04-15 09:14:20 UTC
When I have swapfile in a file /swap0 it is activated before the checkroot script starts, thus checkroot is unable to remount / ro and check it.
Bootup is stopped asking for a root password to fix the problem.

Reproducible: Always
Steps to Reproduce:
1. Create a swapfile is /swap and add to fstab
2. Reboot
Comment 1 Jason Pepas 2004-09-20 18:36:44 UTC
I experience the same problem.

The problem appears to be that loopback swap files are mounted during /etc/init.d/localmount, which runs before /etc/init.d/checkroot.

Possible solutions:

- Pull the call to swapon out of localmount and place it in its own script which runs after checkroot.

- Wrap checkroot with calls to swapoff and swapon
Comment 2 SpanKY gentoo-dev 2005-01-09 21:35:24 UTC
no, the issue is that /sbin/rc runs `/sbin/swapon -a` and then loads the 'critical services', the first of which is 'checkroot'
Comment 3 Giovanni 2005-04-18 07:29:17 UTC
It happens with me too.

My temporary solution was comment the following lines from /sbin/rc:

 ebegin "Activating (possible) swap"
 /sbin/swapon -a &> /dev/null
 eend 0

Then, the swap only mounts when localmount script is called (? for aditional swaps /weirdness ?), after checkroot has passed.

With best regards

Giovanni
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-06-04 09:24:03 UTC
This will be fixed in baselayout-1.12.1
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-06-05 06:45:15 UTC
*** Bug 121118 has been marked as a duplicate of this bug. ***
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-06-16 02:10:09 UTC
Fixed