Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutdown process linux problem

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
BE
Hello,
I made a bootable cdrom that boots up correctly;
but it does not shut down correctly.

My system has a flash (see it as sort of small hd on a chip)
a cdrom and a ram disk (from which it boots).
On the ramdisk there is only the necessary to boot until the
cd gets mounted. I have link files for /bin and /sbin and some more to the /mnt/cdrom where those files are. The /etc is linked to my flash because the flash is RW and the cd not of course. So all the files that don't change are linked to my cdrom,and the ones that do are linked to my flash or to my ramdisk self is they are from no importance..

The problem is that when I want to shutdown, I get messages about

sending all processes the Term signal...
sending all processes the Kill signal...


(I don't get 'md: recovery thread got woken up' whatever that is.. then I get mount errors)

Unmounting file systems: umount2:Device or resource busy
umount: /dev/hdb: not mounted
umount: /mnt/cdrom: Illegal seek
umount2:Device or resource busy
umount: /mnt/cdrom: device is busy
umount2:Device or resource busy
umount: /mnt/cdrom: device is busy
umount2:Device or resource busy
umount: /mnt/cdrom: device is busy
FAILED

INIT: no more processes left in this runlevel
kill 1084: No Such process


then the system hangs, when I do a ctrl alt del I get the message:
You don't exist. Go away.

The pid (1084) changes everytime,it is the pid from a new process that was started during shutdown,because the number is always higher than the highest number I had when I did a ps -ef.

When I do a halt -f, it works,but thats not very clean.
I don't mind that the cdrom is not unmounted when I reboot, as my root filesystem is the ramdisk itself,and I can not break that. I am worried about the flash disk that is not cleanly unmounted after a halt -f,because flash disks can get broken.

Can anyone help me please ??

Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
To bad I didn't get any answers on this one..
But meanwhile I have figured it out myself.

What I did was simply change the rebot and halt scripts with an -f option. That way, the cdrom doesn't get unmounted but thats ok, as it is a ramdisk from whichI work and not a hd.
Another solution that I havn't tried is:putting libc.so.6 on my ramdisk and also umount. That should work but I havn't tried it yet. (if umount an libc.so.6 are not on the cd anymore, the cdrom can't be busy if you execute them from somewhere else)
thnx anyway. Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top