Processed: Re: Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-18 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> retitle 605759 [s390] parted: does not re-read DASD partition table, breaks 
> d-i
Bug #605759 [installation-reports] [s390/hercules] disk partitioning failed:  
no /dev/dsda1
Changed Bug title to '[s390] parted: does not re-read DASD partition table, 
breaks d-i' from '[s390/hercules] disk partitioning failed:  no /dev/dsda1'
> reassign 605759 parted 2.3-4
Bug #605759 [installation-reports] [s390] parted: does not re-read DASD 
partition table, breaks d-i
Bug reassigned from package 'installation-reports' to 'parted'.
Bug #605759 [parted] [s390] parted: does not re-read DASD partition table, 
breaks d-i
Bug Marked as found in versions parted/2.3-4.
> severity 605759 serious
Bug #605759 [parted] [s390] parted: does not re-read DASD partition table, 
breaks d-i
Severity set to 'serious' from 'normal'

> tags 605759 = d-i patch fixed-upstream
Bug #605759 [parted] [s390] parted: does not re-read DASD partition table, 
breaks d-i
Added tag(s) fixed-upstream and patch; removed tag(s) moreinfo.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
605759: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605759
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.129274203228928.transcr...@bugs.debian.org



Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-18 Thread Niko Tyni
retitle 605759 [s390] parted: does not re-read DASD partition table, breaks d-i
reassign 605759 parted 2.3-4
severity 605759 serious
tags 605759 = d-i patch fixed-upstream
thanks

On Fri, Dec 17, 2010 at 08:04:39PM +0100, Ferenc Wagner wrote:
> Niko Tyni  writes:
> > On Thu, Dec 16, 2010 at 05:37:55PM +0100, Ferenc Wagner wrote:
> >> Niko Tyni  writes:
> >> 
> >>> Hercules s390 emulator installation failed at disk partitioning;
> >>> new partitions don't seem to show up in /dev.

> > It works fine if I create the partition manually with fdasd.

> > Furthermore, if I try to create a partition first with the d-i interface
> > (getting the error) and then invoke fdasd and write out a trivial no-op
> > such as change the volume serial from LIN120 to LIN120, /dev/dasda1
> > appears.

> > It looks to me like the problem is that d-i does not manage to reread
> > the partition table.

> > I'm not sure if I understand the architecture correctly here, but
> > maybe the problem is this change in parted 2.3 ?
> >
> > libparted: remove now-worse-than-useless _kernel_reread_part_table
> > Now that we're using BLKPG properly, there's no point in using the
> > less-functional BLKRRPART ioctl to make the kernel reread the 
> > partition
> > table.
> > More importantly, this function would fail when any partition is in
> > use, in spite of our having carefully vetted them via BLKPG ioctls.
> >
> > I see fdasd (as of s390-tools 1.8.3-3) uses BLKRRPART and not BLKPG.
> >
> > The timeline would also fit the successful reports #569209 and #575682.
> 
> This looks a fairly plausible theory, and the outcome is even more
> interesting, search for DASD in git log libparted/arch/linux.c.  As I
> understand it, 9fa0e180 may even fix this problem.

Thanks! The patch applies cleanly to 2.3-4, and I can confirm that the
it fixes the issue completely for me.

(For the sake of completeness: I built the modified parted on zelenka.d.o
 without the build dependencies libblkid-dev and check. They don't seem
 to matter in this case.)

I'm attaching the patch for convenience and reassigning this to parted.
Setting the severity to 'serious' as it looks like this breaks d-i on
s390 for everybody and not just hercules users.

Parted maintainers: feel free to downgrade if this is inflated, and
please let me know if I can help further in any way.
-- 
Niko Tyni   nt...@debian.org
>From 9fa0e1800db5b9f094ae481fd95a51da03f19e95 Mon Sep 17 00:00:00 2001
From: Brian C. Lane 
Date: Mon, 22 Nov 2010 10:01:56 +0100
Subject: [PATCH] linux: remove DASD restriction on _disk_sync_part_table

* libparted/arch/linux.c: Include .
(linux_disk_commit): Assert that _have_blkpg returns true
and don't skip _disk_sync_part_table for DASD devices.
Otherwise, when creating a partition on a DASD device,
new /dev/*[12...] device files would not be created.
Also, remove obsolete comment about DevFS.
For details, see http://bugzilla.redhat.com/651478
and http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10191
---
 libparted/arch/linux.c |   22 +-
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index a5ae10c..4e61bfe 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -40,6 +40,7 @@
 #include 
 #include /* for uname() */
 #include 
+#include 
 #ifdef ENABLE_DEVICE_MAPPER
 #include 
 #endif
@@ -2824,20 +2825,15 @@ linux_disk_commit (PedDisk* disk)
 return _dm_reread_part_table (disk);
 #endif
 if (disk->dev->type != PED_DEVICE_FILE) {
-/* The ioctl() command BLKPG_ADD_PARTITION does not notify
- * the devfs system; consequently, /proc/partitions will not
- * be up to date, and the proper links in /dev are not
- * created.  Therefore, if using DevFS, we must get the kernel
- * to re-read and grok the partition table.
- */
-/* Work around kernel dasd problem so we really do BLKRRPART */
-		int ok = 1;
-		if (disk->dev->type != PED_DEVICE_DASD && _have_blkpg ()) {
-			if (!_disk_sync_part_table (disk))
-			  ok = 0;
-		}
 
-return ok;
+		/* We now require BLKPG support.  If this assertion fails,
+		   please write to the mailing list describing your system.
+		   Assuming it's never triggered, ...
+		   FIXME: remove this assertion in 2012.  */
+		assert (_have_blkpg ());
+
+		if (!_disk_sync_part_table (disk))
+			return 0;
 }
 
 return 1;
-- 
1.7.2.3



Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-17 Thread Ferenc Wagner
Niko Tyni  writes:

> On Thu, Dec 16, 2010 at 05:37:55PM +0100, Ferenc Wagner wrote:
>
>> Niko Tyni  writes:
>> 
>>> Hercules s390 emulator installation failed at disk partitioning;
>>> new partitions don't seem to show up in /dev.
>>
>> Thanks for the detailed but to-the-point report.  This may be a kernel,
>> a udev or a partman issue.  Could you please try backing out of the
>> partitioning menu to the main menu, start a shell in the installer
>> environment with the appropriate menu item and do the partitioning
>> yourself by fdasd or whatever's needed?  Then please check if the new
>> partitions show up in /proc/partitions and under /dev.  This would help
>> us narrowing down the case.
>
> It works fine if I create the partition manually with fdasd.

Thanks, that's good info.  Now the question is why parted_server failed
to refresh the DASD partitions.  It's a pity you didn't attach
/var/log/partman.  Could you please attach it to the bug report,
preferably together with /var/log/syslog?  You could get them by
selecting "Save debug logs" from the installer main menu.

Wait, see below.

> Furthermore, if I try to create a partition first with the d-i interface
> (getting the error) and then invoke fdasd and write out a trivial no-op
> such as change the volume serial from LIN120 to LIN120, /dev/dasda1
> appears.

So libparted commits the partition, only fails to notify the kernel.

> It looks to me like the problem is that d-i does not manage to reread
> the partition table.

Agreed.

> I'm not sure if I understand the architecture correctly here, but
> maybe the problem is this change in parted 2.3 ?
>
> libparted: remove now-worse-than-useless _kernel_reread_part_table
> Now that we're using BLKPG properly, there's no point in using the
> less-functional BLKRRPART ioctl to make the kernel reread the 
> partition
> table.
> More importantly, this function would fail when any partition is in
> use, in spite of our having carefully vetted them via BLKPG ioctls.
>
> I see fdasd (as of s390-tools 1.8.3-3) uses BLKRRPART and not BLKPG.
>
> The timeline would also fit the successful reports #569209 and #575682.

This looks a fairly plausible theory, and the outcome is even more
interesting, search for DASD in git log libparted/arch/linux.c.  As I
understand it, 9fa0e180 may even fix this problem.

> I suppose I can try to hack parted to use BLKRRPART again and see if
> that helps, but it's probably going to take a few days as I need to
> get the emulator up and running first so I can rebuild the udeb.

