EDIT EDIT EDIT: NOT ABANDONED AFTERALL. SEE: viewtopic.php?p=126276#p126276
Sometimes it is better to abandon an undertaking when results have proven to have major issues. That is the case with my tests of the method I introduced in this thread. I wrote the automating script and it worked for both FR/KL distros and Puppy Linux distro... BUT... In early tests I noticed a corrupted file... so I did an fsck of the underlying filesystem and hoped nothing to do with my experiment with qemu direct booting a frugal install distro... However, same issue occurred on testing boot of Puppy Linux frugal into qemu and I was forced to again fsck the underlying filesystem. Whilst the procedure definitely worked the host view of the filesystem clearly got messed up by qemu view of the same filesystem... Why that all resulted in corruption of the underlying system I have no idea, but, certainly for now, I will not be advising this method of booting into qemu and will not publish my script that makes it all very automatic and easy - last thing I want is some unsuspecting person to damage their system (despite already giving big DISCLAIMER in original post because I'd read of some possible issue without making much sense of the WHY)...
By all means experiment per the first post of this thread AT YOUR OWN RISK, but my experience suggests you will run into corrupt filesystem issues so BE WARNED. I don't myself intend taking this further for now, for these explained reasons. Pity really, but there it is... Sometime it is better to back down and abandon and so be it.
NOTE that I've left this post since others may wish to experiment and decide for themselves. But be warned, definitely caused corruption on my system (though fsck seems to have fixed everything back to okay for me).
ORIGINAL POST WAS:
I've tried to use qemu to boot a FR/KL distro directly from hard disk partition before but without success...
However, though I don't know the implications (danger of doing this), tonight I had success; at least with firstribit FR/KL_Fedora_LXQt I had created as a frugal install. I haven't tried, but expect same would work to directly qemu boot frugal install Puppy Linux using -append of Puppy boot arguments such as psubdir, and similarly with other frugal installed distros.
I did this in full install of Linux Mint, but imagine it would work with qemu in any distro (such as KLV-Airedale). I'm sure the following can be improved by qemu experts; I am really not proficient with it, but, as I say, I've tried options -kernel and -init and so on with qemu before, but got nowhere... till now. NOTE WELL that I ran the command from a terminal opened at the FR/KL_Fedora frugal install directory. The following worked as the attached image shows:
Code: Select all
qemu-system-x86_64 -enable-kvm -m 2G -vga cirrus -smp 2 -kernel vmlinuz -append "w_bootfrom=UUID=d355bb5d-de78-4189-9afd-3907fab409a3=/KL_Fedora w_changes=RAM0" -initrd initrd.gz -drive file=/dev/sda
Note that for the moment I'm using w_changes=RAM0 mode (i.e. no persistence); I have to experiment further to see if w_changes=RAM2 mode will work...
EDIT: well... wd_changes=RAM2 mode also 'seemed' to work (just used touch to create a few new files and on reboot they 'seemed' to be there, but some weird messages so for now I'd just recommend trying this with RAM0 mode, and even then at your own risk...:
EDIT2: Actually, it MAY be fine. I just realised I was checking the files from host system in below weirdness, and since under qemu control really the host probably hasn't a clue what's going on... (fine when checked on the qemu running FR/KL_Fedora system) I suspect RAM2 mode is also fine therefore, but don't blame me if not...
EDIT3: Per project abandoned note at top, I've decided this method is UNSAFE per the corrupt underlying filesystem I experienced during tests... tra la la - pity...
Code: Select all
# ls -al
ls: cannot access '.xsession-errors': Structure needs cleaning
ls: cannot access 'jnk11111111111': Bad message
ls: cannot access 'anyrubbish': Structure needs cleaning
Alternatively, instead of argument file=/dev/sda you can use: -hda /dev/sda
I've similarly quickly tried the same to boot normal KLV-Airedale frugal install using qemu, but for some reason I don't know yet, it didn't work.
I have also discovered that some firstribit creations won't boot like this in qemu because their final initrd.gz is currently too large... That could be fixed by trimming the initrd.gz using Tomas M code from Slax though; I will consider this matter further because I find this way of booting very useful compared to having to make frugal install onto a disk image or an iso.