Gentoo Archives: gentoo-user

From: "Kacper Kopczyński" <capsel@××××××××××××.pl>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] unmounting /usr in single user mode
Date: Mon, 19 Jul 2010 20:07:17
Message-Id: 20100719213404.427f3719@matrix.inten.pl
In Reply to: [gentoo-user] unmounting /usr in single user mode by Allan Gottlieb
1 Dnia 2010-07-19, o godz. 14:58:37
2 Allan Gottlieb <gottlieb@×××.edu> napisał(a):
3
4 > I am unable to umount /usr in single user mode on an old system.
5 > I believe the system is baselayout-1 and is amd64.
6 > The trouble is open files, at least some of which appear to be related
7 > to bash and locale (see the files below).
8 >
9 > I use grub. On the kernel line can I specify sh instead of bash?
10 > I know sh is linked to bash, but hope that it will not use locale.
11 >
12 > I need to umount /usr so that I can resize it (I use lvm and have
13 > already extended the logical volume). Specifically i want to execute
14 > umount /usr
15 > resize2fs /dev/vg/usr
16 > mount /usr
17 >
18 > (I realize I will probably need an e2fsck).
19 >
20 > On my new system (baselayout-2), this was easy as /usr is not mounted
21 > when rebooting into single user mode.
22 >
23 > thanks,
24 > allan
25 >
26 > output of lsof | grep usr
27 >
28 > bash 1907 root mem REG 254,0 1772320
29 > 245830 /usr/lib64/locale/locale-archive bash 1907 root
30 > mem REG 254,0 26050
31 > 230642 /usr/lib64/gconv/gconv-modules.cache bash 2125 root
32 > mem REG 254,0 1772320
33 > 245830 /usr/lib64/locale/locale-archive bash 2125 root
34 > mem REG 254,0 26050
35 > 230642 /usr/lib64/gconv/gconv-modules.cache lsof 2149 root
36 > txt REG 254,0 131144 92097 /usr/bin/lsof
37 > lsof 2149 root mem REG 254,0 1772320
38 > 245830 /usr/lib64/locale/locale-archive grep 2150 root
39 > mem REG 254,0 1772320
40 > 245830 /usr/lib64/locale/locale-archive grep 2150 root
41 > mem REG 254,0 26050
42 > 230642 /usr/lib64/gconv/gconv-modules.cache lsof 2151 root
43 > txt REG 254,0 131144 92097 /usr/bin/lsof
44 > lsof 2151 root mem REG 254,0 1772320
45 > 245830 /usr/lib64/locale/locale-archive
46 >
47 >
48 > output of fuser /usr/lib64/locale/locale-archive
49 >
50 > 1907 2125
51 >
52 > and 1907 was /bin/bash
53 >
54
55 Because of /usr/lib I think you should use LiveCD.
56
57 If you really need to do this in single user mode try busybox and its
58 shell - create a link like:
59 cd /bin; ln -s /bin/busybox bsh
60
61 --
62 Kacper Kopczyński

Replies

Subject Author
Re: [gentoo-user] unmounting /usr in single user mode Allan Gottlieb <gottlieb@×××.edu>