PDF de programación - Instalar un lápiz usb (pen drive): sda

Imágen de pdf Instalar un lápiz usb (pen drive): sda

Instalar un lápiz usb (pen drive): sdagráfica de visualizaciones

Actualizado el 17 de Abril del 2021 (Publicado el 31 de Agosto del 2018)
641 visualizaciones desde el 31 de Agosto del 2018
70,6 KB
7 paginas
Creado hace 18a (27/10/2005)
Instalar un lapiz usb (pen drive): sda

Instalar un lapiz usb (pen drive): sda

Por Paco Aldarias Raya

Impreso: 27 de octubre de 2005

Email: pacolinux arroba inicia punto es
Web: http://pagina.de/pacodebian
Con Linux Debian. En Valencia (España)
El documento tiene version .html, y .pdf, cambiando en el navegador la parte

final podrás acceder a ambos.

Este documento es de libre reproducción siempre que se cite su fuente.

Realizado con: LATEX

Índice

Índice

1. Introducción

2. Kernel 2.6

2.1. Módulos del kernel
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2. Listar los usbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3. Reconocerlo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4. Ver si a cogido el lapiz . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5. Ver información del lapiz . . . . . . . . . . . . . . . . . . . . . . . . .

3. Kernel 2.4

3.1. Módulos del kernel
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2. El arranque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3. Modulos cargados . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4. Listar los usbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5. Reconocerlo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6. Ver el dispositivo con cdrecord . . . . . . . . . . . . . . . . . . . . . .

4. Formatear el lápiz

5. Montarlo

6. Bibliografia

1

1

1
1
2
3
3
3

4
4
4
4
5
5
5

6

6

6

Por Paco Aldarias

1/6

Instalar un lapiz usb (pen drive): sda

1.

Introducción

El lapiz usb también llamado o usb bar o pen drive Vermos como es la instalación

de un lapiz usb. En concreto es un lapiz usb captiva 2.0 de 250Mb

Los lápices usb son trabados como dispositivos usb. Y se tratan de forma igual

q si fuera otro disco duro.

2. Kernel 2.6

2.1. Módulos del kernel

SECCI ÓN FILESYSTEMS
umsdos

cat /usr/src/linux-2.6.13.2/.config | grep MSDOS
CONFIG_MSDOS_FS=y
CONFIG_MSDOS_PARTITION=y

SECCI ÓN GENERAL SETUP
* Support for hot-pluggable devices.

cat /usr/src/linux-2.6.13.2/.config | grep PLUG
CONFIG_HOTPLUG=y
# CONFIG_ACPI_HOTPLUG_CPU is not set
CONFIG_HOTPLUG_PCI_PCIE=m
# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
CONFIG_HOTPLUG_CPU=y
CONFIG_HOTPLUG_PCI=m
CONFIG_HOTPLUG_PCI_FAKE=m
CONFIG_HOTPLUG_PCI_COMPAQ=m
# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
CONFIG_HOTPLUG_PCI_IBM=m
CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
# CONFIG_HOTPLUG_PCI_CPCI is not set
CONFIG_HOTPLUG_PCI_SHPC=m
# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set

SECCI ÓN USB
* Support for USB.
[M] UHCI/OHCI support (depende de chipsets placa). (NOTA: Por lo general,
el driver UHCI es para placas con chipsets Intel o Via, mientras que el resto -
Compaq, SiS, Ali...- suele usar el OHCI. Ante la duda o imposibilidad de encontrar
el correspondiente, pon los dos como módulos y carga luego el necesario, o bien
consulta el enlace del pié del artículo para saber cuál es el correcto para tu placa).

cat /usr/src/linux-2.6.13.2/.config | grep UHCI
CONFIG_USB_UHCI_HCD=y

Por Paco Aldarias

2/6

Instalar un lapiz usb (pen drive): sda

[M] USB Mass Storage support.
* Preliminary USB Device Filesystem (para poder chequear el funcionamiento

del sistema de ficheros USB, aunque no es imprescindible).

cat /usr/src/linux-2.6.13.2/.config | grep USB_STORAGE
# NOTE: USB_STORAGE enables SCSI, and ’SCSI disk support’ may also be needed; see USB_STORAGE Help for more information
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y

SECCI ÓN SCSI
* SCSI support.
[M] SCSI disk support.

cat /usr/src/linux-2.6.13.2/.config | grep CONFIG_SCSI
CONFIG_SCSI=y

* SCSI generic support.

2.2. Listar los usbs

lsusb
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID 4586:1026
Bus 001 Device 001: ID 0000:0000

2.3. Reconocerlo

Instalar:

apt-get install udev

Versión:

dpkg -l udev
ii udev

0.071-1

/dev/ and hotplug management daemon

2.4. Ver si a cogido el lapiz

cat /proc/partitions
...
major minor #blocks name

8
8

0
1

253952 sda
253936 sda1

Por Paco Aldarias

3/6

Instalar un lapiz usb (pen drive): sda

2.5. Ver información del lapiz

udevinfo -a -p /sys/block/sda/
looking at the device chain at ’/sys/devices/pci0000:00/0000:00:02.2/usb1/1-3’:

BUS=="usb"
ID=="1-3"
DRIVER=="usb"
SYSFS{bConfigurationValue}=="1"
SYSFS{bDeviceClass}=="00"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bMaxPacketSize0}=="64"
SYSFS{bMaxPower}=="500mA"
SYSFS{bNumConfigurations}=="1"
SYSFS{bNumInterfaces}==" 1"
SYSFS{bcdDevice}=="0050"
SYSFS{bmAttributes}=="80"
SYSFS{configuration}==""
SYSFS{devnum}=="5"
SYSFS{idProduct}=="1026"
SYSFS{idVendor}=="4586"
SYSFS{manufacturer}=="
SYSFS{maxchild}=="0"
SYSFS{product}=="USB BAR
SYSFS{serial}=="574C1E00003B"
SYSFS{speed}=="480"
SYSFS{version}==" 2.00"

