GEOM and moving to CURRENT from 7.1
Dimitry Andric
dimitry at andric.com
Thu Jan 15 16:10:45 PST 2009
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);
[...]
More information about the freebsd-current
mailing list