Re: GEOM and moving to CURRENT from 7.1

From: Dimitry Andric <dimitry_at_andric.com>
Date: Fri, 16 Jan 2009 01:10:42 +0100
On 2009-01-15 20:55, Marcel Moolenaar wrote:
> Thanks *very* much for testing! It's important that we
> get the details right, so that we can consider adding
> code to help in the migration and fix whatever is broken.

In sysinstall, a standard installation writes the disks like so:

usr.sbin/sysinstall/install.c:  installStandard()
usr.sbin/sysinstall/install.c:  installCommit()
usr.sbin/sysinstall/install.c:  installInitial()
usr.sbin/sysinstall/label.c:    diskLabelCommit()
usr.sbin/sysinstall/disks.c:    diskPartitionWrite()
lib/libdisk/write_i386_disk.c:  Write_Disk()

It looks like Write_Disk() always writes a partition table:

int
Write_Disk(const struct disk *d1)
{
[...]
	struct dos_partition *dp,work[NDOSPART];

[...]
	for (c1 = d1->chunks->part; c1; c1 = c1->next) {
[... fills dp here ...]
	}

[...]
	memcpy(mbrblk + DOSPARTOFF, dp, sizeof *dp * NDOSPART);
	mbrblk[512-2] = 0x55;
	mbrblk[512-1] = 0xaa;
	write_block(fd, 0, mbrblk, d1->sector_size);
[...]
Received on Thu Jan 15 2009 - 23:10:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:40 UTC