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
79 } bootblock;
86 bootblock bootblock_from_disk;
87 bootblock bootloader_image;
114 nread = read(fd, &bootloader_image, sizeof(bootblock));
115 if(nread != sizeof(bootblock)) {
117 fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread);
121 /* Read in the bootblock from disk. */
122 nread = read(dev, &bootblock_from_disk, sizeof(bootblock));
123 if(nread != sizeof(bootblock)) {
124 perror("bootblock read");
125 fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread);
129 /* Swap the bootblock's disklabel into the bootloader */
132 /* Calculate the bootblock checksum */
141 if(write(dev, &bootloader_image, sizeof(bootblock)) != sizeof(bootblock)) {
142 perror("bootblock write");