umount script doesn't always work in BionicPup64 8.0

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

umount script doesn't always work in BionicPup64 8.0

Post by williams2 »

I think I have mentioned this bug before.

The umount script in BionicPup64 8.0 sometimes doesn't work properly.

For example:

Code: Select all

# mount-FULL 
tmpfs on /initrd/mnt/tmpfs type tmpfs (rw,relatime)
unionfs on / type aufs (rw,relatime,si=b7114cdb206dc507)
/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
/dev/loop1 on /initrd/pup_z type squashfs (ro,noatime)
/dev/loop2 on /initrd/pup_a type squashfs (ro,noatime)
tmpfs on /initrd/files type tmpfs (ro,relatime,size=5404k,mode=755)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1812800k,nr_inodes=453200,mode=755)
none on /proc type proc (rw,relatime)
none on /dev/pts type devpts (rw,relatime,gid=2,mode=620,ptmxmode=000)
none on /sys type sysfs (rw,relatime)
shmfs on /dev/shm type tmpfs (rw,relatime,size=773392k)
/dev/sda4 on /mnt/home type fuseblk (rw,noatime,user_id=0,group_id=0,default_permissions,blksize=4096)
# 
# partview 
de: invalid drive
de: invalid drive
de: invalid drive
de: invalid drive
EXIT="OK"
# 
# mount-FULL 
tmpfs on /initrd/mnt/tmpfs type tmpfs (rw,relatime)
unionfs on / type aufs (rw,relatime,si=b7114cdb206dc507)
/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
/dev/loop1 on /initrd/pup_z type squashfs (ro,noatime)
/dev/loop2 on /initrd/pup_a type squashfs (ro,noatime)
tmpfs on /initrd/files type tmpfs (ro,relatime,size=5404k,mode=755)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1812800k,nr_inodes=453200,mode=755)
none on /proc type proc (rw,relatime)
none on /dev/pts type devpts (rw,relatime,gid=2,mode=620,ptmxmode=000)
none on /sys type sysfs (rw,relatime)
shmfs on /dev/shm type tmpfs (rw,relatime,size=773392k)
/dev/sda4 on /mnt/home type fuseblk (rw,noatime,user_id=0,group_id=0,default_permissions,blksize=4096)
/dev/sda1 on /mnt/sda1 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sda2 on /mnt/sda2 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,quiet,utf8,errors=remount-ro)
/dev/sda5 on /mnt/sda5 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sda6 on /mnt/sda6 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
#
Running partview leaves 4 partitions mounted that should have been unmounted, but were not unmounted.

I have noticed that sometimes a file system that I had mounted manually, does not umount when it should.

So I made a sctipt named mo that executes mount-FULL and a script named um that executes umount-FULL.
I could have used aliases or bash subroutines or symlinks. I chose to use scripts.

Anyway, umount and maybe mount doesn't always work properly.

Code: Select all

# um /mnt/sda1 /mnt/sda2 /mnt/sda5 /mnt/sda6
# mo | grep sda
/dev/sda4 on /mnt/home type fuseblk (rw,noatime,user_id=0,group_id=0,default_permissions,blksize=4096)
#
By the way, the mount, umount and partview scripts are all unmodified.

Code: Select all

# diff /bin/mount /initrd/pup_ro2/bin/mount
# diff /bin/umount /initrd/pup_ro2/bin/umount
# wh partview
/usr/sbin/partview
# diff /usr/sbin/partview /initrd/pup_ro2/usr/sbin/partview
#
williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: umount script BionicPup64 8.0

Post by williams2 »

I just tried running partview in BionicPup64 in ram only, with no savefile/folder/adrv.sfs

umount did work properly.

So it is probably something that was changed that is saved in my adrv.sfs

I can't see anything that would cause a problem. Not yet, anyway.
Maybe some sort of globbing config problem?
User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: umount script doesn't always work in BionicPup64 8.0

Post by Jafadmin »

I find that using the '-l' (lazy unmount) switch in umount solves a lot of those problems.
williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: umount script doesn't always work in BionicPup64 8.0

Post by williams2 »

uextract extracts the files in a .img file by first mounting the .img file (which is a .sfs file system) on a mount point in /tmp/ and then unmounts the mount point.

The umount script does not umount the mount point properly, on my BionicPup64, so after uextract runs it leaves the mount point in /tmp/ still mounted.

The umount script always seems to run the rox_umount function in /usr/local/pup_event/frontend_rox_funcs as if the .img file is a device, not a loop mounted file, and this fails without an error exit code (number).

If in /bin/umount, I change this:

Code: Select all

	rox_umount "$@"
else
	umount-FULL -d "$@"
fi

to this:

Code: Select all

	rox_umount "$@"
fi
umount-FULL -d "$@"

it works. Whether it was intended to work that way, I don't know.

P.S. the -l option does not help, it's not having difficulties unmounting a valid mount point, it is trying to unmount a file as if it were a device, like a hard drive partition or a usb drive. Yes, there is a loop device associated with that file, but umount is not trying to unmount that loop device.

Post Reply

Return to “Bug Reports”