On 12/30/18 7:09 PM, Jorin Gedamke wrote:
Hello. I want to use a USB stick, but it never appears in fstab. Nor can I
use genfstab; it's not installed. Please, can someone tell me which package
contains genfstab, or how to search apt for it?

/etc/fstab is a file that the system administrator (you) is expected to maintain. But, you don't need an fstab(5) entry to access a USB stick.


If you are using a graphical desktop, the USB stick should be "automagically" mounted when inserted. Be sure to right-click and "eject" the USB stick before removing it.


If you are using the console or a terminal, log in to the root account.


Connect your USB stick.


Use dmesg(1) to view kernel messages:

2018-12-30 21:23:39 root@tinkywinky ~
# dmesg
...
[42625.040087] usb 3-3: new high-speed USB device number 3 using ehci-pci
[42625.191031] usb 3-3: New USB device found, idVendor=12f7, idProduct=1c00
[42625.191043] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[42625.191049] usb 3-3: Product: Flashdrive 303B
[42625.191056] usb 3-3: Manufacturer: Memorex
[42625.191062] usb 3-3: SerialNumber: ************
[42625.372593] usb-storage 3-3:1.0: USB Mass Storage device detected
[42625.378256] scsi host2: usb-storage 3-3:1.0
[42625.378416] usbcore: registered new interface driver usb-storage
[42625.381818] usbcore: registered new interface driver uas
[42626.397636] scsi 2:0:0:0: Direct-Access Memorex Flashdrive 303B PMAP PQ: 0 ANSI: 0 CCS
[42626.398632] sd 2:0:0:0: Attached scsi generic sg2 type 0
[42626.568113] sd 2:0:0:0: [sdb] 251776 512-byte logical blocks: (129 MB/123 MiB)
[42626.569429] sd 2:0:0:0: [sdb] Write Protect is off
[42626.569434] sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
[42626.570095] sd 2:0:0:0: [sdb] No Caching mode page found
[42626.570103] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[42626.575875]  sdb:
[42626.578571] sd 2:0:0:0: [sdb] Attached SCSI removable disk


Note "[sdb]" in the last six lines. The device node corresponding to the USB stick on my machine is /dev/sdb. On your machine, it could be sdb, sdc, sdd, etc., or even sdb1, sdc1, sdc1, etc.. Use that value in place of 'sdb' for the following commands.


Use mkdir(1) to create a mount point:

2018-12-30 21:27:11 root@tinkywinky ~
# mkdir /mnt/sdb


Use mount(8) to mount the USB stick file system:

2018-12-30 21:27:18 root@tinkywinky ~
# mount /dev/sdb /mnt/sdb


You should now be able to navigate to the file system on the USB stick.

2018-12-30 21:37:45 root@tinkywinky ~
# cd /mnt/sdb

2018-12-30 21:38:24 root@tinkywinky /mnt/sdb
# ls -w 72
COPYING        elf.c32             ldlinux.c32   poweroff.c32
README.txt     ethersel.c32        ldlinux.sys   prdhcp.c32
boot           f1.txt              lfs.c32       pwd.c32
cat.c32        f2.txt              libcom32.c32  pxechn.c32
chain.c32      f3.txt              libgpl.c32    reboot.c32
cmd.c32        gfxboot.c32         liblua.c32    rosh.c32
cmenu.c32      gpxecmd.c32         libmenu.c32   sanboot.c32
config.c32     hdt.c32             libutil.c32   sdi.c32
cptime.c32     hexdump.c32         linux.c32     sysdump.c32
cpu.c32        host.c32            ls.c32        syslinux.c32
cpuid.c32      ifcpu.c32           lua.c32       syslinux.cfg
cpuidtest.c32  ifcpu64.c32         mboot.c32     vesa.c32
debug.c32      ifmemdsk.c32        meminfo.c32   vesainfo.c32
dhcp.c32       ifplop.c32          memtest       vesamenu.c32
disk.c32       images              menu.c32      vmlinuz
dmi.c32        instroot.img        message       vpdtest.c32
dmitest.c32    ipcop-2.1.8.tar.gz  pci.c32       whichsys.c32
doc            kbdmap.c32          pcitest.c32   zzjson.c32
dosutils       kontron_wdt.c32     pmload.c32


When you are done, change your working directory back to home:

2018-12-30 21:41:08 root@tinkywinky /mnt/sdb
# cd


umount(8) the USB stick:

2018-12-30 21:44:08 root@tinkywinky ~
# umount /mnt/sdb


Remove the USB stick.


David

Reply via email to