Eintrag in der fstab zum dauerhaften Mounten eines USB Sticks

  • Eintrag in der fstab zum dauerhaften Mounten eines USB Sticks? Schau mal ob du hier fündig wirst!

  • Go to Best Answer
  • Hallo,

    der Inhalt der fstab:

    proc /proc proc defaults 0 0
    PARTUUID=34bf8040-01 /boot vfat defaults 0 2
    PARTUUID=34bf8040-02 / ext4 defaults,noatime 0 1
    /dev/sda1 /backup ext4 default,nofail 0 0

    mount zeigt:

    ebing@raspberrypi:~ $ sudo mount
    /dev/mmcblk0p2 on / type ext4 (rw,noatime)
    devtmpfs on /dev type devtmpfs (rw,relatime,size=1678472k,nr_inodes=419618,mode=755)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,nodev,size=777080k,nr_inodes=819200,mode=755)
    tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
    cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
    mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
    sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
    debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
    tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
    fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
    configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
    /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
    tmpfs on /run/user/110 type tmpfs (rw,nosuid,nodev,relatime,size=388536k,nr_inodes=97134,mode=700,uid=110,gid=114)
    gvfsd-fuse on /run/user/110/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=110,group_id=114)
    tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=388536k,nr_inodes=97134,mode=700,uid=1000,gid=1000)
    xrdp-chansrv on /home/hebing/thinclient_drives type fuse.xrdp-chansrv (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

    und blkid:

    hebing@raspberrypi:~ $ blkid
    /dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="ADF0-03C8" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="34bf8040-01"
    /dev/mmcblk0p2: UUID="9151e906-d84a-4116-bda3-a3627dc9b22a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="34bf8040-02"
    /dev/sda1: LABEL="Raspi" UUID="ddef33f2-0355-da01-90cf-32f20355da01" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f8e83e0f-01"

  • mount zeigt:

    BTW: Für deinen jetzigen Fall sind die Ausgaben von:

    Code
    lsblk -fp
    systemctl list-units --type=mount | grep -i backup

    m. E. übersichtlicher.

    The most popular websites without IPv6 in Germany.  IPv6-Ausreden
    "Das dauert plötzlich ½ Sekunde länger. Das muss ich mir anschauen!" - Andres Freund

    Meine PIs

    PI4B/8GB (border device) OpenBSD 7.5 (64bit): SSH-Server, WireGuard-Server, ircd-hybrid-Server, Mumble-Server

    PI3B+ FreeBSD 14.0-R-p6 (arm64): SSH-Serv., WireGuard-Serv., ircd-hybrid-Serv., Mumble-Serv., ddclient

    PI4B/4GB Bullseye-lite (64bit; modifiziert): SSH-Server, WireGuard-Server, ircd-hybrid-Server, Mumble-Server, botamusique, ample

  • ebing@raspberrypi:~ $ lsblk -fp
    NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
    /dev/sda
    └─/dev/sda1 ext4 1.0 Raspi ddef33f2-0355-da01-90cf-32f20355da01
    /dev/mmcblk0
    ├─/dev/mmcblk0p1 vfat FAT32 bootfs ADF0-03C8 224.3M 12% /boot
    └─/dev/mmcblk0p2 ext4 1.0 9151e906-d84a-4116-bda3-a3627dc9b22a 19.4G 28% /

    und

    hebing@raspberrypi:~ $ systemctl list-units --type=mount |grep -i backup
    ● backup.mount loaded failed failed /backup

    Habe jetzt die Zeile in fstab geändert in:

    PARTUUID=f8e83e0f-01 /backup ext4 default,nofail 0 0

    mit der PARTUUID aus

    hebing@raspberrypi:~ $ blkid
    /dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="ADF0-03C8" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="34bf8040-01"
    /dev/mmcblk0p2: UUID="9151e906-d84a-4116-bda3-a3627dc9b22a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="34bf8040-02"
    /dev/sda1: LABEL="Raspi" UUID="ddef33f2-0355-da01-90cf-32f20355da01" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f8e83e0f-01"

    nach einem reboot keine Veränderung

    hebing@raspberrypi:~ $ lsblk -fp
    NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
    /dev/sda
    └─/dev/sda1 ext4 1.0 Raspi ddef33f2-0355-da01-90cf-32f20355da01
    /dev/mmcblk0
    ├─/dev/mmcblk0p1 vfat FAT32 bootfs ADF0-03C8 224.3M 12% /boot
    └─/dev/mmcblk0p2 ext4 1.0 9151e906-d84a-4116-bda3-a3627dc9b22a 19.3G 28% /

  • Helavi February 27, 2024 at 5:59 PM

    Selected a post as the best answer.
  • Wer kennt ihn nicht, den Eulenstorch ....

    ;) Gruß Outi :D
    Pis: 2x Pi B, 1x Pi B+, 1x Pi 2 B in Rente / 2x Pi 3 B (RaspberryMatic / Repetier Server) / 2x Pi Zero 1.2 / 2x Pi Zero 1.3 / 2x Pi Zero W 1.1 / 1x Pi Zero 2 (BW+CUPS/SANE) / 1x Pi 3 B+ (Tests) / 1x Pi 4 B 4GB (Tests) / Pi 400 (BW) / 1x Pi 5 8GB (BW) / 2x Pi Pico / 2x Pi Pico W
    HATs: Sense HAT / HM-MOD-RPI-PCB / RPI-RF-MOD / PiFi DAC+ V2.0 / TV HAT / Pi 5 Kühler HAT / Pimoroni NVMe BASE
    Cams: orig. Raspberry Pi Camera Module V1 & V3 / PS3 Eye

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!