4k-sectors: installboot(8) wipes the disklabel(5)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

4k-sectors: installboot(8) wipes the disklabel(5)

David Vasek
Hello,

the new installboot(8) wipes the disk label on a 4k-byte/sector drive -
a valid disk label becomes binary zeros after
/usr/sbin/installboot -r /mnt sd4

To be more precise, the "boot sector" (the first 512 bytes) gets
installed, but the disk label (the next 512 bytes) is overwritten with
zeros.

OpenBSD 5.5-current (RAMDISK_CD) #48: Sun Apr 20 03:50:37 MDT 2014
     [hidden email]:/usr/src/sys/arch/i386/compile/RAMDISK_CD

Regards,
David

Reply | Threaded
Open this post in threaded view
|

Re: 4k-sectors: installboot(8) wipes the disklabel(5)

Chris Cappuccio
David Vasek [[hidden email]] wrote:

> Hello,
>
> the new installboot(8) wipes the disk label on a 4k-byte/sector drive - a
> valid disk label becomes binary zeros after
> /usr/sbin/installboot -r /mnt sd4
>
> To be more precise, the "boot sector" (the first 512 bytes) gets installed,
> but the disk label (the next 512 bytes) is overwritten with zeros.
>
> OpenBSD 5.5-current (RAMDISK_CD) #48: Sun Apr 20 03:50:37 MDT 2014
>     [hidden email]:/usr/src/sys/arch/i386/compile/RAMDISK_CD
>

Anyone who wants to reproduce these issues doesn't even need 4k hardware,
a disktab will suffice:

4k:\
        :se#4096:

vnconfig -t 4k vnd0 image.file

and flashrd can quickly produce (non-)bootable 4k images (www.nmedia.net/flashrd)
by: flashrd -l 500000 -b 4096