Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does fdisk ask me for the number of cylinders?

cylinders Fdisk
0
Posted

Why does fdisk ask me for the number of cylinders?

0

Your fdisk is probably asking the kernel for the size of the disk with a BLKGETSIZE block device ioctl, which returns the sector count of the disk in a 32-bit number. If the size of the disk exceeds the ability to be stored in this 32-bit number (2 TB is the limit), the ioctl returns ETOOBIG as an error. This error indicates that the program should try the 64-bit ioctl (BLKGETSIZE64), but when fdisk doesn’t do that, it just asks the user to supply the number of cylinders. You can tell fdisk the number of cylinders yourself. The number to use (sectors / (255 * 63)) is printed by the following commands. Use the appropriate device instead of “e0.0”. sectors=`cat /sys/block/etherd\!e0.0/size` echo $sectors 255 63 ‘*’ / p | dc But no MSDOS partition table can ever work with more than 2TB. The reason is that the numbers in the partition table itself are only 32 bits in size. That means you can’t have a partition larger than 2TB in size or starting further than 2TB from the beginning of the d

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123