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