Posted by: Admin
cat /proc/bus/input/devices and blkid - 12/03/18 01:20 PM
command : cat /proc/bus/input/devices
instead of fdisk, you can have,
command : blkid
or
command : cat /proc/partitions
and then
mkfs.ext3 /dev/sda
and
mount /dev/sda /mnt/hdd
mounting hdd
check if all is ok with command blkid
Automount in fstab,
- Automount In the Terminal
To have your pendrive mount each time your server is restarted, you must edit your /etc/fstab file. Simply add at the bottom of your /etc/fstab file:
The first argument (/dev/sda) tells the system what device to mount, and the second argument (/mnt/usb) tells the system where to mount it. The third argument is the filesystem type (ext3). The fourth argument (defaults) tells the system what options to apply to the device, so in this case we'll just use the defaults. The fifth and sixth arguments (both zeros) tell the system if the filesystem should be backed up using the dump utility, and the second zero tells the system whether to process the device when fsck is run. We can leave them both to zero for now.
Code:
root@dm900:~# cat /proc/bus/input/devices I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="dreambox remote control (native)" P: Phys= S: Sysfs=/devices/virtual/input/input0 U: Uniq= H: Handlers=kbd event0 B: PROP=0 B: EV=100003 B: KEY=108fc312 2000041 0 0 0 0 8000 40b8 c01 1e1680 7bb80 0 ffc I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="dreambox advanced remote control (native)" P: Phys= S: Sysfs=/devices/virtual/input/input1 U: Uniq= H: Handlers=kbd event1 B: PROP=0 B: EV=100003 B: KEY=108fc312 2000041 0 0 0 0 8000 40b8 c01 1e1680 7bb80 0 ffc I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="dreambox front panel" P: Phys= S: Sysfs=/devices/virtual/input/input2 U: Uniq= H: Handlers=kbd event2 B: PROP=0 B: EV=100003 B: KEY=100000 0 0 0 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="dreambox ir keyboard" P: Phys= S: Sysfs=/devices/virtual/input/input3 U: Uniq= H: Handlers=sysrq kbd event3 B: PROP=0 B: EV=100003 B: KEY=fc312 2000041 0 0 0 0 18000 1a8 c0100c01 809ed690 800017 3f7fffff fffffff e I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="dreambox ir mouse" P: Phys= S: Sysfs=/devices/virtual/input/input4 U: Uniq= H: Handlers=event4 B: PROP=0 B: EV=7 B: KEY=30000 0 0 0 0 0 0 0 0 B: REL=3 root@dm900:~#
instead of fdisk, you can have,
command : blkid
Code:
root@dm8000:~# fdisk -sh: fdisk: not found root@dm8000:~# blkid /dev/sde1: UUID="d36e95a4-3197-46da-b87b-0cbac17b9162" TYPE="ext3"
or
command : cat /proc/partitions
Code:
cat /proc/partitions major minor #blocks name 8 0 97685784 sda 31 0 65536 mtdblock0 31 1 256 mtdblock1 31 2 3840 mtdblock2 31 3 61440 mtdblock3
and then
mkfs.ext3 /dev/sda
Code:
root@dm800:/etc# mkfs.ext3 /dev/sda mke2fs 1.43.4 (31-Jan-2017) Found a dos partition table in /dev/sda Proceed anyway? (y,N) y warning: Unable to get device geometry for /dev/sda Creating filesystem with 24421446 4k blocks and 6111232 inodes Filesystem UUID: 51a6a2e5-32db-4305-99cb-54c93869ef55 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Allocating group tables: done Writing inode tables: 50/746 : done Creating journal (131072 blocks): done Writing superblocks and filesystem accounting information: done
and
mount /dev/sda /mnt/hdd
mounting hdd
Code:
root@dm800:~# mount /dev/sda /mnt/hdd root@dm800:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 60.0M 57.7M 2.3M 96% / tmpfs 64.0K 0 64.0K 0% /media tmpfs 71.0M 396.0K 70.6M 1% /var/volatile /dev/sda 91.7G 572.2M 86.5G 1% /media/hdd
check if all is ok with command blkid
Code:
openpli 7.2star dm800 dm800 login: root root@dm800:~# blkid /dev/sda: UUID="51a6a2e5-32db-4305-99cb-54c93869ef55" TYPE="ext3" root@dm800:~#
Automount in fstab,
- Automount In the Terminal
To have your pendrive mount each time your server is restarted, you must edit your /etc/fstab file. Simply add at the bottom of your /etc/fstab file:
Code:
/dev/sda /mnt/hdd ext3 defaults 0 0
The first argument (/dev/sda) tells the system what device to mount, and the second argument (/mnt/usb) tells the system where to mount it. The third argument is the filesystem type (ext3). The fourth argument (defaults) tells the system what options to apply to the device, so in this case we'll just use the defaults. The fifth and sixth arguments (both zeros) tell the system if the filesystem should be backed up using the dump utility, and the second zero tells the system whether to process the device when fsck is run. We can leave them both to zero for now.