Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unclean reboot,missing service stop,device unmount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Tue Oct 30, 2012 10:24 am    Post subject: unclean reboot,missing service stop,device unmount Reply with quote

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
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Fri Nov 02, 2012 1:06 am    Post subject: Reply with quote

Okay, I poked around a little. The messages you report are (unsuprisingly) from these /etc/init.d scripts:
Code:
local
urandom
swap
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
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Fri Nov 02, 2012 4:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Sat Nov 03, 2012 5:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum