NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Running NetBSD installer on VM to install on real disk [Was: NetBSD 9.3 UEFI...]



On Mon, 5 Dec 2022 at 12:48, Mayuresh <mayuresh%acm.org@localhost> wrote:
>
> On Sat, Dec 03, 2022 at 02:50:00PM +0100, Martin Husemann wrote:
> > I would not go via the VM detour, but instead:
>
> Just curious, what can go wrong this way.
>
I have installed OSs (Not NetBSD) using this method in the past,
giving the VM full access to the physical disk. however the disk
booted in the VM wasn't in use by the host. (Infact, as I was in
Windows there's no way to give the VM this low level access to the OSs
boot disk).

It does seem to be possible to boot QEMU off the host disk under Linux
(by pointing it at the block device rather than a partition), but you
could really set yourself up for problems. (Qemu writing to the wrong
bit of your disk may end badly. :D )

If you try I suspect you could get away with creating the parition in
linux first, and setting the partition type, so the NetBSD VM doesn't
have to update the partition table at all.

It's probably worth unmounting the /boot EFI partitoin in linux too,
just to be safe.

Oh, and run a 'sync' in linux too, just to be sure, it really does
like to cache writes. (I mean it's shouldn't cache writes to critical
file system things, but it's best to be sure).

You could then probably newfs the partition in the VM and manually
expand the base sets and bung on a kernel. (It's been a couple of
years since I installed NetBSD, but I assume nothing's changed that
would prevent this from working since?)

As others have said I'd then manually copy the necessary files to the
EFI partiton and setup whatever current bootloader you're using to
boot NetBSD.

Ian


Home | Main Index | Thread Index | Old Index