Tag Info

New answers tagged

0

I'm not sure it matters that much. You could fdisk -l /dev/sda ; However, usually /dev/sda is your hard or SSD disk, and the USB stick would be e.g. /dev/sdi (then run fdisk -l /dev/sdi). Do a dmesg just after plugging the stick to find out. Be careful: very often /dev/sda is your system disk. Once a file system is mounted from the USB key, you might run ...


0

Might be a bit overkill, but SystemTap could help you identify what process is doing i/o on that disk. Prepare SystemTap [root@localhost ~]# stap-prep snip Install trace script [root@localhost ~]# cat >/tmp/traceio2.stp #! /usr/bin/env stap global device_of_interest probe begin { /* The following is not the most efficient way to do this. One ...


0

You might have messed the USB drive, since dmesg is showing errors trying to read the device descriptor... so there is a chance of descriptor corruption. But as far as I see, the system recognizes your drive at the end. If you have udev in your Linux, try to see if the device is under /dev/disk/by-id/usb-*manufacturer_serialnumber*. In your case try with ...


0

Installed Arch linux on the pendrive or used it to install Arch linux on hard drive ? You may try again after running sudo partprobe on Linux. There is a very good chance of killing your USB drive, during a reboot while some data is still writing or reading on the drive. If possible always do a sync before removing any pendrive or harddrive.


1

This is simple syntax error. You are entering the wrong commands and for the wrong reasons. Assuming your OpenWRT install has the required packages (block mount, filesystem kmod, etc.), your issues are: Step 5. You are trying to cd (change directory) into a device. /dev/sdc is a 'special file' (aka a device) not a directory. Step 9. You created /media/usb ...


0

You may try to solve it in a different way. If both hard drives are 2.5" (most probably they are), remove the case of external HDD and replace the crashed internal HDD with external one. Internal SATA adapter is much faster than USB, and you may try data recovery from the crashed internal drive. Assuming you have some knowledge about hardware and a little ...


1

write a udev rule which first mounts the USB-drive and second runs my-script # cat /etc/udev/rules.d/11-media-by-label-with-pmount.rules KERNEL!="sd[a-z]*", GOTO="media_by_label_auto_mount_end" ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="media_by_label_auto_mount_end" # Get label PROGRAM=="/sbin/blkid -o value -s LABEL %N", ENV{dir_name}="%c" # use ...


0

Ok, I pulled out the cable and it is almost certainly just a USB2 cable. The inserts are white. I will have to buy a USB3 cable, and if that fixes the problem, I will mark this answer as accepted.


1

Linux has no hook that runs when a device is mounted in all circumstances. Udev handles devices when they appear in the system. It can run a command at that point (example). Although you can run mount from udev, this conflicts with Udisks, and in particular doesn't work on systems using systemd. It's possible to monitor mounts performed by Udisks, but I ...


1

I've managed to solve this problem, but I'm still wonder if there's a better and easier solution. Anyways, if you have bad blocks at the beginning of the device and you are unable to burn a live image, you should make two partitions: Then you download an image and check its first partition's offset: # parted ...


1

If there is enough space at the beginning of the drive to install GRUB (or any other bootloader really), and the LiveCD supports loop-mounting ISO, you can create a filesystem that has the bad blocks mapped out or you can partition it to avoid bad blocks in the first place. Example grub.cfg boot entry for a Ubuntu Live CD: menuentry "Ubuntu 15.04 Desktop ...



Top 50 recent answers are included