WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Trouble unmounting auto-mounted disk  (Read 3679 times)

Offline derschueddi

  • Newbie
  • *
  • Posts: 2
Trouble unmounting auto-mounted disk
« on: May 02, 2015, 04:40:12 AM »
Hello there,

I currently run into problems when I try to unmount a device which is locked by something in TC I don't understand at this point.

When Tinycore boots it looks like it tries to mount all devices in finds, as I can see by dmesg:

tc@box:~$ dmesg |grep sda
sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 < sda5 sda6 >
sd 0:0:0:0: [sda] Attached SCSI disk
Adding 11700220k swap on /dev/sda5.  Priority:-2 extents:1 across:11700220k FS

Devices appear in fstab after boot, but are unmounted again ???

tc@box:~$ cat /etc/fstab | grep sda
/dev/sda1       /mnt/sda1       ext3     noauto,users,exec,relatime 0 0 # Added by TC
/dev/sda5       none            swap     defaults             0 0 # Added by TC
/dev/sda6       /mnt/sda6       ext3     noauto,users,exec,relatime 0 0 # Added by TC
tc@box:~$ df
Filesystem                Size      Used Available Use% Mounted on
rootfs                    2.6G    611.8M      2.0G  23% /
tmpfs                     1.4G         0      1.4G   0% /dev/shm
/dev/loop0              136.0K    136.0K         0 100% /tmp/tcloop/dropbear
/dev/loop1              296.0K    296.0K         0 100% /tmp/tcloop/libevent
tc@box:~$


But my problem is that I want to use disk sda for restoring another device, but I cannot use it, even though its not mounted:

tc@box:~$ sudo umount /dev/sda1
umount: can't umount /dev/sda1: Invalid argument
tc@box:~$ sudo mount /dev/sda1
mount: mounting /dev/sda1 on /mnt/sda1 failed: Device or resource busy

There are no open files:

tc@box:~$ lsof |grep sda
tc@box:~$


Can someone please give me a hint how this automount option at boottime behaves and why I can't just u/mount the device after boot? This is weird.

Thanks, derschueddi

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Trouble unmounting auto-mounted disk
« Reply #1 on: May 02, 2015, 05:52:01 AM »
Core only mounts drives that contain the tce, home, or opt directories.
These cannot be umounted.
If you want to umount /dev/sda you must be sure that all extensions on /dev/sda/tce are loaded with the copy2fs option.