Re: fdisk editor in DP2

2002-11-20 Thread Donn Miller
Jun Kuriyama wrote:

I'm trying to install DP2 to old machine (P2 dual).  This box has 2GB
IDE disk and ran NT4 before.

When entering fdisk editor after booting from CD-ROM, I cannot delete
NTFS partition by D key.  D key only shows cursor up (NTFS is at
offset 63, offset 0 seems boot selector for NT).

Can I do something for debugging?


I've got the same problem.  I installed a -current snapshot about 2 1/2 
weeks back, and the fdisk editor obviously wrote the partition tables 
with a different assumption about disk geometry than 4.7-stable.  Now, 
my partition tables have boundaries that Linux's fdisk disagrees with. 
For example, using Linux fdisk from my Gentoo install:

fdisk -l /dev/hda

Disk /dev/hda: 255 heads, 63 sectors, 2432 cylinders
Units = cylinders of 16065 * 512 bytes

   Device BootStart   EndBlocks   Id  System
/dev/hda1 136289138+  a0  IBM Thinkpad hibernation
Partition 1 does not end on cylinder boundary:
 phys=(573, 11, 63) should be (573, 254, 63)
/dev/hda2   *37   765   5855692+   c  Win95 FAT32 (LBA)
Partition 2 does not end on cylinder boundary:
 phys=(1023, 2, 63) should be (1023, 254, 63)
/dev/hda3   766  1403   51247355  Extended
/dev/hda4  1404  2432   8265442+  82  Linux swap
/dev/hda5   766   767 16033+  83  Linux
/dev/hda6   768   778 88326   83  Linux
/dev/hda7   779   798160618+  83  Linux
/dev/hda8   799   831265041   83  Linux
/dev/hda9   832  1403   4594558+  83  Linux

I never had this problem with FreeBSD-stable and Linux.  And now, with 
the DP2 install CD, I can't delete any partitions with D, as the 
cursor just moves up.

Here is FreeBSD's idea of my disk geometry:

C/H/S == 38760/16/53

Here is what Linux reports:

 dmesg | grep hda
ide0: BM-DMA at 0x1080-0x1087, BIOS settings: hda:DMA, hdb:pio
hda: TOSHIBA MK2016GAP, ATA DISK drive
hda: 39070080 sectors (20004 MB), CHS=2432/255/63, UDMA(33)

So, I tried pressing G, and entering in 2432/255/63, but the DP2 
fdisk editor still wouldn't let me delete any partitions.

I suppose GEOM is the culprit here.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message


Re: fdisk editor in DP2

2002-11-20 Thread Takahashi Yoshihiro
In article [EMAIL PROTECTED]
Jun Kuriyama [EMAIL PROTECTED] writes:

 When entering fdisk editor after booting from CD-ROM, I cannot delete
 NTFS partition by D key.  D key only shows cursor up (NTFS is at
 offset 63, offset 0 seems boot selector for NT).
 
 Can I do something for debugging?

I think this patch solves the problem.

---
TAKAHASHI Yoshihiro [EMAIL PROTECTED]

Index: chunk.c
===
RCS file: /home/ncvs/src/lib/libdisk/chunk.c,v
retrieving revision 1.45
diff -u -r1.45 chunk.c
--- chunk.c 15 Nov 2002 13:24:29 -  1.45
+++ chunk.c 20 Nov 2002 04:57:30 -
@@ -416,24 +416,27 @@
 int
 Delete_Chunk2(struct disk *d, struct chunk *c, int rflags)
 {
-   struct chunk *c1 = 0, *c2, *c3;
+   struct chunk *c1, *c2, *c3;
chunk_e type = c-type;
u_long offset = c-offset;
 
-   if(type == whole)
+   switch (type) {
+   case whole:
+   case unused:
return 1;
-#ifndef PC98
-   if (!c1  (type == freebsd || type == fat || type == unknown))
-   c1 = Find_Mother_Chunk(d-chunks, c-offset, c-end, extended);
-#endif
-   if (!c1  (type == freebsd || type == fat || type == unknown))
-   c1 = Find_Mother_Chunk(d-chunks, c-offset, c-end, whole);
-#ifndef PC98
-   if (!c1  type == extended)
+   case extended:
c1 = Find_Mother_Chunk(d-chunks, c-offset, c-end, whole);
-#endif
-   if (!c1  type == part)
+   break;
+   case part:
c1 = Find_Mother_Chunk(d-chunks, c-offset, c-end, freebsd);
+   break;
+   default:
+   c1 = Find_Mother_Chunk(d-chunks, c-offset, c-end, extended);
+   if (!c1)
+   c1 = Find_Mother_Chunk(d-chunks, c-offset, c-end,
+  whole);
+   break;
+   }
if (!c1)
return 1;
for (c2 = c1-part; c2; c2 = c2-next) {



fdisk editor in DP2

2002-11-19 Thread Jun Kuriyama

I'm trying to install DP2 to old machine (P2 dual).  This box has 2GB
IDE disk and ran NT4 before.

When entering fdisk editor after booting from CD-ROM, I cannot delete
NTFS partition by D key.  D key only shows cursor up (NTFS is at
offset 63, offset 0 seems boot selector for NT).

Can I do something for debugging?


-- 
Jun Kuriyama [EMAIL PROTECTED] // IMG SRC, Inc.
 [EMAIL PROTECTED] // FreeBSD Project

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: fdisk editor in DP2

2002-11-19 Thread Robo
Is the disk geometry displayed correctly?  I had a similar problem with 
DP2 on a Maxtor Atlas 10k III (18.4GB).  Geom displayed in fdisk w/zero 
cylinders.  Manually setting the geometry fixed the problem.

On Tue, 19 Nov 2002, Jun Kuriyama wrote:

 I'm trying to install DP2 to old machine (P2 dual).  This box has 2GB
 IDE disk and ran NT4 before.
 
 When entering fdisk editor after booting from CD-ROM, I cannot delete
 NTFS partition by D key.  D key only shows cursor up (NTFS is at
 offset 63, offset 0 seems boot selector for NT).
 
 Can I do something for debugging?
 
 
 -- 
 Jun Kuriyama [EMAIL PROTECTED] // IMG SRC, Inc.
  [EMAIL PROTECTED] // FreeBSD Project


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message