Debian within a Windows partition?

A few years ago, I remember that Ubuntu had a trick that allowed the distribution to be installed as one large file within a Windows partition. Does the same thing exist to install Debian?


Andrew Cater said...

I've just been running (semi-native) Ubuntu inside up to date Windows 10 Home - the Windows Subsystem for Linux works well for command line utilities.

I'm fairly sure that the installation on a Windows partition is still possible - http://goodbye-microsoft.com serves the win32-loader.exe https://en.wikipedia.org/wiki/Win32-loader

To be honest - I think I'd rather run Windows inside KVM and do it that way.

Unknown said...

Not just ubuntu...

An prehistoric machine in my garage runs PUPPY WARY (5.3); booting from fdd/cd (no grub on machine) which then loads the image from a file on a ntfs partition on hdd (ie. partition is a file within win-nt ntfs). As I recall KNOPPIX too (which I think of as debian!) could also do this; as I used knoppix on the machine until I had issues with sb-awe32/64 sound card (many deb versions ago) & wary was quickest/laziest fix.

(machine I think is pentium-II; maybe 384mb of ram... only used to to keep [text] logs (editor) & play mp3s; been too lazy to replace/update it; as it does its job. )

Unknown said...

It's possible. Theoretically you'd boot from Debian installed on LiveCD or USB Flash drive, mount the WindowsHDD, use dd to create a big file for the Debian install e.g. debian_drive, create another file to mount the debian_drive as a loopback e.g. debian_fs. Then either treat it a single partition, just mkfs.ext4, or use parted to create multiple partions and then format them (kpartx makes the loopback mounting easier). After which it (should) be just a case of chroot to begin the installation. GRUB should pickup the Windows install - the tricky part is mounting the file/partition as a loopback device on boot. GRUB can mount .iso files and boot from them, so I guess if you know the offsets you could mount and boot from the single file partition/s using GRUB.