Skip to content

Instantly share code, notes, and snippets.

Created October 30, 2014 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0fe7bc9b5ba5202c14d0 to your computer and use it in GitHub Desktop.
Save anonymous/0fe7bc9b5ba5202c14d0 to your computer and use it in GitHub Desktop.
[regular-user@localhost ~]$ cd ~/Desktop/
[regular-user@localhost Desktop]$ truncate -s 1200M ntfs.img
[regular-user@localhost Desktop]$ mkfs.ntfs ntfs.img
ntfs.img is not a block device.
Refusing to make a filesystem here!
[regular-user@localhost Desktop]$ mkfs.ntfs -F ntfs.img
ntfs.img is not a block device.
mkntfs forced anyway.
The sector size was not specified for ntfs.img and it could not be obtained automatically. It has been set to 512 bytes.
The partition start sector was not specified for ntfs.img and it could not be obtained automatically. It has been set to 0.
The number of sectors per track was not specified for ntfs.img and it could not be obtained automatically. It has been set to 0.
The number of heads was not specified for ntfs.img and it could not be obtained automatically. It has been set to 0.
Cluster size has been automatically set to 4096 bytes.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
Initializing device with zeroes: 100% - Done.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
[regular-user@localhost Desktop]$ sudo mount ntfs.img /mnt
[sudo] password for regular-user:
[regular-user@localhost Desktop]$ sudo -i
[root@localhost ~]# cd /mnt
[root@localhost mnt]# touch 'Белов А. В. - Микроконтроллеры AVR в радиолюбительской практике. Автоматика. Радиоэлектроника. Связь. Радио. Радиосвязь. Любительская радиосвязь.(2007)(336).djvu'
[root@localhost mnt]# ls -al /mnt
total 4
drwxrwxrwx 1 root root 4096 Oct 30 19:55 .
drwxr-xr-x 1 root root 122 Oct 30 03:35 ..
-rwxrwxrwx 1 root root 0 Oct 30 19:55 Белов А. В. - Микроконтроллеры AVR в радиолюбительской практике. Автоматика. Радиоэлектроника. Связь. Радио. Радиосвязь. Любительская радиосвязь.(2007)(336).djvu
[root@localhost mnt]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment