Subject: dd ext2 partition kernel panic
To: None <port-cobalt@netbsd.org>
From: Michael Williams <mw@softcentric.com>
List: port-cobalt
Date: 11/09/2000 12:19:22
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C04A47.4AAF26A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
While installing NetBSD on a Qube 2, I netbooted, then used fdisk to =
create the required ext2 boot partition on a virgin drive. (I also =
created an ffs partition as well.)
Because I don't have physical access to a Linux box, I thought that I =
would 'dd' the newly-created ext2 partition to a file, send that file to =
a Linux machine - use 'mkfs' there - and then send it back to the Qube =
and 'dd' the file back onto the ext2 boot partition.
However, upon attempting the initial 'dd' of the empty ext2 partition, =
the kernel panics and drops into the debugger.
As a workaround, I did a 'dd' from /dev/zero instead - but with a =
smaller size than that of the target partition - in order to get up and =
running... however, NetBSD won't mount the ext2 partition without =
noticing the descrepency.
Obviously, this is not a showstopper, because there's only =
'/boot/vmlinux.gz' there anyway, and the Qube boots up fine from the =
wrong-sized image, but I'd still like to know why my original plan =
didn't work (and why the kernel panic).
I suspect there are some size/boundary constraints on ext2 partitions of =
which I am unaware.
Here's the output from fdisk and disklabel:
# fdisk
NetBSD disklabel disk geometry:
cylinders: 6253 heads: 16 sectors/track: 63 (1008 sectors/cylinder)
BIOS disk geometry:
cylinders: 6253 heads: 16 sectors/track: 63 (1008 sectors/cylinder)
Partition table:
0: sysid 131 (Linux native)
start 63, size 10017 (4 MB), flag 0x0
beg: cylinder 0, head 1, sector 1
end: cylinder 9, head 15, sector 63
1: sysid 169 (NetBSD)
start 10080, size 6048000 (2953 MB), flag 0x0
beg: cylinder 10, head 0, sector 1
end: cylinder 889, head 15, sector 63
2: <UNUSED>
3: <UNUSED>
# disklabel wd0
# /dev/rwd0d:
type: ESDI
disk: ST33235A
label: system
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 6253
total sectors: 6303024
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 5544000 10080 4.2BSD 1024 8192 16 # (Cyl. 10 - =
5509)
b: 504000 5554080 swap # (Cyl. 5510 - =
6009)
c: 6048000 10080 unused 0 0 # (Cyl. 10 - =
6009)
d: 6303024 0 unused 0 0 # (Cyl. 0 - =
6252)
e: 10017 63 Linux Ext2 0 0 # (Cyl. 0*- =
9)
Here's the command that failed (and caused the kernel panic):
# dd if=3D/dev/wd0e of=3Dwd0e.img (also tried bs=3D1k and bs=3D512 with =
same bad result)
The kernel error is generated within getblock() [at block 16386]
Here are the commands that worked and allowed me to get up and running:
# dd if=3D/dev/zero of=3Dwd0e.img bs=3D1k count=3D4000
# mkfs -t ext2 wd0e.img (run on linux box)
# dd if=3Dwd0e.img of=3D/dev/wd0e
Of course, any advice would be very much appreciated...
As a side note, I should mention that NetBSD 1.5 ALPHA 2 has been =
rock-solid here. It is _such_ a pleasure after wrestling with Linux and =
the Cobalt web interface. Special thanks to Soren and everyone else who =
has contributed to this effort.
Mike Williams
------=_NextPart_000_0011_01C04A47.4AAF26A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>While installing NetBSD on a Qube =
2, I=20
netbooted, then used fdisk to create the required ext2 boot partition on =
a=20
virgin drive. (I also created an ffs partition as well.)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Because I don't have physical access to =
a Linux=20
box, I thought that I would 'dd' the newly-created ext2 partition =
to a=20
file, send that file to a Linux machine - use 'mkfs' there - and then =
send it=20
back to the Qube and 'dd' the file back onto the ext2 boot=20
partition.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>However, upon attempting the initial =
'dd' of the=20
empty ext2 partition, the kernel panics and drops into the=20
debugger.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>As a workaround, I did a 'dd' =
from=20
/dev/zero instead - but with a smaller size than that of the target =
partition -=20
in order to get up and running... however, NetBSD won't mount the =
ext2=20
partition without noticing the descrepency.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Obviously, this is not a showstopper, =
because=20
there's only '/boot/vmlinux.gz' there anyway, and the Qube boots up fine =
from=20
the wrong-sized image, but I'd still like to know why my original plan =
didn't=20
work (and why the kernel panic).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I suspect there are some=20
size/boundary constraints on ext2 partitions of which I am=20
unaware.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here's the output from fdisk and=20
disklabel:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># fdisk<BR>NetBSD disklabel disk=20
geometry:<BR>cylinders: 6253 heads: 16 sectors/track: 63 (1008=20
sectors/cylinder)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>BIOS disk geometry:<BR>cylinders: 6253 =
heads: 16=20
sectors/track: 63 (1008 sectors/cylinder)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Partition table:<BR>0: sysid 131 (Linux =
native)<BR> start 63, size 10017 (4 MB), flag=20
0x0<BR> beg:=20
cylinder 0, head 1, sector =20
1<BR> end: =
cylinder =20
9, head 15, sector 63<BR>1: sysid 169 =
(NetBSD)<BR> start=20
10080, size 6048000 (2953 MB), flag=20
0x0<BR> beg: =
cylinder 10,=20
head 0, sector =
1<BR> =20
end: cylinder 889, head 15, sector 63<BR>2: =
<UNUSED><BR>3:=20
<UNUSED><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </DIV></FONT>
<DIV><FONT face=3DArial size=3D2># disklabel wd0<BR># =
/dev/rwd0d:<BR>type:=20
ESDI<BR>disk: ST33235A<BR>label: system<BR>flags:<BR>bytes/sector:=20
512<BR>sectors/track: 63<BR>tracks/cylinder: 16<BR>sectors/cylinder:=20
1008<BR>cylinders: 6253<BR>total sectors: 6303024<BR>rpm: =
3600<BR>interleave:=20
1<BR>trackskew: 0<BR>cylinderskew: 0<BR>headswitch:=20
0 #=20
microseconds<BR>track-to-track seek: 0 # =
microseconds<BR>drivedata:=20
0</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>16=20
partitions:<BR># =
size =20
offset fstype [fsize =
bsize =20
cpg]<BR> a: 5544000 =
10080 =20
4.2BSD 1024 8192 =
16 =20
# (Cyl. 10 - 5509)<BR> b: 504000 =20
5554080 =20
swap &nb=
sp; =20
# (Cyl. 5510 - 6009)<BR> c: 6048000 =20
10080 =
unused =20
0 =
0 #=20
(Cyl. 10 - 6009)<BR> d: =20
6303024 =
0 =20
unused =
0 =20
0 # =
(Cyl. 0 -=20
6252)<BR> e: =
10017 =20
63 Linux Ext2 =20
0 =
0 #=20
(Cyl. 0*- 9)<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here's the command that failed (and =
caused the=20
kernel panic):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># dd if=3D/dev/wd0e of=3Dwd0e.img =
(also tried=20
bs=3D1k and bs=3D512 with same bad result)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The kernel error is generated within =
getblock() [at=20
block 16386]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here are the commands that worked =
and allowed=20
me to get up and running:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># dd if=3D/dev/zero of=3Dwd0e.img =
bs=3D1k=20
count=3D4000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2># mkfs -t ext2 wd0e.img (run on linux=20
box)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2># dd if=3Dwd0e.img =
of=3D/dev/wd0e</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Of course, any advice would be very =
much=20
appreciated...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>As a side note, I should mention that =
NetBSD 1.5=20
ALPHA 2 has been rock-solid here. It is _such_ a pleasure after =
wrestling=20
with Linux and the Cobalt web interface. Special thanks to Soren =
and=20
everyone else who has contributed to this effort.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Mike Williams</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </DIV></FONT></BODY></HTML>
------=_NextPart_000_0011_01C04A47.4AAF26A0--