LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   [gentoo] umount /usr - device busy (https://www.linuxquestions.org/questions/linux-general-1/%5Bgentoo%5D-umount-usr-device-busy-119179/)

yapp 11-23-2003 10:56 AM

[gentoo] umount /usr - device busy
 
Hi.

I', currently installing my gentoo system, and I want to resize the /usr partition. It's formatted as reiserfs.

After returning to single user mode, I wasn't able to "umount /usr". It says, device busy, but this is the output from fuser -v:
Code:

                    USER        PID ACCESS COMMAND
/usr/                root    kernel mount  /usr

does anyone know how I can unmount the usr partition? I didn't put those files on another partition because it looked like fun. :)

chup 11-23-2003 02:05 PM

this may sound dumb, but you arent in the /usr directory when you are trying to unmount it?
also, have you tried rebooting and then resizing the partition?

teval 11-23-2003 02:22 PM

No... you can't just not be in it, a lot of programs run from there.
It used to be that *nix didn't need usr to function, and usr was mostly glitter, but now a lot of the core programs are in usr
If you really want to try it's like this..

fuser -k -m /usr

You should definitely not be in X when doing this.. and make sure any program you want is compiled without dependancies to libc, and.. that you have all the library files you need.

acid_kewpie 11-23-2003 03:14 PM

you have of course still got your gentoo live cd.... you can always just boot to that...

8nasmith 11-24-2003 05:13 AM

i have purchaced gentoo 1.2 not very experianced so how is it at installing

Crashed_Again 11-24-2003 05:17 AM

Its like going to the dentist but afterwards instead of getting a lollipop you get an ice cream sundae!

8nasmith 11-24-2003 05:22 AM

ha ha ha wow i never got it to work rthough i am not very good with the commands

8nasmith 11-24-2003 05:23 AM

www.gento.org i think!! doent really help me

yapp 11-24-2003 05:57 AM

Thank you for all the replies. :) I'm a little amazed. thanks.

Quote:

this may sound dumb, but you arent in the /usr directory when you are trying to unmount it?
also, have you tried rebooting and then resizing the partition?

I've returned to single-user mode. (telinit 1), and logged in again; my working directory is /root/. No programs are running except the agetty processes, /bin/bash, and the kernel threads.

Quote:

It used to be that *nix didn't need usr to function, and usr was mostly glitter, but now a lot of the core programs are in usr
What kind of programs? :( I thought a linux system is supposed to work without /usr, because all essential tools are in /bin, /sbin, and /lib :confused:


Quote:

you have of course still got your gentoo live cd.... you can always just boot to that...
I have knoppix on cd, and slackware is still the default OS. However, I don't like the idea of rebooting to resize an non-root partition. ;) If I remove slackware, I want this thing to work as well. .. without using knoppix, or having to download that live CD, because my system was installed from a stage 1 tarbal.




@8nasmith:
you could install gentoo from mandrake (while your system is running). emerging all packages from the chroot. If gentoo is completely working (and enabled in your boot manager), you could choose to make gentoo your default OS. I've found the installation howto very helpfull, and the rest of the howto's too. The screen command is very useful to keep your machine compiling while you logoff.. but I have to agree.., you need to work in the console a lot, but it's a great way to learn it :)

teval 11-24-2003 03:53 PM

Yes.. supposed to
use strace to find out if the programs you need depend on libs from /usr

info strace
Or.. ltrace, not sure which is better for this case :P

yapp 12-01-2003 03:50 AM

I've been able to solve my problem :)

"fuser -v -m" showed that /bin/login was using the /usr partition. The /bin/login program keeps running after a login, something that I didn't see with slackware before (as far as I can remember)

However, the most odd problem: If I reboot the machine without /usr being mounted, /bin/login still works. I can login to a shell, the profile gets some problems because /usr/bin/whoami can't be found, etc.. but it's working. I can even mount and unmount /usr/

After some experiments I've discovered that it was possible to kill the running login process. a new agetty will be spawned, but it shares the terminal with the shell (which is also running at that time), this makes it impossible to type new input.

But something like this seams to work:
Code:

killall login; sleep 0.2; umount /usr; exit
you'll get a new agetty login, and the shell will unmount /usr before it exits. After entering your username, the new /bin/login won't use /usr.. :D and you can start resizing the /usr partition with resize_reiserfs.

perhaps I should submit this problem to the gentoo developers :confused: I find this problem very weird, and I can't believe this is intentional :P

8nasmith 12-02-2003 11:03 AM

thanks that a brill site gentoo is great got it working and running thanks loads


All times are GMT -5. The time now is 09:29 AM.