installboot: allow installation into disk
Previously, installboot would require that the given target device is a partition. This is not strictly necessary: MINIX3 can also be installed (manually) into one or more primary partitions, requiring that the installboot target be the entire disk. With this patch, specifying a disk as target is now allowed, as long as the -f (force) option is given.
This commit is contained in:
@@ -245,13 +245,13 @@ main(int argc, char *argv[])
|
||||
mode = O_RDWR;
|
||||
}
|
||||
|
||||
if (minixfs3_is_minix_partition(params->filesystem)) {
|
||||
if (minixfs3_is_minix_partition(params)) {
|
||||
/* Old setups has just 1 sector for bootblock,
|
||||
* but bootxx_minixfs is ~8Kb, so we require new setups
|
||||
* to have 32 sectors before the first subpartition.
|
||||
* This prevents from overwriting FS on old setups.
|
||||
*/
|
||||
if (!minixfs3_has_bootblock_space(params->filesystem)) {
|
||||
if (!minixfs3_has_bootblock_space(params)) {
|
||||
err(1, "No space for bootxx, you should have 32 sectors"
|
||||
" before the first subpartition on %s",
|
||||
params->filesystem);
|
||||
|
||||
Reference in New Issue
Block a user