Boyd Lynn Gerber wrote:
> On Tue, 31 Oct 2006, Carl-Daniel Hailfinger wrote:
>> Felix Miata wrote:
>>> On 06/10/31 14:43 (GMT+0100) Christoph Thiel apparently typed:
>>>> On Tue, Oct 31, 2006 at 07:23:11AM -0500, Felix Miata wrote:
>>>>> Check out this too: https://bugzilla.novell.com/show_bug.cgi?id=214992
>>>> We'll be using classical ide drivers for PATA devices in Beta2 -- so this
>>>> bug is workarounded.
>>> The bigger problem is as described in
>>> https://bugzilla.novell.com/show_bug.cgi?id=214992#c3 which says it's a
>>> kernel problem that I have been able to confirm in
>>> http://bugzilla.kernel.org/.
>> I had a patch to use up to 256 partitions per disk independent of the
>> type of disk. I can dig it out if anyone wants to test.
> 
> Could I get your patch?  I think it would be good if this were readily
> available to all.

Ahem... I forgot that you need a recompiled kernel for it to work.
Or at least arcane and forgotten commands like partx. Personally, I
like the partx way better. With the attached patch to util-linux
you can use partx.

Make sure no partition on sda is in use (swap/suspend/mounted), then
# partx -d /dev/sda
# kpartx -a /dev/sda
Now /dev/sda[1-15] have vanished and /dev/disk/by-name/sda[1-255]
appear instead. Mounting these devices works normally.

I also added this to
https://bugzilla.novell.com/show_bug.cgi?id=214992#c12

Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/
--- util-linux-2.12r/Makefile   2004-12-23 01:43:09.000000000 +0100
+++ util-linux-2.12r/Makefile   2006-11-02 16:44:52.000000000 +0100
@@ -18,7 +18,8 @@
        fdisk \
        hwclock \
        sys-utils \
-       text-utils
+       text-utils \
+       partx
 
 .PHONEY: all install clean now
 all:   defines.h
@@ -43,7 +44,7 @@
 
 clean:
        -rm -f *.o *~ omake conftest conftest.c core
-       @for subdir in $(SUBDIRS) partx; do \
+       @for subdir in $(SUBDIRS); do \
                (cd $$subdir && $(MAKE) $@) || exit 1; \
        done
 
--- util-linux-2.12r/partx/partx.c~     2004-08-23 22:13:27.000000000 +0200
+++ util-linux-2.12r/partx/partx.c      2006-11-02 17:05:55.000000000 +0100
@@ -38,6 +38,8 @@
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <linux/hdreg.h>        /* HDIO_GETGEO */
+/* workaround for __user in header file */
+#define __user
 #include <linux/blkpg.h>
 #define BLKGETSIZE _IO(0x12,96)    /* return device size */
 
--- util-linux-2.12r/partx/addpart.c~   2006-11-02 17:18:06.000000000 +0100
+++ util-linux-2.12r/partx/addpart.c    2006-11-02 17:18:46.000000000 +0100
@@ -3,6 +3,8 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+/* workaround for __user in header file */
+#define __user
 #include <linux/blkpg.h>
 
 int
--- util-linux-2.12r/partx/delpart.c~   1999-07-09 04:56:36.000000000 +0200
+++ util-linux-2.12r/partx/delpart.c    2006-11-02 17:18:52.000000000 +0100
@@ -3,6 +3,8 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+/* workaround for __user in header file */
+#define __user
 #include <linux/blkpg.h>
 
 int
--- util-linux-2.12r/partx/Makefile~    2002-04-10 12:11:07.000000000 +0200
+++ util-linux-2.12r/partx/Makefile     2006-11-02 17:33:53.000000000 +0100
@@ -1,7 +1,12 @@
+include ../MCONFIG
+
 OBJ = bsd.o dos.o partx.o solaris.o unixware.o gpt.o crc32.o
 CFLAGS += -Wall
+SBIN=
+
+SBIN:=$(SBIN) partx
 
-all: addpart delpart partx
+all: addpart delpart $(SBIN)
 
 partx: $(OBJ)
 
@@ -13,3 +18,7 @@
        rm -f $(OBJ) addpart.o delpart.o addpart delpart partx *~
 
 $(OBJ): partx.h
+
+install: all
+       $(INSTALLDIR) $(SBINDIR)
+       $(INSTALLBIN) $(SBIN) $(SBINDIR)

Reply via email to