Mostrando entradas con la etiqueta USB. Mostrar todas las entradas
Mostrando entradas con la etiqueta USB. Mostrar todas las entradas

mayo 20, 2019

Montar una USB en linux

How to Mount USB Drive in a Linux System?



Do you know “how to use USB memory sticks with Linux”, If you are not sure then this article describes “how to mount USB drive on a Linux system with command line interface”
Universal serial bus, or USB (also known as Flash drive), is an electronic communications protocol that is commonly used in computer accessories and other small devices. If you have an up-to-date Linux system and a modern Desktop environment, your device should show up on your desktop, with no need to open a console. There are few important factors which are involved in learning how to mount USB drive with Linux machine.
Following are the step by step instructions to understand further –

Step 1: Plug-in USB drive to your PC

GTY_usb_drive_jef_131204_16x9_992

Step 2 – Detecting USB Drive

After you plug in your USB device to your Linux system USB port, It will add new block device into /dev/ directory. To verify it, use the following command –
 $ sudo fdisk -l 
The sample output should be like this –
Disk /dev/sdb: 15.7 GB, 15664676864 bytes
255 heads, 63 sectors/track, 1904 cylinders, total 30595072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          32    30595071    15297520    c  W95 FAT32 (LBA)
We can observe from the above result that, device boot, blocks, id and system format are displayed.

Step 3 – Creating Mount Point

To mount the USB, use the following command –
$ mount /dev/sdb1 /mnt
To create a directory in the mounted device, use the following commands –
$ cd /mnt
/mnt$ mkdir john
The above command creates a directory called john in USB device.

Step 4 – Delete a Directory in USB

To delete a directory in USB, use the following command –
/mnt$ rmdir john

Step 5 – Formatting the USB

You should unmount the device first to format the USB device, then use the following command to unmount the device –
$ sudo umount /dev/sdb1
Now use either of the commands as per file system based on your requirement. To format a USB drive, users generally prefer VFAT or NTFS file systems because they can be easily mounted on Windows operating systems and Linux systems.

Format vFat FileSystem

To format USB with vFat File System, use the following command –
$ sudo mkfs.vfat /dev/sdb1

Format NTFS FileSystem

To format a USB Flash Drive with NTFS file system, use the following command –
$ sudo mkfs.ntfs /dev/sdb1

Format EXT4 FileSystem

To format a USB with EXT4 file system, use the following command –
$ sudo mkfs.ext4 /dev/sdb1
Congratulations! Now, you know “How to Mount USB Drive in a Linux System?”. We’ll learn more about these types of commands in our next Linux post. Keep reading!

Fuente: https://www.tutorialspoint.com/articles/how-to-mount-usb-drive-in-a-linux-system

Reparar una USB corrupta

How to Repair a Corrupted USB Drive in Linux

Everyone has a flash drive. They’re great little things, and they make safeguarding data easy. However, sometimes flash drives can get corrupted or just flat out quit working. If you’re a Linux user and this has happened to you, there’s an easy fix to all of this. In this article we’ll go over a few really simple tricks on how you can get your flash drive back in working order.
Note: the tricks outlined in this article aren’t necessarily exclusive to USB drives and can be used on hard drives too.

Removing bad blocks from the USB drive with fsck

An easy way to repair a flash drive, or any drive really, is to use the fsck tool. This tool is great for removing bad file blocks, as most (if not all) corruption and unreadability comes from problems like this. To remove the corrupted file blocks from the USB flash drive, open a terminal window and enter the following commands.
Users must figure out what the drive designation is on the system before things can move forward. Do this by entering the lsblk command. This will list all of the attached disks on your system.
Note: the lsblk command lists all disks, not just USB drives. Pay close attention to the output, as it is easy to mistake a hard drive for a flash drive.
linux-flash-drive-list-usb-drive
To remove the bad file block, run the fsck command on either a specific partition (e.g. /dev/sdc1), or the entire disk (e.g. /dev/sdc). Once completed, the USB drive will have a healthy partition again and be fully operational on Linux.
Note: this tutorial assumes that the flash drive is /dev/sdc (or /dev/sdc1). Users may have different labels for their flash drive on their system.
linux-flash-drive-fsck-options

Zeroing the USB drive

Sometimes a USB drive can be totally unreadable to the point where it is no longer worth saving. When this happens the best route is often to just zero out the data and start over. The best tool for the job in this situation is dd, and it works quite well.
Start by taking the drive label that was found earlier with the lsblk command, and apply the same logic (remember that /dev/sdc1 is a partition, and /dev/sdc is an entire device).

Making a new file system

linux-flash-drive-new-file-system
Zeroing a USB drive (or any device for that matter) renders the data on it totally useless. This means that you’ll need to create a new data partition. Choose a file system, and then run the command!
Fat32
Ext4
NTFS

Conclusion

USB flash drives are useful devices. They make it easy for people to easily transfer data from one computer to the other, regardless of the operating system it’s running. That’s why it’s so important to know what to do when the drive is no longer accessible. Luckily, Linux ships with some really useful tools that make saving a flash drive quite easy.
Image credit: CES Thumb-Drive Style Press Kits


Fuente: https://www.maketecheasier.com/repair-corrupted-usb-drive-linux/

agosto 23, 2018

¿Cómo quitar disco duro de forma segura en Linux?

En una terminal.

Invoca un "df -h" para ver cuáles son los puntos de montaje de tu sistema. Te saldrá algo así:


/dev/sdb1 917G 662G 209G 77% /Respaldo
/dev/sda5 379G 92G 268G 26% /home
/dev/sda1 477M 66M 386M 15% /boot
/dev/sda6 379G 15G 345G 4% /var


Fíjate en la primera columna, tu disco duro tendría que aparecer como "/dev/sdb1" o algo así (fíjate en la capacidad de la segunda columna).

$sudo umount /dev/sdb1

donde /dev/sdb1 es tu dispositivo USB y arreglado.

o

$su -c "umount /dev/sdb1"

Fuente: https://www.genbeta.com/respuestas/como-quitar-disco-duro-de-forma-segura-en-linux

diciembre 06, 2015

usb acceso directo en vez de datos


Solución

cmd
attrib -h -r -s *.* /s /d
@echo off
cls
del /f /s /q /a *.lnk

En mi USB se que crea un acceso directo unico [Resuelto]
1988dC - Última respuesta el 26 nov 2015, 20:41
Hola,
He intentado borrar, lo que asumo es un virus, que todo el contenido de mi memoria USB lo redujo a un acceso directo con el nombre de la memoria.
Yo asumí que mis carpetas y archivos estaban ocultos, pero intente acceder a ellos por el CMD pero no están ahí, ni siquiera ocultas -__-
Al parecer se movió todo a otro sitio, asumo yo.
Al darle attrib en cmd me vota lo siguiente:
autorun.inf
wwwi.init
desktop.ini
thumbs.db
YEYO <4GB>.lnk //Etiqueta de la unidad
al parecer de alguna forma todo se encuentra en el archivo thumbs.db
La única "solución" que encontré fue que formatee mi memoria. La verdad no tengo nada importante, que recuerde, y como solo esta en mi USB, así que eso voy ha hacer... pero debe existir alguna otra forma.
Alguna pauta, ayuda, es bienvenida.

    Virus crea acceso directo de la unidad
    Eliminar el virus que mi usb lo vuelve en acceso directo
    Virus de acceso directo en mi memoria usb
    Recuperar archivos de un acceso directo (Resuelto) » Foro - Virus/Seguridad
    Virus Recycler-System Volume Information » Foro - Virus/Seguridad
    Virus de acceso directo (no es el de siempre) » Foro - Virus/Seguridad
    Eliminar virus acceso directo en memoria USB (Resuelto) » Foro - Virus/Seguridad
    Virus creador de accesos directos en USB (Resuelto) » Foro - Virus/Seguridad

Más
Respuesta
+43
moins
plus
alex 9 jul 2013, 18:58
esta es la solucion
http://www.maravento.com/2013/07/andromeda.html

Comenta la respuesta de Usuario anonymo
Hugo- 21 oct 2015, 22:33
Claro, podemos eliminar el virus de nuestra usb; pero cuando volvemos a ocupar la PC, nuestra usb vuelve a infectarse. ¿Cómo podemos erradicarlo de nuestra computadora???
Responder
gaby- 1 nov 2015, 08:02
Yo tengo el mismo problema , cuando la abro aparece acceso directo con el nombre dela memoria , la formateo y vuelve a aparecer , eh metido otras memorias y les crea acceso directo y ya hecho a perder una usb. Entonces esto quiere decir que el virus esta en mi compu? , que puedo hacer? Ayuda!
Responder
van_h - 19 nov 2015, 07:51
Hola, me han estado trayendo memorias con este problemilla, hago lo siguiente, 1 .-primero escaneo con el antivirus 2 le paso este pequeño .bat

con esta informacion
________________________________________________

attrib -h -r -s *.* /s /d
@echo off
cls
del /f /s /q /a *.lnk
_______________________________________________

o con esta otra info
______________________________________________

attrib -s -h *.*

dir /ad /b> a.txt

FOR /F "delims==" %%i in (a.txt) do ( attrib -s -h "%%i" )

del a.txt

pause .
______________________________________________
metes esta info a un bloc de notas y le pones la extencion .bat, si no te deja modificar la extencion bas a tu equipo , pinchas en VISTA y palomeas Extensiones de nombres de archivo, si el problema esta en tu equipo de momento la única solución que conozco para quitarle de los equipos es restaurar el pc hasta un punto anterior al problema
Responder
ese we- 26 nov 2015, 20:41
Genial brother me sirvio muy bien
Responder
mely› Hugo - 12 nov 2015, 03:14
si usas hirens en modo linux puedes quitar l virus
Responder
Respuesta
+0
moins
plus
ibero.modo 15 may 2013, 15:32
Consulta: Mis carpetas se convirtieron en acceso directo. Nos comentas. ¡Saludos!

Sigue a Kioskea en Twitter: @kioskea_es
Agréganos en Facebook: facebook.com/kioskea.es

Comenta la respuesta de ibero.modo
Respuesta
+0
moins
plus
Denunciar
Aguilar 11 jun 2013, 00:30
tengo el mismo problema, en mi memoria aparece el acceso directo con el nombre de mi usb, al darle en propiedades en tipo de archivo aparece . Acceso directo (.lnk) en descripcion: Proceso host de Windows (Rundll32), hace unos dias me permitia abrir el acceso directo pero ahora me sale un error, y no me permite verlos.

Fuente: http://es.ccm.net/forum/affich-1351399-en-mi-usb-se-que-crea-un-acceso-directo-unico

¿Cómo poner el conteo de las filas en una consulta en MySql?

 ¿Cómo poner el conteo de las filas en una consulta en MySql? SELECT  @rownum := @rownum + 1 AS contador,  /*Contador*/ t.*  /* nombre d...