Probably you'd be better off backporting the relevant changes to 2.3-4
and testing that.
-- 
Good luck,
Feri.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87r5dgmda0@tac.ki.iif.hu



Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-17 Thread Niko Tyni
On Thu, Dec 16, 2010 at 05:37:55PM +0100, Ferenc Wagner wrote:
> Niko Tyni  writes:
> 
> > Hercules s390 emulator installation failed at disk partitioning;
> > new partitions don't seem to show up in /dev.

> Thanks for the detailed but to-the-point report.  This may be a kernel,
> a udev or a partman issue.  Could you please try backing out of the
> partitioning menu to the main menu, start a shell in the installer
> environment with the appropriate menu item and do the partitioning
> yourself by fdasd or whatever's needed?  Then please check if the new
> partitions show up in /proc/partitions and under /dev.  This would help
> us narrowing down the case.

It works fine if I create the partition manually with fdasd.

Furthermore, if I try to create a partition first with the d-i interface
(getting the error) and then invoke fdasd and write out a trivial no-op
such as change the volume serial from LIN120 to LIN120, /dev/dasda1
appears.

It looks te me like the problem is that d-i does not manage to reread
the partition table.

I'm not sure if I understand the architecture correctly here, but
maybe the problem is this change in parted 2.3 ?

libparted: remove now-worse-than-useless _kernel_reread_part_table
Now that we're using BLKPG properly, there's no point in using the
less-functional BLKRRPART ioctl to make the kernel reread the partition
table.
More importantly, this function would fail when any partition is in
use, in spite of our having carefully vetted them via BLKPG ioctls.

I see fdasd (as of s390-tools 1.8.3-3) uses BLKRRPART and not BLKPG.

The timeline would also fit the successful reports #569209 and #575682.

I suppose I can try to hack parted to use BLKRRPART again and see if
that helps, but it's probably going to take a few days as I need to
get the emulator up and running first so I can rebuild the udeb.
-- 
Niko Tyni   nt...@debian.org



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101217124018.ga3...@madeleine.local.invalid



Processed: Re: Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-16 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tag 605759 +moreinfo
Bug #605759 [installation-reports] [s390/hercules] disk partitioning failed:  
no /dev/dsda1
Added tag(s) moreinfo.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
605759: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605759
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.129251748120724.transcr...@bugs.debian.org



Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-16 Thread Ferenc Wagner
tag 605759 +moreinfo
thanks

Niko Tyni  writes:

> Hercules s390 emulator installation failed at disk partitioning;
> new partitions don't seem to show up in /dev.

Hi,

Thanks for the detailed but to-the-point report.  This may be a kernel,
a udev or a partman issue.  Could you please try backing out of the
partitioning menu to the main menu, start a shell in the installer
environment with the appropriate menu item and do the partitioning
yourself by fdasd or whatever's needed?  Then please check if the new
partitions show up in /proc/partitions and under /dev.  This would help
us narrowing down the case.
-- 
Thanks,
Feri.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87wrn9hdwc@tac.ki.iif.hu



Bug#605759: [s390/hercules] disk partitioning failed: no /dev/dsda1

2010-12-02 Thread Niko Tyni
Package: installation-reports
Severity: normal
Tags: d-i

Hercules s390 emulator installation failed at disk partitioning;
new partitions don't seem to show up in /dev.

-- Package-specific info:

Boot method: emulator
Image version: 
http://ftp.fi.debian.org/debian/dists/unstable/main/installer-s390/20101127/images/generic/
Date: 20101203

Machine: hercules s390 emulator on amd64
Partitions: N/A


Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot:   [O]
Detect network card:[O]
Configure network:  [O]
Detect CD:  [ ]
Load installer modules: [O]
Detect hard drives: [O]
Partition hard drives:  [E]
Install base system:[ ]
Clock/timezone setup:   [ ]
User/password setup:[ ]
Install tasks:  [ ]
Install boot loader:[ ]
Overall install:[E]

Comments/Problems:

Trying an s390 installation inside hercules on amd64.

Following the instructions at
 http://www.josefsipek.net/docs/s390-linux/hercules-s390.html

The disk image was created with
 dasdinit -z -lfs -linux 3390.LINUX.0120 3390-3 LIN120

