Lines Matching refs:bootblock
1 /* This utility makes a bootblock suitable for the SRM console/miniloader */
6 * Where <device> is the name of the device to install the bootblock on,
7 * and <lxboot> is the name of a bootblock to merge in. This bootblock
80 } bootblock;
87 bootblock bootblock_from_disk;
88 bootblock bootloader_image;
115 nread = read(fd, &bootloader_image, sizeof(bootblock));
116 if(nread != sizeof(bootblock)) {
118 fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
122 /* Read in the bootblock from disk. */
123 nread = read(dev, &bootblock_from_disk, sizeof(bootblock));
124 if(nread != sizeof(bootblock)) {
125 perror("bootblock read");
126 fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
130 /* Swap the bootblock's disklabel into the bootloader */
133 /* Calculate the bootblock checksum */
142 if(write(dev, &bootloader_image, sizeof(bootblock)) != sizeof(bootblock)) {
143 perror("bootblock write");