...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# hexdump -C /dev/sda -n 4096 | more |
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# dd if=/dev/urandom of=/dev/sda bs=1k count=3 |
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# hexdump -C /dev/sda -n 4096 | more
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# hexdump -C /dev/sda -n 4096 | more
# Again, it should be blank, this is the expected output:
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00001000
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# dd if=/dev/urandom of=/dev/sda bs=1k count=1024
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# hexdump -C /dev/sda -n 4096 | more
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# hexdump -C /dev/sdb -n 4096 | more
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# fdisk /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# ls /dev/sda1
/dev/sda1
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# mkfs.vfat /dev/sda1
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# mount /dev/sda1 /mnt
|
...
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
|
root@xilinx-zcu102-20192020_2:~# sync
|
Exit QEMU. hexdump
the sata0.bin
file with the following query (which will search for "FAT" string and some context around it). We should see the binary data for the partition table and the new FAT partition.
...