3.8 snapshot bsd.rd installer clobbers MacOS partitions (or whatever is at sd0a ?)
Andrew Daugherity <[email protected]> Sat, 17 Sep 2005 23:17:26 -0500
| Newsgroups | gmane.os.openbsd.mac68k |
|---|---|
| Message-ID | <[email protected]> |
Summary: bsd.rd 3.8 snapshot installer overwrites the sd0a partition,
rather than asking which one to newfs/mount. Also, disklabel does not
see the partition created by pdisk.
Snapshot date / kernel revision: OpenBSD 3.8 (RAMDISK) #18: Sun Sep 4
12:38:54 EDT 2005
[email protected]:/usr/src/sys/arch/mac68k/compile/RAMDISK
Machine: Quadra 605, upgraded to real 68040, 36MB RAM, 1GB disk, Mac OS 7.6.1
Reproduce: Run the installer and watch it use sd0a (MacOS in my case)
instead of the partition created with pdisk.
Fix: patch the install script?
Details: After reading about the "video address hack" option in the
Booter program, I discovered that 3.7 does indeed boot on my Quadra
605; however, as has been reported by others, the ADB keyboard (Apple
Keyboard II) does not work with the RAMDISK kernel. I managed to rig
up a serial console with a Mac modem cable + DB25/DB9 adapter + the
DB9 null-modem cable I use on i386 boxen, and proceeded with the
install, figuring I'd see if the keyboard worked in GENERIC after
installing.
In the disk partitioning phase, I deleted the Linux and NetBSD
partitions that were on the disk (as neither one had enough space
allocated to be functional) and created a new OpenBSD partition in
their stead. The MacOS and NetBSD swap partitions were left alone.
The next step in the installer listed the "OpenBSD filesystems" as
"sd0a /", and asked if I wanted to proceed (the disklabel editor was
never invoked). Figuring sd0a was the partition I had just created
and the Mac partitions would be higher in the virtual disklabel, like
DOS partitions on i386 (big mistake on my part, apparently!), I said
YES, and did a double-take when it reported the size as 160MB instead
of the 800MB partition I had just created.
I suppose this is user error, but in my defense, I would like to point
out that (a) pdisk only listed partition numbers, not sd0a, etc.
names; (b) disklabel, which enumerates the partitions differently, was
never invoked; and (c) the installer never asked which partition I
wanted to format and mount -- it just picked sd0a and ran with it.
The INSTALL.mac68k file refers to disklabel editing (not deleting the
whole-disk sd0c partition, etc.), but the disklabel editor is NOT
invoked from the install script -- at least not in interactive mode.
I verified the network works (it does, despite INSTALL.mac68k claiming
LC-PDS ethernet cards don't work), and then dropped to a shell to
examine the disklabel output (which is different than the partition
map, not even showing my OpenBSD partition!). Complete serial console
log follows.
If this should be filed as a bug report, I will gladly do so.
Andrew
=======
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2005 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 3.8 (RAMDISK) #18: Sun Sep 4 12:38:54 EDT 2005
[email protected]:/usr/src/sys/arch/mac68k/compile/RAMDISK
Apple Macintosh Quadra 605, 68040 CPU+MMU+FPU, 4k on-chip physical I/D caches
real mem = 37748736 (36864K)
avail mem = 28762112 (28088K)
using 460 buffers containing 1884160 bytes (1840K) of memory
mrg: kernel has no ROM vectors for this machine!
adb: bus subsystem
mrg: skipping egret setup
adb: calling ADBReInit
adb: using Cuda series hardware support
adb: cleanup: nothing returned
adb: ADBReInit complete
adb: mapped device (8) at 2
adb: 100 dpi mouse at 3
mainbus0 (root)
obio0 at mainbus0
adb0 at obio0 (ADB event device)
intvid0 at obio0: DAFB: monitor sense 1
intvid0: 640 x 480, monochrome
grf0 at intvid0
ite at grf0 not configured
esp0 at obio0 (pseudo-DMA): NCR53C96, 16MHz, SCSI ID 7
scsibus0 at esp0: 8 targets
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST51080N, 0913> SCSI2 0/direct fixed
sd0: 1030MB, 4826 cyl, 4 head, 109 sec, 512 bytes/sec, 2109840 sec total
sd1 at scsibus0 targ 5 lun 0: <IOMEGA, ZIP 100 PLUS, J.66> SCSI2
0/direct removable
sd1: drive offline
zsc0 at obio0
zstty0 at zsc0 channel 0: console
zstty1 at zsc0 channel 1
nubus0 at mainbus0
ae0 at nubus0 slot e: address 00:00:94:6a:71:5c, type MacCon LC - A ,
32KB memory
rd0: fixed, 2880 blocks
rootdev=0xd00 rrootdev=0x1200 rawdev=0x1202
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? i
Welcome to the OpenBSD/mac68k 3.8 install program.
This program will help you install OpenBSD in a simple and rational way. At
any prompt except password prompts you can run a shell command by typing
'!foo', or escape to a shell by typing '!'. Default answers are shown in []'s
and are selected by pressing RETURN. At any time you can exit this program by
pressing Control-C and then RETURN, but quitting during an install can leave
your system in an inconsistent state.
Terminal type? [vt100]
IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this
program can cause SIGNIFICANT data loss.
It is often helpful to have the installation notes handy. For complex disk
configurations, relevant disk hardware manuals and a calculator are useful.
Proceed with install? [no] yes
Cool! Let's get to it.
You will now initialize the disk(s) that OpenBSD will use. To enable all
available security features you should configure the disk(s) to allow the
creation of separate filesystems for /, /tmp, /var, /usr, and /home.
Available disks are: sd0 sd1.
Which one is the root disk? (or 'done') [done] sd0
This disk has been setup under MacOS. You will now edit a MacOS partition
table. Be careful not to remove the MacOS partitions in use.
Edit /dev/sd0c -
Command (? for help): ?
Notes:
Base and length fields are blocks, which vary in size between media.
The base field can be <nth>p; i.e. use the base of the nth partition.
The length field can be a length followed by k, m, g or t to indicate
kilo, mega, giga, or tera bytes; also the length can be <nth>p; i.e. use
the length of the nth partition.
The name of a partition is descriptive text.
Commands are:
h help
p print the partition table
P (print ordered by base address)
i initialize partition map
s change size of partition map
c create new partition (standard OpenBSD type)
C (create with type also specified)
n (re)name a partition
d delete a partition
r reorder partition entry in map
t change a partition's type
w write the partition table
q quit editing (don't save changes)
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/sd0c'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 32 @ 64
3: Apple_HFS MacOS 327676 @ 96 (160.0M)
4: Apple_Unix_SVR2 NetBSD SWAP 137744 @ 327772 ( 67.3M)
5: Apple_UNIX_SVR2 Linux 619848 @ 465516 (302.7M)
6: Apple_Unix_SVR2 NetBSD Root & Usr 1024471 @ 1085364 (500.2M)
7: Apple_Free Extra 5 @ 2109835
Device block size=512, Number of Blocks=2109840 (1.0G)
DeviceType=0x1, DeviceId=0x1
Drivers-
1: @ 64 for 19, type=0x1
Command (? for help): d
Partition number: 5
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/sd0c'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 32 @ 64
3: Apple_HFS MacOS 327676 @ 96 (160.0M)
4: Apple_Unix_SVR2 NetBSD SWAP 137744 @ 327772 ( 67.3M)
5: Apple_Free Extra 619848 @ 465516 (302.7M)
6: Apple_Unix_SVR2 NetBSD Root & Usr 1024471 @ 1085364 (500.2M)
7: Apple_Free Extra 5 @ 2109835
Device block size=512, Number of Blocks=2109840 (1.0G)
DeviceType=0x1, DeviceId=0x1
Drivers-
1: @ 64 for 19, type=0x1
Command (? for help): d
Partition number: 6
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/sd0c'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 32 @ 64
3: Apple_HFS MacOS 327676 @ 96 (160.0M)
4: Apple_Unix_SVR2 NetBSD SWAP 137744 @ 327772 ( 67.3M)
5: Apple_Free Extra 1644324 @ 465516 (802.9M)
Device block size=512, Number of Blocks=2109840 (1.0G)
DeviceType=0x1, DeviceId=0x1
Drivers-
1: @ 64 for 19, type=0x1
Command (? for help): c
First block: 465516
Length in blocks: 1644300
Name of partition: OpenBSD
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/sd0c'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 32 @ 64
3: Apple_HFS MacOS 327676 @ 96 (160.0M)
4: Apple_Unix_SVR2 NetBSD SWAP 137744 @ 327772 ( 67.3M)
5: Apple_UNIX_SVR2 OpenBSD 1644300 @ 465516 (802.9M)
6: Apple_Free Extra 24 @ 2109816
Device block size=512, Number of Blocks=2109840 (1.0G)
DeviceType=0x1, DeviceId=0x1
Drivers-
1: @ 64 for 19, type=0x1
Command (? for help): w
Writing the map destroys what was there before. Is that okay? [n/y]: y
Command (? for help): q
Available disks are: sd1.
Which one do you wish to initialize? (or 'done') [done]
OpenBSD filesystems:
sd0a /
The next step *DESTROYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [no] y
/dev/rsd0a: 327676 sectors in 752 cylinders of 4 tracks, 109 sectors
160.0MB in 2 cyl groups (648 c/g, 137.95MB/g, 17664 i/g)
/dev/sd0a on /mnt type ffs (rw, asynchronous, local, ctime=Sun Sep 18
03:20:32 2005)
System hostname? (short form, e.g. 'foo') narsil
Configure the network? [yes]
Available interfaces are: ae0.
Which one do you wish to initialize? (or 'done') [ae0]
Symbolic (host) name for ae0? [narsil]
IPv4 address for ae0? (or 'none' or 'dhcp') dhcp
Issuing hostname-associated DHCP request for ae0.
DHCPDISCOVER on ae0 to 255.255.255.255 port 67 interval 2
DHCPOFFER from 172.17.17.254
DHCPREQUEST on ae0 to 255.255.255.255 port 67
DHCPACK from 172.17.17.254
bound to 172.17.17.105 -- renewal in 3600 seconds.
No more interfaces to initialize.
DNS domain name? (e.g. 'bar.com') [middle-earth.lan]
DNS nameserver? (IP address or 'none') [128.194.178.1 128.194.198.5]
Use the nameserver now? [yes]
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') [dhcp]
Edit hosts with ed? [no]
Do you want to do any manual network configuration? [no]
Password for root account? (will not echo)
Password for root account? (again)
Let's install the sets!
Location of sets? (disk ftp http nfs or 'done') [disk] nfs
Server IP address or hostname? 172.17.17.100
Filesystem on server to mount? /home/andrew
Use TCP transport? (requires TCP-capable NFS server) [no]
Pathname to the sets? (or 'done') [3.8/mac68k] Downloads/OpenBSD/3.8-beta-mac68k
The directory 'Downloads/OpenBSD/3.8-beta-mac68k' does not exist.
Pathname to the sets? (or 'done') [3.8/mac68k] Downloads/openbsd/3.8-beta-mac68k
Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-' to the set name, file name pattern or 'all'. Selected
sets are labelled '[x]'.
[X] bsd
[X] base38.tgz
[X] etc38.tgz
[X] misc38.tgz
[X] comp38.tgz
[X] man38.tgz
[X] game38.tgz
[ ] xbase38.tgz
[ ] xetc38.tgz
[ ] xshare38.tgz
[ ] xfont38.tgz
[ ] xserv38.tgz
Set name? (or 'done') [xbase38.tgz] !
Type 'exit' to return to install.
# mount
/dev/rd0a on / type ffs (local)
/dev/sd0a on /mnt type ffs (asynchronous, local)
172.17.17.100:/home/andrew on /mnt2 type nfs (read-only, v3, udp, timeo=60)
# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: ST51080N
flags:
bytes/sector: 512
sectors/track: 109
tracks/cylinder: 4
sectors/cylinder: 436
cylinders: 4826
total sectors: 2109840
rpm: 5376
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
5 partitions:
# size offset fstype [fsize bsize cpg]
a: 327676 96 HFS # Cyl 0*- 751*
b: 137744 327772 swap # Cyl 751*- 1067*
c: 2109840 0 unused 0 0 # Cyl 0 - 4839*
d: 24 2109816 unknown # Cyl 4839*- 4839*
e: 5 2109835 unknown # Cyl 4839*- 4839*
#