[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#80325: Installer misreports partition numbers



Hi.

 (This mail is only sent to Glenn and the -boot list).

In <3A5A7582.7BAF0205@optushome.com.au>,
  on Tue, 09 Jan 2001 13:20:50 +1100,
 Glenn McGrath <bug1@optushome.com.au> wrote:

> Im not sure if fdisk/cfdisk will show BSD slices....

It may be old information, but I have read a LDP HOWTO titled
"The Linux+FreeBSD mini-HOWTO (v1.11, 30 March 2000)" and it
is written that fdisk does not show the BSD partitions as normal 
partitions but they can be shown as special ones by 'b' command
in fdisk ('b' seems to mean "BSD disklabel support").

Sample is given in that document as follows:

 =====  =====  =====  =====  =====  =====  =====  =====  ===== 
Command (m for help): p

Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes

   Device Boot   Begin    Start      End   Blocks   Id  System
/dev/hda1   *        1        1       27    54400+  83  Linux native
/dev/hda2           28       28       55    56448   83  Linux native
/dev/hda3           56       56      403   701568   83  Linux native
/dev/hda4          404      404      621   439488   a5  BSD/386

Command (m for help): b
Reading disklabel of /dev/hda4 at sector 1624897.

BSD disklabel command (m for help): p

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    64512  1624896    4.2BSD        0     0     0   # (Cyl.  404 - 419)
  b:   104832  1689408      swap                        # (Cyl.  420 - 445)
  c:   878976  1624896    unused        0     0         # (Cyl.  404 - 621)
  e:    64512  1794240    4.2BSD        0     0     0   # (Cyl.  446 - 461)
  f:   645120  1858752    4.2BSD        0     0     0   # (Cyl.  462 - 621)

BSD disklabel command (m for help): q
bash#
 =====  =====  =====  =====  =====  =====  =====  =====  ===== 

So the partition listing by fdisk does not match if the kernel
has the BSD disklabel support.

When I read the cfdisk code (util-linux 2.10f-1), it does not
have the BSD disklabel support at all.  So if the kernel has
the BSD disklabel support, using cfdisk requires very careful
operation since the device name of a logical partition may not
match between kernel and cfdisk/fdisk at all.

I have not checked the code in full, but it seems that sfdisk
can handle the BSD partition in the way of kernel.  So using
sfdisk may be safer.

Regards.
-- 
  Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>



Reply to: