Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: installboot: Old BPB too big, use -f (may invalidate file system)
On 22 January 2015 at 14:12, Michael van Elst <mlelstv%serpens.de@localhost> wrote:
> andrew.cagney%gmail.com@localhost (Andrew Cagney) writes:
>
>>Ah, but the installer does know this. in fact I believe it:
>>- first formatted wd0a with ffsv2
>>- then tried to do the installboot on wd0a and failed
>>so if wd0a was set up wrong I'm already be deep in goop.
>
> newfs could clear that area of the bootblock when it is formatting
> the filesystem, but currently it does not touch the bootblock at all
> and you couldn't rule out that some other bootblock should be used
> that would be damaged.
True. But if that were the case I'd have chosen the "don't modify
this boot-block" option.
> The best method is probably to warn the user and let him decide.
Given a message telling me that -f will destroy my file system, I'm
likely make the wrong decision :-)
This is from arch/i386.c
* If the partition has a FAT (or NTFS) filesystem, then we must
* preserve the BIOS Parameter Block (BPB).
yet the -f code doesn't check the predicate (I suspect it doesn't have
enough context to exhaustively test it).
On the other hand, the installer does have the entire context:
- my partition is NetBSD
- wd0a within that partition contains ffs (new or existing)
so, I think it could apply -f
Andrew
Home |
Main Index |
Thread Index |
Old Index