Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] emerge claims / to be mounted ro in chroot env.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Fri Jun 27, 2014 8:25 am    Post subject: [SOLVED] emerge claims / to be mounted ro in chroot env. Reply with quote

I can not install some essential packages inside chroot anymore.
I usually install new systems from a network booted system. Should be not too much different from a usual install from a live CD.
The difference: All install is usually done automatically by a script (which I have not touched for months)
and the installation of the system is done in general from binary packages.
What works:
- partitioned the drive
- mounted the drive to /mnt/gentoo
- installed stage3
- copied the needed configuration files to /mnt/gentoo
- doing the needed mounts proc, sys, dev
- chroot into the new environment
- env-update and selecting the profile (mine: binhost)
emerge kernel, grub and installing grub
(the new system is bootable)

The first thing that does not work:
I need python:2.7. When I try to install this I get the following message:
"One or more files installed to this package are set to be installed to read-only filesystems. Please mount the following filesystems as read-write and retry.

/

Package dev-lang/python-2.7.5-r3 Note merged ..."

I can not make anything out of this as I obviously have successfully emerged gentoo-sources (which, on my system, installs the binary kernel too) and grub:0.

/etc/mtab indicates the root partition as mounted rw.

Can canybody help? I am lost here.


Last edited by AgBr on Sat Jun 28, 2014 3:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Jun 27, 2014 7:18 pm    Post subject: Reply with quote

Confused -> Is "One or more files installed to this package are set to be installed to read-only filesystems. Please mount the following filesystems as read-write and retry." when trying to emerge python2.7 being received after booting the livbecd/usb and entering the chroot or after a direct boot of the newly installed gentoo system?

Code:
mount -o remount,rw /
to change ro to rw as temporary fix
_________________
Defund the FCC.
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Fri Jun 27, 2014 8:12 pm    Post subject: Reply with quote

DONAHUE wrote:
Confused -> Is "One or more files installed to this package are set to be installed to read-only filesystems. Please mount the following filesystems as read-write and retry." when trying to emerge python2.7 being received after booting the livbecd/usb and entering the chroot or after a direct boot of the newly installed gentoo system?

Code:
mount -o remount,rw /
to change ro to rw as temporary fix

The message appears inside the chroot environment.
The partition is mounted rw. This is how it looks like.

Code:

lx13-04 ~ # chroot /mnt/gentoo/
lx13-04 / # mount -o remout,rw
/dev/sda2 on / type ext3 (rw,relatime,errors=continue,barrier=1,data=writeback)
lx13-04 / # emerge -1G sys-kernel/linux-firmware


!!! Timed out while closing connection to binhost

 * IMPORTANT: 6 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Emerging binary (1 of 1) sys-kernel/linux-firmware-20130728::gentoo
 * linux-firmware-20130728.tbz2 MD5 SHA1 size ;-) ...                    [ ok ]
>>> Extracting info
>>> Extracting sys-kernel/linux-firmware-20130728

>>> Installing (1 of 1) sys-kernel/linux-firmware-20130728
 * One or more files installed to this package are set to be installed to
 * read-only filesystems. Please mount the following filesystems as read-
 * write and retry.
 *
 *      /
 *
 * Package 'sys-kernel/linux-firmware-20130728' NOT merged due to read-
 * only file systems. If necessary, refer to your elog messages for the
 * whole content of the above message.

>>> Failed to install sys-kernel/linux-firmware-20130728, Log file:

>>>  '/var/tmp/portage/sys-kernel/linux-firmware-20130728/temp/build.log'

 * Messages for package sys-kernel/linux-firmware-20130728:

 * One or more files installed to this package are set to be installed to
 * read-only filesystems. Please mount the following filesystems as read-                                                                                             
 * write and retry.                                                                                                                                                   
 *                                                                                                                                                                   
 *      /                                                                                                                                                             
 *                                                                                                                                                                   
 * Package 'sys-kernel/linux-firmware-20130728' NOT merged due to read-                                                                                               
 * only file systems. If necessary, refer to your elog messages for the                                                                                               
 * whole content of the above message.                                                                                                                               
                                                                                                                                                                     
 * GNU info directory index is up-to-date.                                                                                                                           
                                                                                                                                                                     
 * IMPORTANT: 6 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

I could run the command emerge exactly twice. First installing grub:0 then installing gentoo-sources, portage and update-client
The latter is a local ebuild installing some scripts which manages binary updates.
I suspect, with the update of portage during the second call of emerge, a new version of emerge is installed which does not work properly any more.
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Fri Jun 27, 2014 9:33 pm    Post subject: Reply with quote

DONAHUE wrote:
if
Quote:
(the new system is bootable)
it seems odd that you are using the chroot instead of booting the installed system. The reason for using the chroot instead of the install may be germane. Exactly what media are you booting before you chroot? There was a recent problem with using ubuntu livecd and installed ubuntu as the source system. You might try their solution even if debian/ubuntu is not involved: in your chroot:
Code:
mkdir /run/shm
try to run emerge. If problem persists post the output of
Code:
ls -l /dev/shm

The output of
Code:
nano /proc/self/mountinfo
may be interesting, compare the result just after mounting the gentoo partitions, after entering the chroot, after running
Code:
mount -o remount,rw /

New boxes get installed (when it works) automatically just by pxe-booting it into a network system with nfs-mounted root. It's a very long story, which I have mostly told already here (really a long read, but I think it is worth it).
So, usually the whole thing is running without user intervention. Essentially all things you would do yourself to install a fresh box are done by the script except it is not installed from sources anymore but installed from precompiled packages. You may see it as a gentoo based binary distribution.
The first things happening during a new install after unpacking stage3, is to emerge grub(:0 in my case) and install the bootloader. After that three packages get installed: gentoo-sources (which, in my case includes the binary kernel and the modules), portage and update-client (which is, as already mentioned, a set of scripts, which are used to update the system and initially are responsible to transform the basic stage3 into our installed distribution. After our binary package portage got installed, emerge immediately starts to show the odd behaviour.
So, to make things short, it is no option for me to boot into the installed basic system and install the rest of the system from there. And in fact, it is proved, that the root-filesystem is *not* mounted ro. It is perfectly writable and the command mount, /etc/mtab and /proc/mounts show it as such. The script itself is proved to work properly. The last new install of a blank box is just a few weeks ago. It must have to do with the latest version of portage as the portage contained in the latest stage3, dating from April 15th, does obviously work as expected. Otherwise I would not have been able to install the not working version of emerge as port of my binary portage, along with the kernel and the update scrips.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Jun 28, 2014 1:02 am    Post subject: Reply with quote

http://gentoo.2317880.n4.nabble.com/PATCH-Check-for-and-report-read-only-filesystems-td274348.html source of the report
https://bugs.gentoo.org/show_bug.cgi?id=378869
_________________
Defund the FCC.
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Sat Jun 28, 2014 7:38 am    Post subject: Reply with quote

DONAHUE wrote:
http://gentoo.2317880.n4.nabble.com/PATCH-Check-for-and-report-read-only-filesystems-td274348.html source of the report
https://bugs.gentoo.org/show_bug.cgi?id=378869

Thank you for the info. I supposed my problem to be caused by some change in the regular behavior of portage which could be tailored in some way. This is the usual cause of issues like that with my system. I never thought of it simply being a bug. The installation is not time critical. Do you have any information whether the patch will find its way into an update of portage soon? I'd rather wait a few days than patch the ebuild myself.

PS:

Curiosity drove me to give it a try:
Code:

lx13-04 portage # patch -p1 < /tmp/0001-Test-for-read-only-filesystems-bail-out-during-prein.patch
(Stripping trailing CRs from patch.)
patching file pym/portage/dbapi/vartree.py
Hunk #2 FAILED at 3509.
Hunk #3 FAILED at 3686.
Hunk #4 succeeded at 3726 with fuzz 2 (offset 8 lines).
Hunk #5 succeeded at 3866 with fuzz 2 (offset 33 lines).
2 out of 5 hunks FAILED -- saving rejects to file pym/portage/dbapi/vartree.py.rej
(Stripping trailing CRs from patch.)
patching file pym/portage/util/checkwriteable.py
lx13-04 portage #

So unfortunately, as it seems, the patch didn't work
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Jun 28, 2014 12:11 pm    Post subject: Reply with quote

AgBr wrote:
So unfortunately, as it seems, the patch didn't work

AgBr ... generally patches will be applied to *-9999 as this will be where changes are tested before they trickle down into ~arch then stable. Thats probably the case here.

best ... khay
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Sat Jun 28, 2014 3:27 pm    Post subject: Reply with quote

I masked the broken portage-2.2.10. Portage-2.2.8 is doing its job just fine now. Let's hope that the next version will fix the issue.
Back to top
View user's profile Send private message
psyhtest
n00b
n00b


Joined: 15 Jul 2014
Posts: 1
Location: Cambridge, UK

PostPosted: Tue Jul 15, 2014 1:01 pm    Post subject: stage3-armv7a_hardfp-20140603.tar.bz2 Reply with quote

I had exactly the same problem with
Code:
stage3-armv7a_hardfp-20140603.tar.bz2


Had to replace usr/lib/portage with one from
Code:
stage3-armv7a_hardfp-20140112.tar.bz2
and then mask portage-2.2.10 out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum