Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: danielibarnes on July 14, 2009, 02:32:54 PM

Title: 2.1: Can't remount read-only
Post by: danielibarnes on July 14, 2009, 02:32:54 PM
If I have a .tcz loaded, when I shutdown I get the message:
umount: Can't remount /dev/hda read-only
after "Unmounting all filesystems..."

On startup, I have to e2fsck /dev/hda:
/dev/hda was not cleanly unmounted, check forced.

This is a pretty big problem; I can't be the only one seeing it unless I'm doing something completely wrong. Does anyone have any ideas? It appears as though the loop processes aren't killed. If I umount and losetup -d all of the loop devices then I can shutdown without error.

Steps to reproduce:
1) Boot TC 2.1
2) Log in as tc user and tce-load any .tcz extension
3) shutdown or reboot

This occurs on a standard 2.1 release with no additional boot options.

Thanks,
Daniel
Title: Re: 2.1: Can't remount read-only
Post by: danielibarnes on July 15, 2009, 03:39:57 PM
Does anyone else see this error? Adding the following to /etc/init.d/rc.shutdown right before "/bin/umount -arf" prevents it:

for loop in $(losetup -a|cut -d: -f1); do umount -d $loop 2>/dev/null; done
for loop in $(losetup -a|cut -d: -f1); do umount -d $loop 2>/dev/null; done

It is repeated twice in case there is a loop device mounted within a loopback file.
Title: Re: 2.1: Can't remount read-only
Post by: roberts on July 15, 2009, 05:26:34 PM
I have not experienced...
Quote
On startup, I have to e2fsck /dev/hda:
/dev/hda was not cleanly unmounted, check forced.
However, I see no reason not to add code to specifically unmount mounted loop files. You suggestion will be in the next RC.
 
Thanks for your input..