sfdisk goes mad -- or -- my borked disk_config

Achim Bohnet ach at mpe.mpg.de
Tue Mar 27 17:46:36 CEST 2007


Hi,

I'm using 3.1.8ubuntu1 with feisty (No ubuntu change touches the
config parts of fai)

With the diskconfig file below (part1 is DellUtil vfat, part2 is Windows XP
ntfs), fai computes way to high cylinder number (log below).


$ cat disk_config/DELL_LAPTOP
# generic disk configuration for one small disk
# disk size from 500Mb up to what you can buy today
#
# <type> <mountpoint> <size in mb> [mount options]     [;extra options]

# Note: AFS: openafs-client/cachesize in debconf/<thisclass>  << afs cache partition

disk_config disk1
primary  -              preserve1
primary  -              preserve2
primary  /              50-        defaults,errors=remount-ro      ; -m 3 -j ext3
logical  /var/cache/afs 2000       defaults                        ; -m 0 -j ext3
logical  swap           3000       sw                              ;


gives this in fai.log:

Mapping disk name disk1 to hda
Creating partition table: LC_ALL=C sfdisk -q  /dev/hda < /var/log/fai/current/partition.hda
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 116280/16/63).
For this listing I'll assume that geometry.

sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)

SFDISK ERROR:

Disk /dev/hda: 116280 cylinders, 16 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hda1          0+      6       7-     56196   de  Dell Utility
/dev/hda2   *      7    1222    1216    9767520    7  HPFS/NTFS
/dev/hda3          0       -       0          0    0  Empty
/dev/hda4          0       -       0          0    0  Empty
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/hda1            63    112454     112392  de  Dell Utility
/dev/hda2        112455  19647494   19535040   7  HPFS/NTFS
/dev/hda3   *  19647936 106968959   87321024  83  Linux
/dev/hda4     106968960 117210239   10241280   5  Extended
/dev/hda5     106969023 111065471    4096449  83  Linux
/dev/hda6     111065535 117210239    6144705  82  Linux swap / Solaris

setup_harddisks version 0.42fai
Probing disks:  /dev/hda
Disks found: hda

-------------

Here the cfdisk output:
                                                                      cfdisk 2.12r

                                                                  Disk Drive: /dev/hda
                                                            Size: 60011642880 bytes, 60.0 GB
                                                  Heads: 255   Sectors per Track: 63   Cylinders: 7296

       Name                   Flags                 Part Type           FS Type                        [Label]                     Size (MB)
 ------------------------------------------------------------------------------------------------------------------------------------------------------
       hda1                                          Primary            Dell Utility                                                   57.58
       hda2                   Boot                   Primary            NTFS                           []                           10001.95
                                                     Pri/Log            Free Space                                                  49952.13

-- 
  To me vi is Zen.  To use vi is to practice zen. Every command is
  a koan. Profound to the user, unintelligible to the uninitiated.
  You discover truth everytime you use it.
                                      -- reddy at lion.austin.ibm.com



More information about the linux-fai mailing list