You are not logged in.

#1 2014-09-27 14:21:12

Ayutac
Member
Registered: 2014-09-27
Posts: 1

My USB-Stick is marked busy even though not mounted (?)

Also Subject lines are too short.

Hello there, my name is Ayutac, I use Arch for some while now and I probably screwed up.

tl;dr: My USB-Stick is marked busy even though not mounted (?)

Previous History: I was trying to get the newest Arch iso on a stick of my friend, so I got the iso here and moved the stick's content to my extern hard drive. I used the opportunity to experiment how good "mv -t target_dir *" would work and interrupted it because I was stupid. Two folders somehow weren't movable through mv anymore, so I mv'ed everything else – now explicit – and moved the content of the two folders via pcmanfm. After that there were about 16kB on the stick left.
Next I copied the iso using

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdc && sync

as suggested by the wiki. I looked at the stick; to my surprise the two folders I left there where still there, though filled with gibberish data. I thought I might give it a try, shut down, booted from stick. Black screen with a blinking text cursor for minutes. I concluded it didn't work and tried some other way. Following the wiki I was given the task to format the usb stick anew.
Thinking I knew what I was doing I used fdisk several times (including rebooting), getting myself two partitions with FAT32 (or so I think). But that somehow screwed it up.

The problem: After partioning and rebooting it seems I can't mount the partitions to copy the content of the iso. lsblk says

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0  21.7G  0 part 
├─sda2   8:2    0   350M  0 part 
├─sda3   8:3    0  95.4G  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0  95.4G  0 part /
├─sda6   8:6    0   7.6G  0 part [SWAP]
└─sda7   8:7    0 711.1G  0 part /home
sdb      8:16   0 465.8G  0 disk 
└─sdb1   8:17   0 465.8G  0 part /run/media/nait/nanika
sdc      8:32   1   3.6G  0 disk 
├─sdc1   8:33   1   650M  0 part 
└─sdc2   8:34   1     3G  0 part 
sr0     11:0    1  1024M  0 rom  

(sdc is the stick) but I get

> sudo mount /dev/sdc1 /mnt/usb
mount: /dev/sdc1 is already mounted or /mnt/usb busy
> sudo umount /mnt/usb
umount: /mnt/usb: not mounted

Furthermore "lsof | grep sdc" returns nothing, neither does "cat /proc/mounts | grep sdc" or "cat /etc/mtab | grep sdc". The only clue is

> systemctl -a | grep sdc
  dev-sdc.device                                                                                             loaded    active   plugged   1000 ARCH_201409
  dev-sdc1.device                                                                                            loaded    active   plugged   1000 ARCH_201409
  dev-sdc2.device                                                                                            loaded    active   plugged   1000 ARCH_201409
  sys-devices-pci0000:00-0000:00:14.0-usb3-3\x2d3-3\x2d3:1.0-host9-target9:0:0-9:0:0:0-block-sdc-sdc1.device loaded    active   plugged   1000 ARCH_201409
  sys-devices-pci0000:00-0000:00:14.0-usb3-3\x2d3-3\x2d3:1.0-host9-target9:0:0-9:0:0:0-block-sdc-sdc2.device loaded    active   plugged   1000 ARCH_201409
  sys-devices-pci0000:00-0000:00:14.0-usb3-3\x2d3-3\x2d3:1.0-host9-target9:0:0-9:0:0:0-block-sdc.device      loaded    active   plugged   1000 ARCH_201409

I tried to shut the devices down, but that didn't seem to work.

Furthermore the pcmanfm shows two mount points of the iso/stick but returns error message when clicking on them:

Error mounting /dev/sdc1 at /run/media/nait/ARCH_201409: Command-line `mount -t "iso9660" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=100,iocharset=utf8,mode=0400,dmode=0500" "/dev/sdc1" "/run/media/nait/ARCH_201409"' exited with non-zero exit status 32: mount: /dev/sdc1 is write-protected, mounting read-only
mount: /dev/sdc1 is already mounted or /run/media/nait/ARCH_201409 busy

Goal:
1. Make the stick usable again, with 2 partitions.
2. Copy the iso on the first partition.
3. Have a functioning Arch booting stick.

Offline

#2 2014-09-27 16:16:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: My USB-Stick is marked busy even though not mounted (?)

Welcome to Arch Linux.

A few questions and comments.  First, are the files you copied from the disk safe?  Since the plan was to wipe the disk anyway, I would suggest next time copying rather than moving files.  I always get itchy when I move files.  I have made some stupid mistakes where I copied hundreds of files to one output file, each one overwriting the previous.  Of course, as it was a move, the source file was gone as well.  Fortunately, I maintain backups.   I would also suggest you look into the rsync facility when doing bulk copies.

That said, another excellent way to destroy data is the dd command (There are those who claim dd means just that)  Are you certain that the usb disk had been been placed at the /dev/sda node?  In the thread title, you made the assertion that the drive was not mounted.  dd will run just fine even if the disk is mounted (I do not recommend this).  What were you using to look at those folders that had become full of gibberish?  Command line tools?  A graphical file manager? (Nautilus, Thunar, Dolphin, SpaceFM)  It is possible that the tool you were using was unaware that the contents had changed and was using cached information.

As to your goals.  First, copying the iso to /dev/sdc tells the system to use the entire device for the iso, not the first partition.  Our iso is not designed to be placed in a partition, I don't think you will meet with success trying to block copy the iso to a partition.  If you want to try it, the destination would be /dev/sda1 (for partition 1)  Make sure the partition is large enough.  I would suggest that you use the entire disk by dd'ing the iso to the /dev/sdc (assuming it is c) node, but make certain that all of the partitions are dismounted.  I know you think you did that, but I have my doubts.   Please use command line tools.  I don't trust GUIs that try to help too much.

If you want multiple partitions, use fdisk and re-partition the device.  Then create a file system in each of those partitions. 

It has been a while since I have tried to master a USB that will boot.   I may have a faulty memory, or I may be using really old, outdated, information, but...  I think that a USB has to boot as if it were a CD drive .  I am not certain that a hard drive type structure with multiple partitions and a MBR will work on a USB drive (edit)and have it be bootable.  In other words, goal 1 and goal 2 might not be achievable if goal 3 means that the disk will boot.   I could  be wrong.

Last edited by ewaller (2014-09-27 16:18:25)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB