LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-10-2020, 01:39 PM   #1
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Question Reboot without properly unmounting after install


While playing with -Current, I noticed that after the install and when given the option to reboot, the system pretty much almost instantly reboots, which begs the question - does the newly formatted partitions even get properly unmounted? It seems not because when I boot into the new system, JFS runs fsck, and also the kernel complains that the vfat partition (EFI), is now dirty because it was not properly unmounted. So, has anyone else noticed this? Can anyone else duplicate this, and shouldn't the installer unmount the newly created partitions after the install? I thought at one point Slackware has already done this, but now I am not so sure.
 
Old 01-10-2020, 01:54 PM   #2
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: West Africa
Distribution: Slackware/Debian (when necessary)
Posts: 2,409
Blog Entries: 1

Rep: Reputation: 87
Are you doing this on a dual boot system?

Generally I see this error when I am using a dualboot system with Win10 and Win10 failed to "unmount" it's partitions correctly. This usually relates to either a forced shutdown of Windows or it's "fake shutdown" that it has enabled by default. Easiest solution here is to just not boot into Windows what-so-ever, so that's generally the route I take

In theory, any other OS which also had that partition mounted and failed to shut down correctly could cause such an issue as well.
 
Old 01-10-2020, 09:32 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,493

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
windows. whenever I am in it, it just pick reboot, and not shutdown. this way it marks its drives read writeable still.
 
Old 01-11-2020, 12:41 AM   #4
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
This is not a dual boot, it is just a VM. I will also create another Slackware Current VM (Non EFI), just to see what happens, but I am fairly certain I am correct in that after the install and you say yes to reboot, it just restarts the system without any sort of delay which to me suggests the filesystem (whatever it may be, ext*, JFS, etc) are not properly unmounted - though thats my hypothesis, I plan to retry when I have more time to confirm this or debunk this; but again if anyone else wants to try that would be great, as another pair of eyes would be appreciated on this.

Last edited by Jeebizz; 01-11-2020 at 03:52 AM.
 
Old 01-11-2020, 11:47 AM   #5
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Non EFI Slackware VM, but it does look like the installer does not properly unmount all filesystems, since JFS runs fsck:
Click image for larger version

Name:	VirtualBox_Slackware_11_01_2020_10_45_10.png
Views:	22
Size:	33.2 KB
ID:	32264Click image for larger version

Name:	VirtualBox_Slackware_11_01_2020_10_45_12.png
Views:	19
Size:	31.9 KB
ID:	32265
 
Old 01-11-2020, 03:10 PM   #6
hpfeil
Member
 
Registered: Nov 2010
Location: Tucson, Arizona US
Distribution: Slackware Current
Posts: 171
Blog Entries: 1

Rep: Reputation: Disabled
I noticed the same behavior on two new slackware-current installs. When you log in as root after the first reboot, just
'umount /dev/sda1' (usually the EFI partition), 'fsck /dev/sda1', 'mount /dev/sda1'. Thereafter, it will umount cleanly with the rest of the mounts during reboot or shutdown. The problem is that the "dirty bit" doesn't get cleaned after setup installs efibootmgr on the EFI partition. No data corruption, safe to ignore. Initrd will fsck it next reboot.
 
1 members found this post helpful.
Old 01-12-2020, 01:11 PM   #7
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
I haven't retried EFI, this time though using mostly ext4 (XFS for home still), and I am sure that this is proving my theory, it is still not unmounting all fileystems, particularly the / partition, I even tried umount -f prior to rebooting but it refuses (getting fs busy).
Click image for larger version

Name:	VirtualBox_Slackware_12_01_2020_12_01_33.png
Views:	10
Size:	9.0 KB
ID:	32271Click image for larger version

Name:	VirtualBox_Slackware_12_01_2020_12_02_06.png
Views:	8
Size:	33.8 KB
ID:	32272Click image for larger version

Name:	VirtualBox_Slackware_12_01_2020_12_04_09.png
Views:	14
Size:	33.6 KB
ID:	32273