"

"

3. Kernel 2.4

3.1. Módulos del kernel

SECCI ÓN FILESYSTEMS
umsdos
SECCI ÓN GENERAL SETUP
* Support for hot-pluggable devices.
SECCI ÓN USB
* Support for USB.
[M] UHCI/OHCI support (depende de chipsets placa). (NOTA: Por lo general,
el driver UHCI es para placas con chipsets Intel o Via, mientras que el resto -
Compaq, SiS, Ali...- suele usar el OHCI. Ante la duda o imposibilidad de encontrar
el correspondiente, pon los dos como módulos y carga luego el necesario, o bien
consulta el enlace del pié del artículo para saber cuál es el correcto para tu placa).

[M] USB Mass Storage support.
* Preliminary USB Device Filesystem (para poder chequear el funcionamiento

del sistema de ficheros USB, aunque no es imprescindible).

Por Paco Aldarias

4/6

Instalar un lapiz usb (pen drive): sda

SECCI ÓN SCSI
* SCSI support.
[M] SCSI disk support.
* SCSI generic support.

3.2. El arranque

dmesg | grep usb
usb.c: USB device not accepting new address=3 (error=-71)
usb-uhci.c: $Revision: 1.275 $ time 20:19:53 Dec 10 2002
usb-uhci.c: High bandwidth mode enabled
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb-uhci.c: $Revision: 1.275 $ time 20:19:53 Dec 10 2002
usb-uhci.c: High bandwidth mode enabled
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb.c: USB disconnect on device 00:02.2-3 address 4
usb.c: USB disconnect on device 00:02.2-4 address 5
usb.c: USB disconnect on device 00:02.2-0 address 1
usb.c: USB disconnect on device 00:02.2-3 address 6
usb.c: USB bus 3 deregistered
usb.c: USB disconnect on device 00:02.1-1 address 2

3.3. Modulos cargados

lsmod | grep usb
usb-storage
dabusb
usbserial
usb-ohci
usbcore

54460
33520
17532
18088
57088

1
0 (unused)
0 [pl2303]
0 (unused)
2 [hid usb-storage scanner dabusb mdc800 microtek pl2303 usbserial pwc ov511 usb-ohci]

3.4. Listar los usbs

lsusb
Bus 002 Device 001: ID 0000:0000
Bus 002 Device 003: ID 4586:1026
Bus 001 Device 001: ID 0000:0000

3.5. Reconocerlo

Instalar:

apt-get install sg3-utils

sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]

HL-DT-ST CD-RW GCE-8480B

1.03 [rmb=1 cmdq=0 pqual=0 pdev=0x5]

Por Paco Aldarias

5/6

Instalar un lapiz usb (pen drive): sda

/dev/sg1: scsi0 channel=0 id=1 lun=0 [em]

LG

DVD-ROM DRD8120B 1.03 [rmb=1 cmdq=0 pqual=0 pdev=0x5]

/dev/sg2: scsi1 channel=0 id=0 lun=0 [em]

USB BAR

1.13 [rmb=1 cmdq=0 pqual=0 pdev=0x0]

Se aprecia que el lápiz esta en /dev/sg2

sg_map
/dev/sg0 /dev/scd0
/dev/sg1 /dev/scd1
/dev/sg2 /dev/sda

Se aprecia que el lápiz esta en /dev/sda. Es importante saber que es el sda ya

que es con el que trabajaremos.

3.6. Ver el dispositivo con cdrecord

cdrecord -scanbus
Cdrecord-Clone 2.01.01a01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 J¨org Schilling
NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord

and thus may have bugs that are not present in the original version.
Please send bug reports and support requests to <[email protected]>.
The original author should not be bothered with problems of this version.

Linux sg driver version: 3.1.24
Using libscg version ’schily-0.8’.
scsibus0:

0,0,0
0,1,0

0) ’HL-DT-ST’ ’CD-RW GCE-8480B ’ ’1.03’ Removable CD-ROM
1) ’LG
’ ’DVD-ROM DRD8120B’ ’1.03’ Removable CD-ROM

scsibus1:

1,0,0

100) ’’ ’’ ’’ Removable not present Disk

Se aprecia que aparece el lapiz en: scsibus1

4. Formatear el lápiz

fdisk /dev/sda (Indicar q sea fat32)
mkfs.vfat /dev/sda1

5. Montarlo

Crear la carpeta lapiz

mkdir /lapiz
chmod 777 /lapiz

editar /etc/fstab

/dev/sda1

/lapiz

vfat

rw,exec,user,noauto

0

0

Por Paco Aldarias

6/6

Instalar un lapiz usb (pen drive): sda

6. Bibliografia

1. Utilizar un lector de tarjetas flash (MMC/SD) bajo Linux

http://bulma.net/body.phtml?nIdNoticia=1883

2. Montar memorias USB

http://www.asturlinux.org/comunidad/MemoriaUSB

3. Configuración de un Pen-Drive en Linux

http://www.badopi.org/node/301

Por Paco Aldarias

7/6
  • Links de descarga
http://lwp-l.com/pdf13304

Comentarios de: Instalar un lápiz usb (pen drive): sda (0)


No hay comentarios
 

Comentar...

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad