Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi:~ $ sudo fdisk /dev/sdb
- Welcome to fdisk (util-linux 2.29.2).
- Changes will remain in memory only, until you decide to write them.
- Be careful before using the write command.
- Command (m for help): o
- Created a new DOS disklabel with disk identifier 0x94fdb786.
- Command (m for help): n
- Partition type
- p primary (0 primary, 0 extended, 4 free)
- e extended (container for logical partitions)
- Select (default p): p
- Partition number (1-4, default 1): 1
- First sector (2048-1953525167, default 2048):
- Last sector, +sectors or +size{K,M,G,T,P} (2048-1953525167, default 1953525167):
- Created a new partition 1 of type 'Linux' and of size 931.5 GiB.
- Command (m for help): w
- The partition table has been altered.
- Calling ioctl() to re-read partition table.
- Syncing disks.
- pi@raspberrypi:~ $ sudo mkfs.ext4 -m0 /dev/sdb1
- mke2fs 1.43.4 (31-Jan-2017)
- Creating filesystem with 244190390 4k blocks and 61054976 inodes
- Filesystem UUID: 21dafb36-7691-4534-8011-b3da60d76f8d
- Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
- 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
- 102400000, 214990848
- Allocating group tables: done
- Writing inode tables: done
- Creating journal (262144 blocks): done
- Writing superblocks and filesystem accounting information: done
- pi@raspberrypi:~ $ sudo fstab
- sudo: fstab: command not found
- pi@raspberrypi:~ $ sudo fdisk
- Usage:
- fdisk [options] <disk> change partition table
- fdisk [options] -l [<disk>] list partition table(s)
- Display or manipulate a disk partition table.
- Options:
- -b, --sector-size <size> physical and logical sector size
- -B, --protect-boot don't erase bootbits when creating a new label
- -c, --compatibility[=<mode>] mode is 'dos' or 'nondos' (default)
- -L, --color[=<when>] colorize output (auto, always or never)
- colors are enabled by default
- -l, --list display partitions and exit
- -o, --output <list> output columns
- -t, --type <type> recognize specified partition table type only
- -u, --units[=<unit>] display units: 'cylinders' or 'sectors' (default)
- -s, --getsz display device size in 512-byte sectors [DEPRECAT ED]
- --bytes print SIZE in bytes rather than in human readable format
- -w, --wipe <mode> wipe signatures (auto, always or never)
- -W, --wipe-partitions <mode> wipe signatures from new partitions (auto, always or never)
- -C, --cylinders <number> specify the number of cylinders
- -H, --heads <number> specify the number of heads
- -S, --sectors <number> specify the number of sectors per track
- -h, --help display this help and exit
- -V, --version output version information and exit
- Available columns (for -o):
- gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
- dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
- Start-C/H/S
- bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
- sgi: Device Start End Sectors Cylinders Size Type Id Attrs
- sun: Device Start End Sectors Cylinders Size Type Id Flags
- For more details see fdisk(8).
- pi@raspberrypi:~ $ sudo fdisk -l
- Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disklabel type: dos
- Disk identifier: 0xcffaf6fe
- Device Boot Start End Sectors Size Id Type
- /dev/sda1 8192 96453 88262 43.1M c W95 FAT32 (LBA)
- /dev/sda2 * 98304 1953525167 1953426864 931.5G 83 Linux
- Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disklabel type: dos
- Disk identifier: 0x94fdb786
- Device Boot Start End Sectors Size Id Type
- /dev/sdb1 2048 1953525167 1953523120 931.5G 83 Linux
- pi@raspberrypi:~ $ ls
- Desktop iso movies-smsng Public samsung torrent
- dev1 iso2 Music pythongames source Videos
- Documents movies oldconffiles rtinst.info ssd
- Downloads movies-nosubs Pictures rtorrent Templates
- pi@raspberrypi:~ $ cd ..
- pi@raspberrypi:/home $ cd ..
- pi@raspberrypi:/ $ ls
- bin dev home lost+found mnt proc run srv tmp var
- boot etc lib media opt root sbin sys usr
- pi@raspberrypi:/ $ cd media
- pi@raspberrypi:/media $ ls
- pi
- pi@raspberrypi:/media $ cd pi
- pi@raspberrypi:/media/pi $ ls
- pi@raspberrypi:/media/pi $ cd ..
- pi@raspberrypi:/media $ cd ..
- pi@raspberrypi:/ $ cd mnt
- pi@raspberrypi:/mnt $ ls
- pi@raspberrypi:/mnt $ cd ..
- pi@raspberrypi:/ $ ls
- bin dev home lost+found mnt proc run srv tmp var
- boot etc lib media opt root sbin sys usr
- pi@raspberrypi:/ $ cd home/iso2
- -bash: cd: home/iso2: No such file or directory
- pi@raspberrypi:/ $ ls
- bin dev home lost+found mnt proc run srv tmp var
- boot etc lib media opt root sbin sys usr
- pi@raspberrypi:/ $ cd home/pi/iso2
- pi@raspberrypi:~/iso2 $ ls
- pi@raspberrypi:~/iso2 $ cd ..
- pi@raspberrypi:~ $ cd ..
- pi@raspberrypi:/home $ sudo chown -R $USER:$GROUP /home/pi/iso2
- pi@raspberrypi:/home $ sudo mount /dev/sdb1 /home/pi/iso2
- pi@raspberrypi:/home $ sudo mount -l
- /dev/sda2 on / type ext4 (rw,noatime,data=ordered) [rootfs]
- devtmpfs on /dev type devtmpfs (rw,relatime,size=470116k,nrinodes=117529,mode=7 55)
- sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
- proc on /proc type proc (rw,relatime)
- tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
- devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmod e=000)
- tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
- tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
- tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
- cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xa ttr,releaseagent=/lib/systemd/systemd-cgroups-agent,name=systemd)
- cgroup on /sys/fs/cgroup/netcls type cgroup (rw,nosuid,nodev,noexec,relatime,ne tcls)
- cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim e,cpu,cpuacct)
- cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blki o)
- cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpu set)
- cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,fr eezer)
- cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,de vices)
- systemd-1 on /proc/sys/fs/binfmtmisc type autofs (rw,relatime,fd=34,pgrp=1,time out=0,minproto=5,maxproto=5,direct)
- debugfs on /sys/kernel/debug type debugfs (rw,relatime)
- sunrpc on /run/rpcpipefs type rpcpipefs (rw,relatime)
- configfs on /sys/kernel/config type configfs (rw,relatime)
- mqueue on /dev/mqueue type mqueue (rw,relatime)
- /dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,ioc harset=ascii,shortname=mixed,errors=remount-ro) [boot]
- tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94944k,mode=70 0,uid=1000,gid=1000)
- fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
- gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime ,userid=1000,groupid=1000)
- /dev/sdb1 on /home/pi/iso2 type ext4 (rw,relatime,data=ordered)
- pi@raspberrypi:/home $ sudo mkdir /home/pi/iso2/test
- mkdir: cannot create directory β/home/pi/iso2/testβ: Read-only file system
- pi@raspberrypi:/home $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement