I'm currently trying to find a file that was hidden in sector 2047. My root partition starts at sector 2048.
How would I go about finding that file? Given the only info I have is the sector its in.
Thanks in advance!
GSmartControl and any other command line tool (like fdisk
, smartctl
, cat /sys/block/sd*/queue/hw_sector_size
, cat /sys/block/sd*/queue/physical_block_size
) I had used report the same for both of my disks:
Sector Size: 512 bytes logical/physical
This is a default Ubuntu 18.10 (later upgraded to 19.04) installation. However, the stat -f
command on both disks reports:
Block size: 4096 Fundamental block size: 4096
Both of my disks are SSDs and AFAIK SSD disks require a sector size of 4K. Is this OK or am I missing something? Does the information returned by stat
(=4K) ensure that the OS will always send IOs to the disk in multiple of 4K and these blocks will never cross 4K boundaries (IO blocks will always be aligned to 4K)?
Please note the following output (sdb2
is my root partition, sda
is my /home
disk):
# fdisk -l /dev/sd?
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: SanDisk SDSSDH35
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 /dev/sdb: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Disk model: ADATA SU800NS38
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: gpt
Disk identifier: xxxx....
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 500117503 499066880 238G Linux filesystem
# df / /home
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 244568380 17799136 214276188 8% /
/dev/sda 479670976 129685112 325550152 29% /home
I'd like to create a VeraCrypt volume on my 4TB external hdd with 50GB of outer volume and the rest hidden. However, during the set up process I get the following error message:
I don't want to divide it into two partitions, so I checked sudo fdisk -l /dev/sdc
to find out about the sector size:
Disk /dev/sdc: 3.7 TiB, 4000787029504 bytes, 7814037167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 57DF69GQ-C896-R557-EE98-54GF68GF7898
Device Start End Sectors Size Type
/dev/sdc1 2048 7814035455 7814033408 3.7T Linux filesystem
How do I force my system to see the hdd as 4096?
I have created security onion
vm a distribution based on ubuntu
in vmware work station with 52GB
Hard disk space. But fdisk
command shows me more space than I have allocated.
It shows 55.8 which I dont know it came from.
Now I want to increase the root partition in guest OS for which I used fdisk utility after expanding it in VMware (now 55GB, again I am seeing 59.1). Following this link (till setp 7) I created a new partition, as can be seen below sda3
aneela@aneela-virtual-machine:~$ sudo fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 59.1 GB, 59055800320 bytes
255 heads, 63 sectors/track, 7179 cylinders, total 115343360 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: 0x0002da52
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 106954751 53476352 83 Linux
/dev/sda2 106956798 109049855 1046529 5 Extended
/dev/sda3 106954752 106956797 1023 8e Linux LVM
/dev/sda5 106956800 109049855 1046528 82 Linux swap / Solaris
However there is something wrong as all sectors mentioned by fdisk
are not in use as the last sector in use is 109049855 and I have more than that. Are others sectors not in use or what? How can I include missing sectors so that I could expand to full capacity as after that I would simply merge partitions for which there are plenty of links available.
Thanks.