qemu-block
[Top][All Lists]
Advanced

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

Re: MBR plus emulated FAT


From: Csepp
Subject: Re: MBR plus emulated FAT
Date: Tue, 31 Jan 2023 22:35:23 +0100

Kevin Wolf <kwolf@redhat.com> writes:

> Am 27.01.2023 um 01:00 hat Csepp geschrieben:
>> Would it be possible to store the metadata for emulated FAT partitions
>> backed by host directories?  It would make installing Windows 98 much
>> more seamless, since it would be able to set the boot flag during
>> install. I have a 9front install that uses no block devices and gets its
>> root file system via a simple 9P server, I've found that extremely
>> useful, since it lets me back up or modify files directly from the host.
>> 
>> I don't have that much free time, but if it wouldn't be too difficult to
>> implement this and someone helped, I could try to do it myself.  But
>> honestly I would be super thankful if someone else implemented it
>> instead.
>
> Running a whole OS from a vvfat backend sounds quite adventurous...
> (Running anything on vvfat, especially in read-write mode, is a little
> adventurous because it's a clever, but not very supportable hack that
> has known bugs, but a whole OS is a step further.) I've only ever used
> it for transferring individual files.
>
> Of course, you also need to be careful with accessing the filesystem
> from the host and the guest at the same time - strictly speaking, once
> you change anything from the host, a running guest sees a broken disk
> than randomly changed and together with guest caches that could corrupt
> everything. So avoid that if you don't want to tempt fate.

Yeah, that only worked on 9front because it was designed to be network
transparent from day 1.

> Technically it should be possible to make writes to the boot sector etc.
> persistent, you just need a place to store them. I imagine an additional
> special file could do the trick. If you have it in the same directory,
> you would get collisions with files of the same name in the guest file
> system.
>
> So I suppose you would use an image file outside of the directory and
> configure it like -blockdev vvfat,dir=/tmp/foo/,mbr=/tmp/foo_mbr.img
> with a separate option specifying its path.
>
> I'm not sure if it would be better to override parts of the image with
> the actually correct data according to the generated file system.
>
> I doubt you'll find anyone to make this hack for you, but if you feel
> like it, it sounds like it should be possible.
>
> Kevin

Thanks, at least now I know it's somewhat feasible to implement it.
In the meantime I also tried running the software I want to use in Wine,
which didn't work completely, but we'll see if the bugs are annoying
enough to make me attempt this.
Or I'll swallow having a disk image for the OS and a separate virtual
FAT for everything else...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]