The installer started fine. Activated the DASD without formatting it,
as per the instructions.

Created a new partition for / using all the available space, no
swap. (This left 98.3 kB FREE SPACE but I doubt that's important.)

Partitioning the disk failed with

 The ext3 file system creation in partition #1 of DASD 0.0.0120 (ECKD) failed.

Looking at /var/log/syslog from a separate shell:

Dec  3 07:12:14 partman: mke2fs 1.41.12 (17-May-2010)
Dec  3 07:12:14 partman: Could not stat /dev/dasda1 --- No such file or 
directory
Dec  3 07:12:14 partman: 
Dec  3 07:12:14 partman: The device apparently does not exist; did you specify 
it correctly?

Indeed, /dev/dasda1 is not present. However, the partition has apparently
been created:

~ # fdasd -p /dev/dasda
reading volume label ..: VOL1
reading vtoc ..: ok


Disk /dev/dasda: 
  cylinders : 3339
  tracks per cylinder ..: 15
  blocks per track .: 12
  bytes per block ..: 4096
  volume label .: VOL1
  volume serial : LIN120
  max partitions ...: 3

 --- tracks ---
   Device  start  end   length   Id  System
  /dev/dasda1  250082500811  Linux native
   50083500842   unused

There seems to be no way to proceed. I haven't found any combination of
formatting and partitioning that works.

This is fully reproducible. I've also tried the Squeeze beta 1 installer
with similar results.

The hercules version is 3.07-2.
-- 

Hercules configuration follows:

CPUSERIAL 69# CPU serial number
CPUMODEL  9672  # CPU model number
MAINSIZE  1024  # Main storage size in megabytes
XPNDSIZE  0 # Expanded storage size in megabytes
CNSLPORT  3270  # TCP port number to which consoles connect
NUMCPU2 # Number of CPUs
LOADPARM  0120  # IPL parameter
OSTAILOR  LINUX # OS tailoring
PANRATE   SLOW  # Panel refresh rate (SLOW, FAST)
ARCHMODE  ESAME # Architecture mode ESA/390 or ESAME

# .---Device number
# | .-Device type
# | |   .-File name and parameters
# | |   |
# V V   V
#---

# console
001F3270

# terminal
00093215

# reader
000C3505./rdr/kernel.debian ./rdr/parmfile.debian ./rdr/initrd.debian 
autopad eof

# printer
000E1403./prt/print00e.txt crlf

# dasd
01203390./dasd/3390.LINUX.0120
# 01213390./dasd/3390.LINUX.0121

# tape
05813420

# network   s390 realbox
0A00,0A01  CTCI -n /dev/net/tun -t 1500 10.1.1.2 10.1.1.1


Full /var/log/syslog:

Dec  3 06:57:47 syslogd started: BusyBox v1.17.1
Dec  3 06:57:47 kernel: klogd started: BusyBox v1.17.1 (Debian 1:1.17.1-8)
Dec  3 06:57:47 kernel: [0.00] Initializing cgroup subsys cpuset
Dec  3 06:57:47 kernel: [0.00] Initializing cgroup subsys cpu
Dec  3 06:57:47 kernel: [0.00] Linux version 2.6.32-5-s390x (Debian 
2.6.32-27) (m...@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sat 
Oct 30 22:05:50 UTC 2010
Dec  3 06:57:47 kernel: [0.00] setup: Linux is running natively in 
64-bit mode
Dec  3 06:57:47 kernel: [0.00] cpu: The CPU configuration topology of 
the machine is: 0 0 0 0 0 2 / 1
Dec  3 06:57:47 kernel: [0.00] Zone PFN ranges:
Dec  3 06:57:47 kernel: [0.00]   DMA  0x -> 0x0008
Dec  3 06:57:47 kernel: [0.00]   Normal   0x0008 -> 0x0008
Dec  3 06:57:47 kernel: [0.00] Movable zone start PFN for each node
Dec  3 06:57:47 kernel: [0.00] early_node_map[1] active PFN ranges
Dec  3 06:57:47 kernel: [0.00] 0: 0x -> 0x0004
Dec  3 06:57:47 kernel: