LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-21-2024, 09:15 AM   #1
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 382

Rep: Reputation: Disabled
Running Slackware from a partition inside Windows?


Dual boot laptop- Slackware & Windows...

99% of the time I'm running Slackware but everyso often, I run Windows (for games) so, I want dual boot.



When I boot into windows, is there a way to run Slackware (from the partition) inside Windows?

I'd like access to my files and applications.

UPDATE: After thinking about this, I guess what I'm looking for is a virtual machine (running ON windows) or WSL that will read/write to and actual Linux filesystem on a partition instead of a virtualised disk image.

UPDATE 2: I appreciate the responses and I'm not arguing with you but, let me explain better what I'm doing: I'm traveling and I AM taking my (Slackware) laptop. But, I'll be traveling for more than a month so, I would like access to my games. At home, I have ONE Windows machine and the only thing it has on it is games. I use Slackware for EVERYTHING and at home I just KVM Switch between machines. I don't want to carry two laptops so, I'll dual boot my one for the trip.

I don't want to run Windows in a VM because it kills the graphics and it kills what little performance I have.
But, when I'm traveling and in the middle of a game, I would like to just be able to pop open a windows window to access my Slackware (because I use that for everything). I will rarely be in windows but, when I am, it's nice to have access to everything else.

I do see that there's a trick of running Linux on windows in WSL and using a X-server to access it. BUT, I don't want to run a virtual disk, I would like to mount /dev/sda1 directly in the virtual Linux session and run from it.

Last edited by arfon; 05-21-2024 at 03:46 PM.
 
Old 05-21-2024, 09:28 AM   #2
bortolotto
Member
 
Registered: Nov 2019
Location: Brazil
Distribution: Slackware64-current
Posts: 33

Rep: Reputation: 11
Quote:
Originally Posted by arfon View Post
Dual boot laptop- Slackware & Windows...

99% of the time I'm running Slackware ...
In this case, I think, make more sense run (eventually) windows trought slackware. :-)
(but I think the reverse could also work)
In the past I did this by running a VBox and "raw" hard disk. Look manual at: Advanced Storage Configuration.
 
Old 05-21-2024, 10:07 AM   #3
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 382

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bortolotto View Post
In this case, I think, make more sense run (eventually) windows trought slackware.
I thought about that for 345 milliseconds...

At the 346 millisecond point, I thought about how 3D graphics would HATE being in a VM and how it would kill the machine speed for games.
 
Old 05-21-2024, 10:38 AM   #4
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,811

Rep: Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447
IIRC there used to be a way to run any (real) Linux from inside Windows but it was a mess and quickly disappeared. As of a few years ago MS introduced considerable Linux runtimes that sort of run a version of Linux within Windows. I strongly suspect this is consistent with the (verified) MS Directive - Adopt, Extend, Extinguish.

With just 2 operating systems it takes less than half a minute to reboot from one into the other, so what's the big deal? Furthermore, in 2024, very few games are Windows-Only so the need to reboot diminishes every year. In fact, verified by my own multiboot machines, my benchmarks even achieved by placing the games on an NTFS partition substantially favoring Windows performance, most games perform substantially better on Linux, even non-native Linux versions.

Every OpSys designed for the general public has to be setup to accommodate the lowest common denominator of hardware. Only *Nix operating systems allow for optimising all the way down to the metal for specific hardware performance - the kernel.

Simply put, if you are adept enough to run Slackware, you can optimize it's performance in ways that are impossible on Windows, so why continue to favor Windows? Why not run Windows in Linux instead of the reverse?
 
1 members found this post helpful.
Old 05-21-2024, 10:47 AM   #5
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,200

Rep: Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777
Quote:
Originally Posted by arfon View Post
I thought about that for 345 milliseconds...

At the 346 millisecond point, I thought about how 3D graphics would HATE being in a VM and how it would kill the machine speed for games.
If you had a second graphics adapter, you could install a Xen hypervisor and run both Windows and Slackware as domUs (virtual machines, in Xen-speak), passing the more powerful VGA through to Windows in a passthru configuration.

I'm afraid it's over a decade since I did this, so you'll have to do the legwork yourself, but I can't imagine it's more difficult now than it was. I used NetBSD as the base on which to install the Xen hypervisor, but you could use Alpine or Debian instead.

I believe this can also be done with KVM, but as usual with anything Linux-related, it's much more complicated. NetBSD and Xen was a breeze to set up and a pleasure to use.

In Xen parlance, the Xen hypervisor has control of the processor, memory and console ; the dom0 is a supervisor or controlling domain, which passes domU requests through to the hypervisor. You could use the dom0 for your daily work but it is a security risk, since it is a privileged domain. Then you install your Slackware domU and your Windows domU and whatever else, passing your more powerful graphics adapter through to Windows and using the weaker adapter for the console. Use your monitor's HDMI input for the dom0 and its DVI for the other. Use your monitor's control panel to switch between machines. With the exception of those domUs using the weaker graphics adapter, which you would connect to using VNC or something similar.

To simplify things I used one large partition on the base install, and I then created separate LVM Logical Volumes on this, one for each virtual machine. It made things easier when it came to naming disks in the domU configuration files.

edit : both Windows and Slackware were insanely fast under NetBSD Xen. I was also able to boot the Slackware domU on bare metal whenever I wanted. You just need to be careful how you set up booting if you want to do this.

Last edited by Gerard Lally; 05-21-2024 at 10:59 AM.
 
Old 05-21-2024, 10:58 AM   #6
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,200

Rep: Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777
Quote:
Originally Posted by enorbet View Post
IIRC there used to be a way to run any (real) Linux from inside Windows but it was a mess and quickly disappeared.
Still possible to run Q4OS in Windows, I believe. A nice distro for Windows refugees.
 
Old 05-21-2024, 12:12 PM   #7
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 382

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
With just 2 operating systems it takes less than half a minute to reboot from one into the other, so what's the big deal?
Because, logging out of a game... shutting down windows... starting Linux... doing whatever... then shutting down Linux... rebooting windows... logging into windows... reloading the game... logging into the game...

Is pretty painful compared to: Just opening a window and already have a Linux instance in it to do stuff.


Quote:
Originally Posted by enorbet View Post
Furthermore, in 2024, very few games are Windows-Only so the need to reboot diminishes every year.
The ones I play are 3D windows only. If I could get them to work under wine (or PlayOnLinux) I would.



Quote:
Originally Posted by enorbet View Post
Why not run Windows in Linux instead of the reverse?
3D graphics on virtualized windows [mostly] does not work.

Quote:
Originally Posted by Gerard Lally View Post
If you had a second graphics adapter, you could install a Xen hypervisor and run both Windows and Slackware as domUs (virtual machines, in Xen-speak), passing the more powerful VGA through to Windows in a passthru configuration.
You're pretty close to what I want but, it's a laptop (for travel) so adding graphics adapters and a external monitor isn't an option.



Quote:
Originally Posted by Gerard Lally View Post
IIRC there used to be a way to run any (real) Linux from inside Windows but it was a mess and quickly disappeared.
Windows Subsystem For Linux runs an actual Linux kernel. But, I specifically want Slackware and more specifically, I want my Slackware installation.

I rarely run windows but, when I do, I want to be able to pop into my Slackware install to do things and pop back out.

Last edited by arfon; 05-21-2024 at 01:00 PM.
 
Old 05-21-2024, 02:01 PM   #8
henca
Senior Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 1,013

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
It was many years since I ran qemu in Windows, but you should probably be able to give it access to your entire /dev/sda by giving the "image file" \.\PhysicalDrive0 in Windows.

However, I would only run qemu in snapshot mode to avoid that it writes to the same disk that might be in use by Windows.

Another thing to consider is networking. Regardless if you are using qemu in user mode networking or some kind of tun/tap networking (I don't know if that is possible on a Windows host) you should make sure that the emulated network card has the same mac address as the card configured as eth0 in Slackware. Otherwise, your emulated card will probably end up as eth1 in Slackware.

regards Henrik
 
Old 05-21-2024, 02:27 PM   #9
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware, Debian
Posts: 7,351

Rep: Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750
At the moment I'm dual booting Slackware and OpenBSD. In the past I ran OpenBSD in a VM. However, I learned there's no point in running one of the most secure operation systems in the World(OpenBSD) on an insecure virtual machine. The VM negates the security benefits of OpenBSD.
This may be something to consider when attempting to run Slackware within Windows. However, Theo himself has said that Microsoft has done a good job mitigating security bugs.
A dual boot is a pain when you need to reboot to get into Windows or Slackware, but, I think running Windows and Slackware on their own partitions will have better performance.
 
Old 05-21-2024, 03:47 PM   #10
lostintime
Member
 
Registered: Dec 2021
Posts: 209

Rep: Reputation: Disabled
Quote:
When I boot into windows, is there a way to run Slackware (from the partition) inside Windows?
I'd like access to my files and applications.
Yes, two ways.

One way is raw disk access.

Linux is more tolerable about this than Windows, because Linux does not get persnickety about the differences between physical and virtual hardware.

I have used raw disk access a few times. One significant caveat with sharing files through raw disk access is potential file corruption. Both operating systems cannot concurrently have real-time access to the same files. I've tested this with the expected results.

The alternative to raw disk access is a traditional VM. Slackware is good about this and I have several Slackware VMs running different releases.

One challenge with playing games is usually requiring a dedicated GPU.

VirtualBox is popular among desktop users, but does not support PCI pass-through. The sane option when using VirtualBox is boot into Windows and use Slackware as the secondary operating system in a VM.

There are two ways to share files between the operating systems:

* VirtualBox shared folders.
* Traditional network sharing (NFS/CIFS).

I have some Windows VMs. One uses shared folders and the others use bridged networking and traditional network sharing through the host Slackware Samba service. None at the moment use raw disk access.

There are other VM options such as KVM/QEMU.

Quote:
I thought about that for 345 milliseconds
"For an android, that is nearly an eternity."
 
1 members found this post helpful.
Old 05-23-2024, 06:50 AM   #11
walecha
Member
 
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 177

Rep: Reputation: 43
If you have two GPU then I suggest to go with slackware and then start qemu + gpu pass-through for windows vm. I've done it several times and the gpu performance was indeed almost native. Yes you still have to install windows in some qemu disk image and share your required windows partition from qemu via virtiofs.
Attached Thumbnails
Click image for larger version

Name:	qemu-libvirt-gpu-passthrough-003.png
Views:	7
Size:	42.5 KB
ID:	42892  

Last edited by walecha; 05-23-2024 at 07:04 AM. Reason: some screenshot
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sleep inside for loop inside while loop causing issues. TheOnlyQ Programming 13 12-19-2012 12:59 PM
LXer: The Devil Inside: Creative Threat Detection Inside the Firewall LXer Syndicated Linux News 0 05-24-2012 07:30 PM
Possible to have a VM inside a VM, inside a VM? Into eternity? linus72 Linux - Newbie 8 05-15-2009 07:20 AM
iptables inside client to inside host with outside DNS or IP - Help! linuxhelp2 Linux - Networking 1 10-15-2005 06:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration