From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-112954-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Oawek-0001RH-DY
	for garchives@archives.gentoo.org; Mon, 19 Jul 2010 20:09:42 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 84A89E0B9B
	for <garchives@archives.gentoo.org>; Mon, 19 Jul 2010 20:09:41 +0000 (UTC)
Received: from mail-ew0-f53.google.com (mail-ew0-f53.google.com [209.85.215.53])
	by pigeon.gentoo.org (Postfix) with ESMTP id 91407E09EB
	for <gentoo-user@lists.gentoo.org>; Mon, 19 Jul 2010 20:04:06 +0000 (UTC)
Received: by ewy19 with SMTP id 19so1789240ewy.40
        for <gentoo-user@lists.gentoo.org>; Mon, 19 Jul 2010 13:04:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:from:to:subject:date
         :user-agent:cc:references:in-reply-to:mime-version:content-type
         :content-transfer-encoding:message-id;
        bh=TxYJ8bf43kixgMWx0yQmEf+4xoF8/sFJBDdqUefiGSs=;
        b=E7wmT8qJhSJvFpYaDMz5dx75UuCUMY0bphFRwFOSUZCJ29AKY94TtIAblzTI7UvqYY
         B1rBuOr59bG/s1lm86HhFR4Oz5XTFgtpshm40tLXRxbFg8f82Cd4riZB0PZB8LQnn80M
         Tw33PqlURgS6je4JIFFnM0cGA/CddRpZ07SaU=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=from:to:subject:date:user-agent:cc:references:in-reply-to
         :mime-version:content-type:content-transfer-encoding:message-id;
        b=ndkxXxRL4nmnvDpF9YGh+TrfGQk3FQHJ8tVbYiIOroPpNOoFy4vrLWjDKDJVVSBOej
         FBQyW/qHp2hdti5KcHdmpl/0Lz07faVLbm8I0woBAh1kgE8FYh5lyPXLf8HEAXMmj6XJ
         U22jWbwRZC6n9uFaswELGi3NC+fiJE37zgePk=
Received: by 10.213.15.135 with SMTP id k7mr1760423eba.57.1279569845903;
        Mon, 19 Jul 2010 13:04:05 -0700 (PDT)
Received: from nazgul.localnet (196-215-57-66.dynamic.isadsl.co.za [196.215.57.66])
        by mx.google.com with ESMTPS id a48sm50123725eei.18.2010.07.19.13.04.02
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Mon, 19 Jul 2010 13:04:04 -0700 (PDT)
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] unmounting /usr in single user mode
Date: Mon, 19 Jul 2010 22:00:51 +0200
User-Agent: KMail/1.13.5 (Linux/2.6.34-gentoo-r2; KDE/4.4.5; x86_64; ; )
Cc: Allan Gottlieb <gottlieb@nyu.edu>
References: <yu97hkrmh7m.fsf@nyu.edu>
In-Reply-To: <yu97hkrmh7m.fsf@nyu.edu>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201007192200.52203.alan.mckinnon@gmail.com>
X-Archives-Salt: 50da2026-8331-4672-8354-c886b3ac4553
X-Archives-Hash: aa4be5ed800ce00e08dd51673577bf43

On Monday 19 July 2010 20:58:37 Allan Gottlieb wrote:
> I am unable to umount /usr in single user mode on an old system.
> I believe the system is baselayout-1 and is amd64.
> The trouble is open files, at least some of which appear to be related
> to bash and locale (see the files below).
> 
> I use grub.  On the kernel line can I specify sh instead of bash?

Not directly. grub and init does not know about, or even care about, bash.

You can change root's shell in /etc/passwd to sh and bash should run in sh 
mode. Or you can append init=/bin/sh to the grub boot line and try that. You 
will of course have to run all the init scripts yourself as init will not run 
when you do this. And you can't reboot either - when you exit the shell in 
this mode you'll get a panic




> I know sh is linked to bash, but hope that it will not use locale.
> 
> I need to umount /usr so that I can resize it (I use lvm and have
> already extended the logical volume).  Specifically i want to execute
> umount /usr
> resize2fs /dev/vg/usr
> mount /usr
> 
> (I realize I will probably need an e2fsck).
> 
> On my new system (baselayout-2), this was easy as /usr is not mounted
> when rebooting into single user mode.
> 
> thanks,
> allan
> 
> output of lsof | grep usr
> 
> bash      1907 root  mem       REG              254,0  1772320 245830
> /usr/lib64/locale/locale-archive bash      1907 root  mem       REG       
>       254,0    26050 230642 /usr/lib64/gconv/gconv-modules.cache bash     
> 2125 root  mem       REG              254,0  1772320 245830
> /usr/lib64/locale/locale-archive bash      2125 root  mem       REG       
>       254,0    26050 230642 /usr/lib64/gconv/gconv-modules.cache lsof     
> 2149 root  txt       REG              254,0   131144  92097 /usr/bin/lsof
> lsof      2149 root  mem       REG              254,0  1772320 245830
> /usr/lib64/locale/locale-archive grep      2150 root  mem       REG       
>       254,0  1772320 245830 /usr/lib64/locale/locale-archive grep     
> 2150 root  mem       REG              254,0    26050 230642
> /usr/lib64/gconv/gconv-modules.cache lsof      2151 root  txt       REG   
>           254,0   131144  92097 /usr/bin/lsof lsof      2151 root  mem    
>   REG              254,0  1772320 245830 /usr/lib64/locale/locale-archive
> 
> 
> output of fuser /usr/lib64/locale/locale-archive
> 
>   1907  2125
> 
> and 1907 was /bin/bash

-- 
alan dot mckinnon at gmail dot com