Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # 1
  2.  
  3. fdisk /dev/sda
  4.  
  5. n - new
  6.  
  7. p - primary
  8.  
  9. 3 - partition
  10.  
  11. +500M - size
  12.  
  13. w - write
  14.  
  15.  
  16.  
  17. # 2
  18.  
  19. mkfs.ext3 -b 1024 /dev/sda3
  20.  
  21.  
  22.  
  23. # 3
  24.  
  25. dumpe2fs -h /dev/sda3
  26.  
  27.  
  28.  
  29. # 4
  30.  
  31. tune2fs -i 2m -C 2 /dev/sda3
  32.  
  33.  
  34.  
  35. # 5
  36.  
  37. mkdir /mnt/newdisk
  38.  
  39. mount -t ext3 /dev/sda3 /mnt/newdisk
  40.  
  41.  
  42.  
  43. # 6
  44.  
  45. ln -s /mnt/newdisk ~/newdisk
  46.  
  47.  
  48.  
  49. # 7
  50.  
  51. mkdir ~/newdisk/mydir
  52.  
  53.  
  54.  
  55. # 8
  56.  
  57. Added in file /etc/fstab a line "/dev/sda3 /mnt/newdisk ext3 noexec,noatime 0 0"
  58.  
  59. reboot
  60.  
  61.  
  62.  
  63. # 9
  64.  
  65. umount /dev/sda3
  66.  
  67. fdisk /dev/sda
  68.  
  69. d - delete
  70.  
  71. 3 - partition
  72.  
  73. n - new
  74.  
  75. p - primary
  76.  
  77. 3 - partition
  78.  
  79. +1024M - size
  80.  
  81. w - write
  82.  
  83. reboot
  84.  
  85. resize2fs /dev/sda3
  86.  
  87. df -h
  88.  
  89.  
  90.  
  91. # 10
  92.  
  93. e2fsck -n /dev/sda3
  94.  
  95.  
  96.  
  97. # 11
  98.  
  99. mkdir /mnt/share
  100.  
  101. mount.cifs //rain/tmp /mnt/share -o user=astd589 password=shoo6Ahg6
  102.  
  103.  
  104.  
  105. # 12
  106.  
  107. Added in file /etc/fstab a line "//rain/tmp /mnt/share cifs credentials=/etc/rain/passwd,ro 0 0"
  108.  
  109. ( //rain/tmp /mnt/share cifs user=myuser,password=mypassword,ro 0 0 )
  110.  
  111. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement