1 |
On Monday 19 July 2010 20:58:37 Allan Gottlieb wrote: |
2 |
> I am unable to umount /usr in single user mode on an old system. |
3 |
> I believe the system is baselayout-1 and is amd64. |
4 |
> The trouble is open files, at least some of which appear to be related |
5 |
> to bash and locale (see the files below). |
6 |
> |
7 |
> I use grub. On the kernel line can I specify sh instead of bash? |
8 |
|
9 |
Not directly. grub and init does not know about, or even care about, bash. |
10 |
|
11 |
You can change root's shell in /etc/passwd to sh and bash should run in sh |
12 |
mode. Or you can append init=/bin/sh to the grub boot line and try that. You |
13 |
will of course have to run all the init scripts yourself as init will not run |
14 |
when you do this. And you can't reboot either - when you exit the shell in |
15 |
this mode you'll get a panic |
16 |
|
17 |
|
18 |
|
19 |
|
20 |
> I know sh is linked to bash, but hope that it will not use locale. |
21 |
> |
22 |
> I need to umount /usr so that I can resize it (I use lvm and have |
23 |
> already extended the logical volume). Specifically i want to execute |
24 |
> umount /usr |
25 |
> resize2fs /dev/vg/usr |
26 |
> mount /usr |
27 |
> |
28 |
> (I realize I will probably need an e2fsck). |
29 |
> |
30 |
> On my new system (baselayout-2), this was easy as /usr is not mounted |
31 |
> when rebooting into single user mode. |
32 |
> |
33 |
> thanks, |
34 |
> allan |
35 |
> |
36 |
> output of lsof | grep usr |
37 |
> |
38 |
> bash 1907 root mem REG 254,0 1772320 245830 |
39 |
> /usr/lib64/locale/locale-archive bash 1907 root mem REG |
40 |
> 254,0 26050 230642 /usr/lib64/gconv/gconv-modules.cache bash |
41 |
> 2125 root mem REG 254,0 1772320 245830 |
42 |
> /usr/lib64/locale/locale-archive bash 2125 root mem REG |
43 |
> 254,0 26050 230642 /usr/lib64/gconv/gconv-modules.cache lsof |
44 |
> 2149 root txt REG 254,0 131144 92097 /usr/bin/lsof |
45 |
> lsof 2149 root mem REG 254,0 1772320 245830 |
46 |
> /usr/lib64/locale/locale-archive grep 2150 root mem REG |
47 |
> 254,0 1772320 245830 /usr/lib64/locale/locale-archive grep |
48 |
> 2150 root mem REG 254,0 26050 230642 |
49 |
> /usr/lib64/gconv/gconv-modules.cache lsof 2151 root txt REG |
50 |
> 254,0 131144 92097 /usr/bin/lsof lsof 2151 root mem |
51 |
> REG 254,0 1772320 245830 /usr/lib64/locale/locale-archive |
52 |
> |
53 |
> |
54 |
> output of fuser /usr/lib64/locale/locale-archive |
55 |
> |
56 |
> 1907 2125 |
57 |
> |
58 |
> and 1907 was /bin/bash |
59 |
|
60 |
-- |
61 |
alan dot mckinnon at gmail dot com |