Date: Tue, 10 Feb 1998 21:01:42 +1100 From: Bruce Evans <bde@zeta.org.au> To: freebsd-stable@FreeBSD.ORG, jjw@us.net Subject: Re: Question: BSDI unsliced disks w/ FBSD Message-ID: <199802101001.VAA00165@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>I'm trying to mount a SCSI disk from a good BSDI 1.1 system >on FreeBSD-2.2.6. The disk was unsliced, but it looks like >FreeBSD insists on applying the slice offsets from what it >thinks is an fdisk slice table, thus getting preposterous >sizes and offsets. The result is I can't mount the disk, >and I *really* don't want to loose what's on it. Apparently BSDI puts garbage (perhaps boot code) in the fdisk table, and puts 0xAA55 at the end of the MBR (the first sector on the disk) so that FreeBSD thinks that the table is "valid". >How can I convince FreeBSD that this is really a unsliced >disk? Details follow. Thanks in advance... Copy the MBR to a safe place (I use /var/backups/<drive>.mbr on the same drive as the MBR and back this up to tape and/or another drive), then edit the fdisk table using fdisk or otherwise (writing 0's over the whole boot sector is easiest; writing 0's over the last 2 bytes of the boot sector changes the least). dd if=/dev/rsd2 of=/var/backups/sd2.mbr # back this up dd if=/dev/zero of=/dev/rsd2 count=1 # make sure that no sub-devices on the drive are open disklabel sd2 # should work now if BSDI label is in sector 2 >Reading sd(4), it sounds like I could use DIOCSDINFO to jam in >a decent label, since I think I know what it is. Is there a >disklabel operation (or other program) that calls this, or should >I try to write one? As I said, I don't want to screw this disk... It won't work if the fdisk table is hosed, since the proposed label is checked for coherency with the corresponding fdisk table entry. There is no in-core-only fdisk table; the fdisk table is always read from the disk, so you need to change it on the disk. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802101001.VAA00165>