Back to EFI, sure you could boot into Windows to maybe repair the EFI partition, but I don't have Windows anymore (or just ignore the error if you don't have OCD), but I also tried fsck.vfat the EFI partition and just got a seek error. I am also having a sense of Déjà vu here as I feel I have made a post about this before, oh well. Still I am fairly confident in my findings; whether or not it warrants any response from BDFL though, who knows - it is just my observations.
 
1 members found this post helpful.
Old 01-13-2020, 01:33 AM   #8
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,114

Rep: Reputation: 633Reputation: 633Reputation: 633Reputation: 633Reputation: 633Reputation: 633
Quote:
Originally Posted by Jeebizz View Post
it is still not unmounting all fileystems, particularly the / partition, I even tried umount -f prior to rebooting but it refuses (getting fs busy).
The / partition cannot be UNmounted (it is first mounted by the kernel itself, to get to the init process, not by any mount command) as shutdown itself is running FROM it.
On an installer that shouldn't matter as / is in a ram fs anyway and so after reboot will not be there anymore (the physical disks are NOT mounted on / then).
IN Slackware rc.6 does this:
Quote:
/bin/sync

echo "Remounting root filesystem read-only:"
/bin/mount -v -n -o remount,ro /
before halting or rebooting.
 
Old 01-13-2020, 01:52 AM   #9
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Quote:
Originally Posted by ehartman View Post
The / partition cannot be UNmounted (it is first mounted by the kernel itself, to get to the init process, not by any mount command) as shutdown itself is running FROM it.
On an installer that shouldn't matter as / is in a ram fs anyway and so after reboot will not be there anymore (the physical disks are NOT mounted on / then).
IN Slackware rc.6 does this:
before halting or rebooting.
That suggests that Slackware never unmounted a filesystem post install, and issued the reboot command which I am not so sure. Plus AFAIK other distros have from what I have seen properly unmounted filesystems prior to reboot after install.
 
Old 01-13-2020, 11:20 AM   #10
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Under EFI, I tried syncing but still would not let me unmount although this time I was able to run fsck on the EFI partition and repair it. Still at this point I think I have proven that the installer does not unmount partitions post install prior to reboot - I take it there is no way to remedy this though?
Click image for larger version

Name:	VirtualBox_SlackwareEFI_13_01_2020_10_17_06.png
Views:	10
Size:	10.0 KB
ID:	32280Click image for larger version

Name:	VirtualBox_SlackwareEFI_13_01_2020_10_17_29.png
Views:	5
Size:	34.5 KB
ID:	32281Click image for larger version

Name:	VirtualBox_SlackwareEFI_13_01_2020_10_18_21.png
Views:	8
Size:	27.2 KB
ID:	32282
 
Old 01-13-2020, 03:37 PM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,174

Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
Still at this point I think I have proven that the installer does not unmount partitions post install prior to reboot
No. All not yet unmounted filesystems but proc are unmounted by this command in /etc/inittab in the installer, executed just before rebooting or halting it:
Code:
::shutdown:/bin/umount -a -r >/dev/null 2>&1

Last edited by Didier Spaier; 01-13-2020 at 03:38 PM.
 
Old 01-13-2020, 05:08 PM   #12
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 1,811

Rep: Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817Reputation: 5817
Quote:
Originally Posted by Didier Spaier View Post
No. All not yet unmounted filesystems but proc are unmounted by this command in /etc/inittab in the installer, executed just before rebooting or halting it:
Code:
::shutdown:/bin/umount -a -r >/dev/null 2>&1
Well... that's how it used to work, but the behavior of busybox's "reboot" changed at some point. The first symptom was that reboot simply quit working. It was replaced with a shell script that added the -f option, and that led to a fast reboot without unmounting (possibly without syncing).

The last installer rebuild fixed all this, and it should be working now. Jeebizz got a thanks in source/installer/ChangeLog.txt for it.

Thanks again! If there's still a problem, let me know.
 
1 members found this post helpful.
Old 01-14-2020, 01:01 AM   #13
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Quote:
Originally Posted by volkerdi View Post
Well... that's how it used to work, but the behavior of busybox's "reboot" changed at some point. The first symptom was that reboot simply quit working. It was replaced with a shell script that added the -f option, and that led to a fast reboot without unmounting (possibly without syncing).

The last installer rebuild fixed all this, and it should be working now. Jeebizz got a thanks in source/installer/ChangeLog.txt for it.

Thanks again! If there's still a problem, let me know.
So it is ready to test? The installer source is updated but I don't see anything on the changelog itself (main changelog)

Also does it handle all conditions (that I can think of)
  • Selecting Yes to reboot on the Installer menu
  • Selecting No to reboot, being dropped in prompt and issuing reboot command
  • Selecting No to reboot, being dropped in prompt and issuing ctr+alt+del keystroke

Last edited by Jeebizz; 01-14-2020 at 01:03 AM.
 
Old 01-15-2020, 03:02 AM   #14
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,797

Original Poster
Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Talking Resolved!

1st case, choosing yes to restart
Click image for larger version

Name:	VirtualBox_SlackwareEFI_15_01_2020_01_46_09.png
Views:	11
Size:	5.9 KB
ID:	32294Click image for larger version

Name:	VirtualBox_SlackwareEFI_15_01_2020_01_48_14.png
Views:	13
Size:	5.7 KB
ID:	32295
2nd case, issuing reboot command in prompt
Click image for larger version

Name:	VirtualBox_SlackwareEFI_15_01_2020_01_55_08.png
Views:	13
Size:	4.2 KB
ID:	32296Click image for larger version

Name:	VirtualBox_SlackwareEFI_15_01_2020_01_55_18.png
Views:	13
Size:	7.3 KB
ID:	32297
3rd case, ctrl+alt+delete
Click image for larger version

Name:	VirtualBox_SlackwareEFI_15_01_2020_01_58_43.png
Views:	17
Size:	7.7 KB
ID:	32298

It looks like it is now resolved, thank you Pat for fixing this!
 
Old 01-15-2020, 04:37 AM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,174

Rep: Reputation: Disabled
And here's the magic in build_installer.sh:
Code:
# Hack reboot to call reboot -f:
rm -f $PKG/$ARCH-installer-filesystem/sbin/reboot
( cd $PKG/$ARCH-installer-filesystem/bin ; ln -sf busybox reboot )
cat << EOF > $PKG/$ARCH-installer-filesystem/sbin/reboot
#!/bin/sh
echo "Sending all processes the SIGTERM signal."
/sbin/killall5 -15
/bin/sleep 2
echo "Sending all processes the SIGKILL signal."
/sbin/killall5 -9
/bin/sleep 2
echo "Syncing filesystems."
sync
echo "Unmounting filesystems:"
# Try to unmount these bind mounts first to prevent them from blocking unmount of the target /:
umount /mnt/dev 2> /dev/null
umount /mnt/proc 2> /dev/null
umount /mnt/sys 2> /dev/null
/bin/umount -v -a -t no,proc,sysfs,devtmpfs,fuse.gvfsd-fuse,tmpfs
sync
echo "Rebooting."
if [ -z "\$*" ]; then
  /bin/reboot -f
else
  /bin/reboot \$*
fi
EOF
chmod 755 $PKG/$ARCH-installer-filesystem/sbin/reboot
Thanks Pat and sorry for my misunderstanding.

PS
Quote:
Originally Posted by Jeebizz View Post
So it is ready to test? The installer source is updated but I don't see anything on the changelog itself (main changelog)
This is mentioned in the installer's changelog:
Code:
Sun Jan 12 20:36:57 UTC 2020
  /sbin/reboot: Attempt to kill running processes and sync/umount/sync
  filesystems before rebooting. Thanks to Jeebizz.
+--------------------------+

Last edited by Didier Spaier; 01-15-2020 at 05:18 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Question: Unmounting /boot after reboot haertig Linux - Software 6 05-05-2017 06:56 PM
Recovering Data After Disconnecting External HD Without Unmounting dsschanze Linux - General 3 11-11-2012 11:54 AM
Properly Unmounting RAID Drive in Recovery Mode DaveJL Linux - Software 1 03-10-2010 04:26 PM
unmounting all nfs filesystems without unmounting local ones kaplan71 Linux - General 1 03-05-2009 12:00 PM
Red Hat: Can't mount external hard drives anymore. Was rebooted without unmounting jwhitman Linux - General 5 04-21-2008 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration