root's password:
linux-mrph:~ # dd if=/dev/zero of=/dev/sdb bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes (10 kB) copied, 0.00486736 s, 2.1 MB/s
linux-mrph:~ # mkfs.vfat /dev/sdb
mkfs.vfat 3.0.10 (12 Sep 2010)
mkfs.vfat: Device partition expected, not making filesystem on entire device '/dev/sdb' (use -I to override)
linux-mrph:~ # fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xaef21059.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-16383, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-16383, default 16383):
Using default value 16383
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
linux-mrph:~ # mkfs.vfat /dev/sdb
mkfs.vfat 3.0.10 (12 Sep 2010)
mkfs.vfat: Device partition expected, not making filesystem on entire device '/dev/sdb' (use -I to override)
linux-mrph:~ # mkfs.vfat
--help
mkfs.vfat 3.0.10 (12 Sep 2010)
mkfs.vfat: invalid option -- '-'
Unknown option: ?
Usage: mkdosfs [-a][-A][-c][-C][-v][-I][-l bad-block-file][-b backup-boot-sector]
linux-mrph:~ # mkfs.vfat
-n 'vo' /dev/sdb -I
mkfs.vfat 3.0.10 (12 Sep 2010)
linux-mrph:~ # dd if=/dev/zero of=/dev/sdb bs=1024 count=1024*10
dd: invalid number `1024*10'
linux-mrph:~ # dd if=/dev/zero of=/dev/sdb bs=1024 count=10240
dd: writing `/dev/sdb': No space left on device
8193+0 records in
8192+0 records out
8388608 bytes (8.4 MB) copied, 3.55435 s, 2.4 MB/s
linux-mrph:~ # dd if=/dev/zero of=/dev/sdb bs=1024 count=102400
102400+0 records in
102400+0 records out
104857600 bytes (105 MB) copied, 0.228272 s, 459 MB/s
linux-mrph:~ # fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x18fe40aa.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Command (m for help): m
Command action
Command (m for help): p
Disk /dev/sdb: 104 MB, 104857600 bytes
255 heads, 63 sectors/track, 12 cylinders, total 204800 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
Disk identifier: 0x18fe40aa
/dev/sdb1
2048
204799
101376
83
Linux
Command (m for help): d
Selected partition 1
Command (m for help):
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Command (m for help):
Command (m for help): w
The partition table has been altered!
Syncing disks.
linux-mrph:~ # mkfs.ext4 --help
mkfs.ext4: invalid option -- '-'
Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-f fragment-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G meta group size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
linux-mrph:~ # mkfs.vfat -n 'boot' /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
linux-mrph:~ # mkfs.vfat -n 'boot' /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
linux-mrph:~ # mkfs.vfat -n 'boot' /dev/sdb
.bash_history
.gconfd/
.viminfo
.dbus/
.gnupg/
bin/
.emacs.d/
.kbd/
inst-sys/
.exrc
.pki/
.gconf/
.recently-used.xbel
linux-mrph:~ # mkfs.vfat -n 'boot' /dev/sdb
mkfs.vfat 3.0.10 (12 Sep 2010)
linux-mrph:~ #
linux-mrph:~ #
linux-mrph:~ # mount /dev/sdb /mnt
linux-mrph:~ #
linux-mrph:~ #
linux-mrph:~ # ls /mnt
linux-mrph:~ # cd /mnt
linux-mrph:/mnt # du -sh .
16K .
linux-mrph:/mnt # cd ..
linux-mrph:/ # ls
bin
configure
etc
lib
media
opt
root
selinux
sys
usr
boot
dev
home
lost+found
mnt
proc
sbin
srv
tmp
var
linux-mrph:/ # cd /mnt/
linux-mrph:/mnt # echo hello > t.txt
linux-mrph:/mnt # cd ..
linux-mrph:/ # umount /mnt
linux-mrph:/ # umount /mnt/
umount: /mnt/: not mounted
linux-mrph:/ # umount /media/UNTITLED/
linux-mrph:/ # ls
bin
configure
etc
lib
media
opt
root
selinux
sys
usr
boot
dev
home
lost+found
mnt
proc
sbin
srv
tmp
var
linux-mrph:/ # fdisk /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
sdb1
linux-mrph:/ # fdisk /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
sdb1
linux-mrph:/ # fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 4098 MB, 4098883584 bytes
2 heads, 63 sectors/track, 63536 cylinders, total 8005632 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
Disk identifier: 0x01241986
/dev/sdb1
*
64
8005631
4002784
b
W95 FAT32
Command (m for help): d
Selected partition 1
Command (m for help):
Command (m for help):
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-8005631, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-8005631, default 8005631):
Using default value 8005631
Command (m for help): p
Disk /dev/sdb: 4098 MB, 4098883584 bytes
2 heads, 63 sectors/track, 63536 cylinders, total 8005632 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
Disk identifier: 0x01241986
/dev/sdb1
2048
8005631
4001792
83
Linux
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdb: 4098 MB, 4098883584 bytes
2 heads, 63 sectors/track, 63536 cylinders, total 8005632 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
Disk identifier: 0x01241986
Command (m for help): n
Command action
p
Partition number (1-4, default 1): 1
First sector (2048-8005631, default 2048): 1
Value out of range.
First sector (2048-8005631, default 2048): 1
Value out of range.
First sector (2048-8005631, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-8005631, default 8005631):
Using default value 8005631
Command (m for help): x
Expert command (m for help): p
Disk /dev/sdb: 2 heads, 63 sectors, 63536 cylinders
Nr AF
Hd Sec
Cyl
Hd Sec
Cyl
Start
Size ID
Expert command (m for help): m
Command action
Expert command (m for help): c
Number of cylinders (1-1048576, default 63536):
Using default value 63536
Expert command (m for help): b
Partition number (1-4): 1
New beginning of data (1-8005631, default 2048): 1
Expert command (m for help): s
Number of sectors (1-63, default 63):
Using default value 63
Expert command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
linux-mrph:/ #
linux-mrph:/ # fdisk /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
sdb1
linux-mrph:/ # fdisk /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
sdb1
linux-mrph:/ # fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 4098 MB, 4098883584 bytes
2 heads, 33 sectors/track, 121297 cylinders, total 8005632 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
Disk identifier: 0x01241986
/dev/sdb1
1
8005631
4002815+
83
Linux
Command (m for help): d
Selected partition 1
Command (m for help):
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
linux-mrph:/ #
linux-mrph:/ #
linux-mrph:/ # fdisk /dev/sdb
Command (m for help): p\
Disk /dev/sdb: 4098 MB, 4098883584 bytes
127 heads, 62 sectors/track, 1016 cylinders, total 8005632 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
Disk identifier: 0x01241986
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-8005631, default 2048): ^C
linux-mrph:/ #
linux-mrph:/ #
linux-mrph:/ # dd if=/dev/zero of=/dev/
Display all 207 possibilities? (y or n)
linux-mrph:/ # dd if=/dev/zero of=/dev/sdb count=40480 bs=40480
40480+0 records in
40480+0 records out
1638630400 bytes (1.6 GB) copied, 486.109 s, 3.4 MB/s
linux-mrph:/ # fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x17cd5cb2.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 4098 MB, 4098883584 bytes
127 heads, 62 sectors/track, 1016 cylinders, total 8005632 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
Disk identifier: 0x17cd5cb2
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-8005631, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-8005631, default 8005631):
Using default value 8005631
Command (m for help): d
Selected partition 1
Command (m for help): x
Expert command (m for help): m
Command action
Expert command (m for help): p
Disk /dev/sdb: 127 heads, 62 sectors, 1016 cylinders
Nr AF
Hd Sec
Cyl
Hd Sec
Cyl
Start
Size ID
Expert command (m for help): f
Nothing to do. Ordering is correct already.
Expert command (m for help): b
Partition number (1-4): 1
Partition 1 has no data area
Expert command (m for help): c
Number of cylinders (1-1048576, default 1016):
Using default value 1016
Expert command (m for help): s
Number of sectors (1-63, default 62):
Using default value 62
Expert command (m for help): b
Partition number (1-4): 1
Partition 1 has no data area
Expert command (m for help): r
Command (m for help): m
Command action
Command (m for help): o
Building a new DOS disklabel with disk identifier 0x6e71279b.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): l
10
OPUS
55
EZ-Drive
a7
NeXTSTEP
f0
Linux/PA-RISC b
11
Hidden FAT12
56
Golden Bow
a8
Darwin UFS
f1
SpeedStor
12
Compaq diagnost 5c
Priam Edisk
a9
NetBSD
f4
SpeedStor
14
Hidden FAT16 <3 61
SpeedStor
ab
Darwin boot
f2
DOS secondary
16
Hidden FAT16
63
GNU HURD or Sys af
HFS / HFS+
fb
VMware VMFS
17
Hidden HPFS/NTF 64
Novell Netware
b7
BSDI fs
fc
VMware VMKCORE
18
AST SmartSleep
65
Novell Netware
b8
BSDI swap
fd
Linux raid auto
1b
Hidden W95 FAT3 70
DiskSecure Mult bb
Boot Wizard hid fe
LANstep
1c
Hidden W95 FAT3 75
PC/IX
be
Solaris boot
ff
BBT
1e
Hidden W95 FAT1 80
Old Minix
Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help): t
No partition is defined yet!
Command (m for help): n
Command action
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-8005631, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-8005631, default 8005631):
Using default value 8005631
Command (m for help): a
Partition number (1-4): 1
Command (m for help): c
DOS Compatibility flag is set (DEPRECATED!)
Command (m for help):
Command (m for help):
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
linux-mrph:/ #
linux-mrph:/ #
linux-mrph:/ # mkfs.vfat -n 'boot' /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
sdb1
linux-mrph:/ # mkfs.vfat -n 'boot' /dev/sd
sda
sda1
sda4
sda5
sda6
sda7
sdb
sdb1
linux-mrph:/ # mkfs.vfat -n 'boot' /dev/sdb
mkfs.vfat 3.0.10 (12 Sep 2010)
mkfs.vfat: Device partition expected, not making filesystem on entire device '/dev/sdb' (use -I to override)
linux-mrph:/ # mkfs.vfat -n 'boot' /dev/sdb1
mkfs.vfat 3.0.10 (12 Sep 2010)
linux-mrph:/ # fdisk /dev/sdb1
Command (m for help): p
Disk /dev/sdb1: 4097 MB, 4097835008 bytes
127 heads, 62 sectors/track, 1016 cylinders, total 8003584 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
Disk identifier: 0x00000000
Command (m for help): n
Command action
p
Partition number (1-4, default 1): 1
First sector (2048-8003583, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-8003583, default 8003583):
Using default value 8003583
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
linux-mrph:/ #
linux-mrph:/ #
linux-mrph:/ # mkfs.vfat -n boot /dev/sdb1
mkfs.vfat 3.0.10 (12 Sep 2010)
linux-mrph:/ # umount /mnt
umount: /mnt: not mounted
linux-mrph:/ # umount /media/BOOT/