Active Topics

 


Reply
Thread Tools
Posts: 165 | Thanked: 78 times | Joined on Jun 2010
#1
I did search maemo.org and googled, read a lot of posts but i am still confused and worried.
So i ask and thank for the advised opinions of this community.

Some days ago i repartitioned my N900 EMMC using gparted running in my linux desktop pc with my N900 in USB storage rd mode.

I follow the solution #6 in wiki.maemo.org/Repartitioning_the_flash and everything went fine. Gparted did move and resize the partitions and all my data was preserved.

After reboot all my installed applications and also multiboot / nitroid and powerkernel oc are working as before without any problem.

What i don't like are the warnings that sfdisk reports:

Code:
sfdisk -l

Disk /dev/mmcblk0: 977024 cylinders, 4 heads, 16 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/64/32 (instead of 977024/4/16).
For this listing I'll assume that geometry.
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk0p1          0+  21503   21504-  22020064    c  W95 FAT32 (LBA)
		start: (c,h,s) expected (0,2,1) found (1,0,1)
/dev/mmcblk0p2      21504   25599    4096    4194304   83  Linux
/dev/mmcblk0p3      25600   26367     768     786432   82  Linux swap / Solaris
/dev/mmcblk0p4      26368   30463    4096    4194304   83  Linux 

sfdisk -g
/dev/mmcblk0: 977024 cylinders, 4 heads, 16 sectors/track

sfdisk -G
/dev/mmcblk0: 30532 cylinders, 64 heads, 32 sectors/track
As i understand sfdisk detects that the disk geometry reported by the kernel (977024 cylinders, 4 heads, 16 sectors/track) is different from that in the partition table (30532 cylinders, 64 heads, 32 sectors/track)
Is this a problem? Can my file system be corrupted in the future because of this?

The "start: (c,h,s) expected (0,2,1) found (1,0,1)" warning in sfdisk is (as i found in some articles) caused by the partitions not ending on a cylinder boundary. This could be avoided if i have checked the "round to cylinders" option in gparted.
It seams however that this is harmless and there is no risk for the file system integrity.

Using "fdisk" i get no warnings at all:

Code:
fdisk -l

Disk /dev/mmcblk0: 32.0 GB, 32015122432 bytes
64 heads, 32 sectors/track, 30532 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x0000c26a

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1               1       21504    22020064    c  W95 FAT32 (LBA)
/dev/mmcblk0p2           21505       25600     4194304   83  Linux
/dev/mmcblk0p3           25601       26368      786432   82  Linux swap / Solaris
/dev/mmcblk0p4           26369       30464     4194304   83  Linux
If fdisk reports no problems at all may i assume that the differences in sfdisk reported disk geometry don't matter?
Where does the kernel keep the disk geometry parameters?

Thanks for your comments

Last edited by sacal; 2010-12-17 at 12:10.
 
Posts: 165 | Thanked: 78 times | Joined on Jun 2010
#2
Bump (excuse me)

Anyone please.
Help is much appreciated.

Thanks
 
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#3
IMO there's nothing to worry about. Mine shows the same thing for my SD card. Like you said everything works fine. Linux can handle it.
 

The Following User Says Thank You to stlpaul For This Useful Post:
Posts: 2 | Thanked: 1 time | Joined on Dec 2010
#4
Why don't you go back and "round to cylinders" ?
 

The Following User Says Thank You to Delfas For This Useful Post:
Posts: 165 | Thanked: 78 times | Joined on Jun 2010
#5
Originally Posted by Delfas View Post
Why don't you go back and "round to cylinders" ?
Thanks for your answer and suggestion.

I thought about doing it and maybe later i will do it. However i read several posts in the net about that issue (linux in general not only maemo) and all of them agree that linux can handle that without any problem. Old dos systems however could have problems with partitions not ending at cylinder boundaries. That justifies the sfdisk's warning.

The 1st warning, about the difference between disk geometry reported by the kernel and the partition table, is what i really don't like as i couldn't find any reference about how the kernel handles that and how it can be fixed.

stlPaul

Thanks for your answer.
Are you sure linux can handle it ?
Until now, I have to admit that you are wright but, If there is a reference in the kernel about the geometry of the disk there must be a reason for it.
Note that sfdisk doesn't report an error but a warning and for me a warning means "you may proceed but take care"
 
dchky's Avatar
Posts: 549 | Thanked: 299 times | Joined on Jun 2010 @ Australian in the Philippines
#6
The kernel should be getting the geometry straight from the drive controller - maybe this link might shed a little more light on it.

Pretty much you don't need to worry about drive geometry anymore on modern operating systems (and hardware)
 

The Following User Says Thank You to dchky For This Useful Post:
Posts: 165 | Thanked: 78 times | Joined on Jun 2010
#7
dchky

Many thanks for that link

That article is difficult to digest (at least for me) as there is so many information about how the firmware bios and os deal with disks since the old dos systems.

However, if i understood well, modern linux and windows systems don't use CHS (cylinder,head, sector) adressing anymore. They rely on LBA (linear block addressing) that is handled by the bios and the disk drivers.

So, if i am wright, the reported sfdisk warnings may be safely ignored.

Maybe sfdisk should be updated to check if the OS is a modern one and omit the "warning" word from the report.
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:00.