Advertisement
Guest User

Untitled

a guest
Jun 12th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.38 KB | None | 0 0
  1. pi@raspberrypi:~ $ sudo fdisk /dev/sdb
  2.  
  3. Welcome to fdisk (util-linux 2.29.2).
  4. Changes will remain in memory only, until you decide to write them.
  5. Be careful before using the write command.
  6.  
  7. Command (m for help): o
  8. Created a new DOS disklabel with disk identifier 0x94fdb786.
  9.  
  10. Command (m for help): n
  11. Partition type
  12. p primary (0 primary, 0 extended, 4 free)
  13. e extended (container for logical partitions)
  14. Select (default p): p
  15. Partition number (1-4, default 1): 1
  16. First sector (2048-1953525167, default 2048):
  17. Last sector, +sectors or +size{K,M,G,T,P} (2048-1953525167, default 1953525167):
  18.  
  19. Created a new partition 1 of type 'Linux' and of size 931.5 GiB.
  20.  
  21. Command (m for help): w
  22. The partition table has been altered.
  23. Calling ioctl() to re-read partition table.
  24. Syncing disks.
  25.  
  26. pi@raspberrypi:~ $ sudo mkfs.ext4 -m0 /dev/sdb1
  27. mke2fs 1.43.4 (31-Jan-2017)
  28. Creating filesystem with 244190390 4k blocks and 61054976 inodes
  29. Filesystem UUID: 21dafb36-7691-4534-8011-b3da60d76f8d
  30. Superblock backups stored on blocks:
  31. 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
  32. 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
  33. 102400000, 214990848
  34.  
  35. Allocating group tables: done
  36. Writing inode tables: done
  37. Creating journal (262144 blocks): done
  38. Writing superblocks and filesystem accounting information: done
  39.  
  40. pi@raspberrypi:~ $ sudo fstab
  41. sudo: fstab: command not found
  42. pi@raspberrypi:~ $ sudo fdisk
  43.  
  44. Usage:
  45. fdisk [options] <disk> change partition table
  46. fdisk [options] -l [<disk>] list partition table(s)
  47.  
  48. Display or manipulate a disk partition table.
  49.  
  50. Options:
  51. -b, --sector-size <size> physical and logical sector size
  52. -B, --protect-boot don't erase bootbits when creating a new label
  53. -c, --compatibility[=<mode>] mode is 'dos' or 'nondos' (default)
  54. -L, --color[=<when>] colorize output (auto, always or never)
  55. colors are enabled by default
  56. -l, --list display partitions and exit
  57. -o, --output <list> output columns
  58. -t, --type <type> recognize specified partition table type only
  59. -u, --units[=<unit>] display units: 'cylinders' or 'sectors' (default)
  60. -s, --getsz display device size in 512-byte sectors [DEPRECAT ED]
  61. --bytes print SIZE in bytes rather than in human readable format
  62. -w, --wipe <mode> wipe signatures (auto, always or never)
  63. -W, --wipe-partitions <mode> wipe signatures from new partitions (auto, always or never)
  64.  
  65. -C, --cylinders <number> specify the number of cylinders
  66. -H, --heads <number> specify the number of heads
  67. -S, --sectors <number> specify the number of sectors per track
  68.  
  69. -h, --help display this help and exit
  70. -V, --version output version information and exit
  71.  
  72. Available columns (for -o):
  73. gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
  74. dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
  75. Start-C/H/S
  76. bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
  77. sgi: Device Start End Sectors Cylinders Size Type Id Attrs
  78. sun: Device Start End Sectors Cylinders Size Type Id Flags
  79.  
  80. For more details see fdisk(8).
  81. pi@raspberrypi:~ $ sudo fdisk -l
  82. Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
  83. Units: sectors of 1 * 512 = 512 bytes
  84. Sector size (logical/physical): 512 bytes / 4096 bytes
  85. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  86.  
  87. Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
  88. Units: sectors of 1 * 512 = 512 bytes
  89. Sector size (logical/physical): 512 bytes / 4096 bytes
  90. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  91.  
  92. Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
  93. Units: sectors of 1 * 512 = 512 bytes
  94. Sector size (logical/physical): 512 bytes / 4096 bytes
  95. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  96.  
  97. Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
  98. Units: sectors of 1 * 512 = 512 bytes
  99. Sector size (logical/physical): 512 bytes / 4096 bytes
  100. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  101.  
  102. Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
  103. Units: sectors of 1 * 512 = 512 bytes
  104. Sector size (logical/physical): 512 bytes / 4096 bytes
  105. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  106.  
  107. Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
  108. Units: sectors of 1 * 512 = 512 bytes
  109. Sector size (logical/physical): 512 bytes / 4096 bytes
  110. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  111.  
  112. Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
  113. Units: sectors of 1 * 512 = 512 bytes
  114. Sector size (logical/physical): 512 bytes / 4096 bytes
  115. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  116.  
  117. Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
  118. Units: sectors of 1 * 512 = 512 bytes
  119. Sector size (logical/physical): 512 bytes / 4096 bytes
  120. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  121.  
  122. Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
  123. Units: sectors of 1 * 512 = 512 bytes
  124. Sector size (logical/physical): 512 bytes / 4096 bytes
  125. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  126.  
  127. Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
  128. Units: sectors of 1 * 512 = 512 bytes
  129. Sector size (logical/physical): 512 bytes / 4096 bytes
  130. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  131.  
  132. Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
  133. Units: sectors of 1 * 512 = 512 bytes
  134. Sector size (logical/physical): 512 bytes / 4096 bytes
  135. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  136.  
  137. Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
  138. Units: sectors of 1 * 512 = 512 bytes
  139. Sector size (logical/physical): 512 bytes / 4096 bytes
  140. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  141.  
  142. Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
  143. Units: sectors of 1 * 512 = 512 bytes
  144. Sector size (logical/physical): 512 bytes / 4096 bytes
  145. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  146.  
  147. Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
  148. Units: sectors of 1 * 512 = 512 bytes
  149. Sector size (logical/physical): 512 bytes / 4096 bytes
  150. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  151.  
  152. Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
  153. Units: sectors of 1 * 512 = 512 bytes
  154. Sector size (logical/physical): 512 bytes / 4096 bytes
  155. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  156.  
  157. Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
  158. Units: sectors of 1 * 512 = 512 bytes
  159. Sector size (logical/physical): 512 bytes / 4096 bytes
  160. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  161.  
  162. Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
  163. Units: sectors of 1 * 512 = 512 bytes
  164. Sector size (logical/physical): 512 bytes / 512 bytes
  165. I/O size (minimum/optimal): 512 bytes / 512 bytes
  166. Disklabel type: dos
  167. Disk identifier: 0xcffaf6fe
  168.  
  169. Device Boot Start End Sectors Size Id Type
  170. /dev/sda1 8192 96453 88262 43.1M c W95 FAT32 (LBA)
  171. /dev/sda2 * 98304 1953525167 1953426864 931.5G 83 Linux
  172.  
  173. Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
  174. Units: sectors of 1 * 512 = 512 bytes
  175. Sector size (logical/physical): 512 bytes / 512 bytes
  176. I/O size (minimum/optimal): 512 bytes / 512 bytes
  177. Disklabel type: dos
  178. Disk identifier: 0x94fdb786
  179.  
  180. Device Boot Start End Sectors Size Id Type
  181. /dev/sdb1 2048 1953525167 1953523120 931.5G 83 Linux
  182. pi@raspberrypi:~ $ ls
  183. Desktop iso movies-smsng Public samsung torrent
  184. dev1 iso2 Music pythongames source Videos
  185. Documents movies oldconffiles rtinst.info ssd
  186. Downloads movies-nosubs Pictures rtorrent Templates
  187. pi@raspberrypi:~ $ cd ..
  188. pi@raspberrypi:/home $ cd ..
  189. pi@raspberrypi:/ $ ls
  190. bin dev home lost+found mnt proc run srv tmp var
  191. boot etc lib media opt root sbin sys usr
  192. pi@raspberrypi:/ $ cd media
  193. pi@raspberrypi:/media $ ls
  194. pi
  195. pi@raspberrypi:/media $ cd pi
  196. pi@raspberrypi:/media/pi $ ls
  197. pi@raspberrypi:/media/pi $ cd ..
  198. pi@raspberrypi:/media $ cd ..
  199. pi@raspberrypi:/ $ cd mnt
  200. pi@raspberrypi:/mnt $ ls
  201. pi@raspberrypi:/mnt $ cd ..
  202. pi@raspberrypi:/ $ ls
  203. bin dev home lost+found mnt proc run srv tmp var
  204. boot etc lib media opt root sbin sys usr
  205. pi@raspberrypi:/ $ cd home/iso2
  206. -bash: cd: home/iso2: No such file or directory
  207. pi@raspberrypi:/ $ ls
  208. bin dev home lost+found mnt proc run srv tmp var
  209. boot etc lib media opt root sbin sys usr
  210. pi@raspberrypi:/ $ cd home/pi/iso2
  211. pi@raspberrypi:~/iso2 $ ls
  212. pi@raspberrypi:~/iso2 $ cd ..
  213. pi@raspberrypi:~ $ cd ..
  214. pi@raspberrypi:/home $ sudo chown -R $USER:$GROUP /home/pi/iso2
  215. pi@raspberrypi:/home $ sudo mount /dev/sdb1 /home/pi/iso2
  216. pi@raspberrypi:/home $ sudo mount -l
  217. /dev/sda2 on / type ext4 (rw,noatime,data=ordered) [rootfs]
  218. devtmpfs on /dev type devtmpfs (rw,relatime,size=470116k,nrinodes=117529,mode=7 55)
  219. sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
  220. proc on /proc type proc (rw,relatime)
  221. tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
  222. devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmod e=000)
  223. tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
  224. tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
  225. tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
  226. cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xa ttr,releaseagent=/lib/systemd/systemd-cgroups-agent,name=systemd)
  227. cgroup on /sys/fs/cgroup/netcls type cgroup (rw,nosuid,nodev,noexec,relatime,ne tcls)
  228. cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim e,cpu,cpuacct)
  229. cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blki o)
  230. cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpu set)
  231. cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,fr eezer)
  232. cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,de vices)
  233. systemd-1 on /proc/sys/fs/binfmtmisc type autofs (rw,relatime,fd=34,pgrp=1,time out=0,minproto=5,maxproto=5,direct)
  234. debugfs on /sys/kernel/debug type debugfs (rw,relatime)
  235. sunrpc on /run/rpcpipefs type rpcpipefs (rw,relatime)
  236. configfs on /sys/kernel/config type configfs (rw,relatime)
  237. mqueue on /dev/mqueue type mqueue (rw,relatime)
  238. /dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,ioc harset=ascii,shortname=mixed,errors=remount-ro) [boot]
  239. tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94944k,mode=70 0,uid=1000,gid=1000)
  240. fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
  241. gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime ,userid=1000,groupid=1000)
  242. /dev/sdb1 on /home/pi/iso2 type ext4 (rw,relatime,data=ordered)
  243. pi@raspberrypi:/home $ sudo mkdir /home/pi/iso2/test
  244. mkdir: cannot create directory β€˜/home/pi/iso2/test’: Read-only file system
  245. pi@raspberrypi:/home $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement