View previous topic :: View next topic |
Author |
Message |
dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Tue Oct 30, 2012 10:24 am Post subject: unclean reboot,missing service stop,device unmount |
|
|
What triggers the clean unmount of my mounted filesystems on the reboot command?
When I do reboot, it (open-rc?) only does a:
* Stopping local ..
* Saving random seed ...
* Deaktivating swap devices ....
REBOOT
no stoping services
no unmounting loop devices
I just noticed it because on boot it shows /dev/sda1 filesystem recovery message. |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Fri Nov 02, 2012 1:06 am Post subject: |
|
|
Okay, I poked around a little. The messages you report are (unsuprisingly) from these /etc/init.d scripts:This means some services are shutting down as expected. This leads me to suspect that you may simply have a configuration problem. Running "rc-update show" should show you a list of all services and what run levels they are in. Sometimes "ls /etc/runlevels/*" gives a more informative output.
Poking around further I see that the localmount service is responsible for umounting the file systems you are having trouble with. On start-up it is also in charge of mounting filesystems in /etc/fstab that don't have the "noauto" option. You want to make sure localmount is in your "boot" run level. One way to check this is "rc-update show | grep localmount". If it is not in the "boot" runlevel then add it: "rc-update add localmount boot".
Since yours is a special case running from a squashfs file, and you already have all (?) your file systems mounted before localmount runs at start-up, make sure that entries in /etc/ftab for filesystems that are already mounted have the "noauto" option set in fstab. This may not be needed, but better safe than sorry. |
|
Back to top |
|
|
dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Fri Nov 02, 2012 4:51 pm Post subject: |
|
|
I checked your hints but services seems to look okay...
rc-update show
Code: |
alsasound | default
bootmisc | boot
dbus | default
devfs | sysinit
dmesg | sysinit
fancontrol | default
fsck | boot
gpm | default
hostname | boot
hwclock | boot
ipcheck | default
keymaps | boot
killprocs | shutdown
lm_sensors | default
local | default
localmount | boot
modules | boot
mount-ro | shutdown
mtab | boot
net.eth0 | default
net.lo | boot
netmount | default
procfs | boot
root | boot
savecache | shutdown
sshd | default
swap | boot
sysctl | boot
syslog-ng | default
termencoding | boot
udev | default sysinit
udev-postmount | default
urandom | boot
|
ls /etc/runlevels/*
Code: |
/etc/runlevels/boot:
bootmisc hostname keymaps modules net.lo root sysctl urandom
fsck hwclock localmount mtab procfs swap termencoding
/etc/runlevels/default:
alsasound fancontrol ipcheck local netmount syslog-ng udev-postmount
dbus gpm lm_sensors net.eth0 sshd udev
/etc/runlevels/shutdown:
killprocs mount-ro savecache
/etc/runlevels/sysinit:
devfs dmesg udev
|
Concerning my fstab you're absolutely right, I did not add the drive to it (/dev/sda1). I usually mounted the drive manually without touching the fstab in the hope that it will be added automatically to the mtab and read out from there on reboot. I added it now to my fstab and it works now on reboot
But for the rest its still very odd to me. After "Deaktivating swap devices ..." follows the reboot, without disabling the rest of the services (I guess unmounting loop devices .. stopping eth0 ....etc). Well since I use Gentoo "in RAM" without persistence of changes on reboot I think it doesnt matter to stop the remainding services in a correct way. But it still needles me whats going wrong here... |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Sat Nov 03, 2012 5:23 pm Post subject: |
|
|
dasPaul wrote: | Concerning my fstab you're absolutely right, I did not add the drive to it (/dev/sda1). I usually mounted the drive manually without touching the fstab in the hope that it will be added automatically to the mtab and read out from there on reboot | I think you may have pinpointed the problem. The drive does get added to /etc/mtab automatically but when you bind-mount a new /etc/mtab it does not get moved over to the new location automatically.
You need to either copy /etc/mtab to /mnt/tmpfs/etc/mtab or make sure your original /etc/mtab and the /etc/mtab on your squashfs are both symlinks to /proc/mounts. But before you change things, take a quick peek and make sure this is the problem by seeing if the drive shows up in /proc/mounts but not in /etc/mtab (after you've booted).
Note to others: I'm referring to this post. |
|
Back to top |
|
|
|