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

Bug#80325: AW: Bug#80325: Re: Bug#80325: how compact, vanilla and fdisk see the partition table

Hi Adam,

	> >  1) reported all the slices in the BSD partition , regardless of the
	> > kernel flavor used.

	> Right, that makes sense.  Was 'fdisk -l' output the same not matter
	> what kernel as well?  It should be.

Yes. In both cases, it looks like this:

Disk /dev/sda: 134 heads, 62 sectors, 1019 cylinders
Units = cylinders of 8308 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1             1        25    103819   83  Linux
/dev/sda2            26       272   1026038   a7  NeXTSTEP
/dev/sda3   *       273       469    818338   a5  BSD/386
/dev/sda4           470      1019   2284700    5  Extended
/dev/sda5           470       494    103819   82  Linux swap
/dev/sda6           495       519    103819   83  Linux
/dev/sda7           520       618    411215   83  Linux
/dev/sda8           619       643    103819   83  Linux
/dev/sda9           644      1019   1561873   83  Linux

	> > 2) when using the 'compact' flavor, reported the extended partition as
	> > containing just the Linux swap partition (/dev/sda9) while ignoring all
	> > the native Linux partitions (sda10, 11, 12 and 13, in the installer's
	> > nomenclature)

	> > 3) when using the 'vanilla' flavor, reported all the logical Linux
	> > partitions on the extended partition as (/dev/sda9, 10, 11, 12 and 13),
	> > as expected.

	> Hmm.  Do you think this is because the vanilla kernel has BSD
	> disklabel support and idepci/compact does not?  

Well, I guess that dbootstrap sees all the partitions and disklabels but only
displays as many partitions as reported by the kernel at boot time. I haven't 
looked into the dbootstrap source, but I wouldn't be surprised to find 
something like this:

struct partition p[100]; /* the partition table as used by dbootstrap */
/* next, libfdisk functions read the partition table and write the result to p */ 
for (i=p[1]; i<=number_of_partitions_reported_by_kernel; i++) {
    printf ("%s %s %s \n", p.device_number, p.mount_state, p.type);
    /* of course, dbootstrap would use some ncurses function, not printf */

That would lead to correct behavior for 'vanilla' and to the broken behavior I
observed with 'compact'. I could be wrong of course, but if I'm right, this 
sub-problem could be fixed by changing the check in the for() construct to
the equivalent of 'i <= number_of_partitions_discovered_by_libfdisk_functions;'.
Unfortunately I know too little about dbootstrap to do this.

	> And if vanilla is doing the right thing bug compact/idepci is not,
	> then perhaps those kernels need to be rebuilt!

Have you considered recompiling libfdisk _without_ BSD disklabel support and 
linking dbootstrap against that version? I tried the suggestion of Chris again
and changed the type of the BSD partition to some esotheric value ("22 unknown")
It made everything work fine. (I don't know what went wrong with my first try I
reported about in an earlier mail). If the installer were using a libfdisk version 
without BSD disklabel support, I would expect the same trouble-free behavior. Of 
course, you don't want this fix to break something else. Is there any situation 
where dbootstrap would have to mess around inside BSD partitions?

Since I'm already talking about my installation experiences anyway, let me update
my part of the bug report to a level comparable to Chris's part.

relevant line in dmesg:
sda: sda1 sda2 sda3! sda4 < sda5 sda6 sda7 sda8 sda9 > < sda10 sda11 sda12 sda13 >

Jan  8 23:32:04 (none)  syslogd started: BusyBox v0.43 (2000.11.30-14:58+0000)
Jan  8 23:32:39 (none) user.info dbootstrap[128]:  

relevant line in dmesg:
sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 sda9 > 

Jan  8 23:39:29 (none)  syslogd started: BusyBox v0.43 (2000.11.30-14:58+0000)
Jan  8 23:39:31 (none) user.warn dbootstrap: no device name for disk /dev/sda 
partition 10 (skipped)
Jan  8 23:39:31 (none) user.warn dbootstrap: no device name for disk /dev/sda 
partition 11 (skipped)
Jan  8 23:39:31 (none) user.warn dbootstrap: no device name for disk /dev/sda 
partition 12 (skipped)
Jan  8 23:39:31 (none) user.warn dbootstrap: no device name for disk /dev/sda 
partition 13 (skipped)
Jan  8 23:39:35 (none) user.info dbootstrap[28]:  
Jan  8 23:39:35 (none) user.warn dbootstrap[28]: no device name for disk /dev/sda 
partition 10 (skipped)

This means:

1) The compact kernel indeed doesn't support BSD disklabels. I was wrong in my 
earlier e-mail about answering "Yes" to Chris's "are you sure?" question.
2) I cannot reproduce the weird behavior Chris discovered in the /var/log/
messages of the 'compact' installation. 
3) The behavior of 'vanilla' is the same as Chris reported for 'idepci', 
including the fast scrolling-by error messages.
4) Unlike every other problem, these error messages don't dissappear when I change
the label of the BSD partition. So this phenomenon is probably unrelated to the 
partition number bug.
5) I am curious to see Chris's output of 'view partition table' for the compact
kernel. If my theory is correct (about why dbootstrap ignores my sda 10, 11 and
12 partitions), he will see 11 partitions but not sda 12, 13, 14 and 15.

Hope that helped,


Reply to: