Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Install Linux from a running Windows system, without need for a live USB (github.com/mikeslattery)
195 points by reader_1000 on June 13, 2020 | hide | past | favorite | 66 comments


The project description ("Install Linux over or alongside an existing Windows install, straight from Windows, without requiring to boot from external media like a flash drive or making BIOS configuration changes") reminded me of the old BeOS 5 Personal Edition installer which "installs from within Windows without partitioning" and "kicks Windows out of memory and boots BeOS in its place."[1]

In the same review, Scot went on to say: "I tested the Windows installer on several machines, and was amazed. Not only did everything work as advertised -- it worked better than I dreamed possible. BeOS has always been the easiest OS on the planet to install, bar none, but this is ridiculous. BeOS is up and running in five minutes or less, and everything is totally painless. Linux distributors should be taking notes." Sounds like someone did! ;-)

[1] https://birdhouse.org/beos/byte/13-beos_5/


Linux boots and installs over itself all the time.

It's interesting how linux kernel dumps work.

You actually have a linux in your linux, and when linux fails, linux takes over and can dump the linux address space so when linux gives up and boots linux, you can use linux to do an autopsy on itself. :)

Or, in other words, you allocate a reserved address space and load a linux#2 kernel in it. When you encounter a panic condition, the system can jump to linux#2 in the reserved address space. It will be non-corrupted and can dump the address space of linux#1 to disk (or a remote system) and reboot.

kexec is the basis for all this, and it can do a lot of other interesting stuff like upgrade in place.


> You actually have a linux in your linux

Yo dawg, I heard you like Linux...


I mean, that's pretty much exactly the joke that was made. Isn't it?



I miss Wubi! I played with it a lot when I was (much) younger.


Loadlin did something similar, but with msdos and linux: https://en.wikipedia.org/wiki/Loadlin


I did horrible things with a parallel-port ZIP drive. Had to start loadlin with the kernel parameters to load the appropriate module for it to continue booting...

Side note, running with your root filesystem on a ZIP disk is not performant.


And combined with UMSDOS (https://en.wikipedia.org/wiki/UMSDOS), which stored the Linux files as if they were normal files in the MS-DOS FAT partition, you could run Linux as if it was a normal MS-DOS program (except that you had to reboot to get back to DOS).


fuck ya I used to loadlin from win98, first thing I thought when I saw this post. I had some distro that didn't even need a real disk partition too, it just used a directory on the windows partition as it's root fs


I remember installing BeOS 5 PE this way. I think it installed using a loopback configuration. It really was the easiest OS install I have ever done. Even compared to the tools available today, BeOS 5 was like magic. 5 second boot times on a 200 MHz Pentium Laptop. Journalling filesystem. Fast and low-latency.

It's great to see Linux installs going this direction. The ease of install definitely made switching to BeOS simple back in the day.


I did it on a P2 233 from Windows 98. The ease of trying BeOS 5 got me thinking about going beyond the DOS/Windows ecosystem at home and eventually led to linux.

Plus BeOS 5 had both Hotline (https://en.wikipedia.org/wiki/Hotline_Communications) and IRC clients.


But where is the joy? The best part of installing linux on a windows machine is killing windows. Bypassing the normal boot process. Deleting the partitions. Pealing off those little windows stickers and seeing them on the trash heap is only reason anyone installs linux. I wish windows still came with installation CDs. I need more coasters.


I don't think Windows has "come with" installation CDs for a long time. But can't you still "buy" Windows discs? That's usually a better version of Windows anyway.


You don’t really need to anymore. Microsoft provides ISOs for consumer editions, and others editions are available through MSDN and Docker Hub from Microsoft directly.


i started with dual booting - and later without hesitation i delete all windows-related partitions and stickers in all work and family computers.

every minute spent on windows appears like time lost.


Gave me a chuckle. HN must not be in the mood for frivolity today :)


...and getting the license money back! Or not :(


When I bought an XPS 15 a few years back I hopped into their webchat and I complained I couldn't get it with Ububtu like the XPS 13 and wasn't happy I had to pay for Windows the support agent just took £120ish off the price.


I would like to do that, but Linux still has not mastered the arcane art of scrolling a webpage without tearing.


I guess adding one command to your autostart list is too much to ask these days :(


Which one?


"picom" or "compton" is all it takes


On modern hardware running fedora 30/31/32 i’ve yet to have any serious tearing issues like you describe. Either way if you’re not willing to tweak a few settings then mac would be your best bet.


Even with countless hours of customization and trying out different settings and digging around configuration files, my chromium did not manage to scroll without tearing (nvidia with nonfree drivers)

Don't blame the user. The experience is bad, and should be called out for it. Many things about linux just suck, and deserve to be called out. Dont defend shitty software, just because you like it and it 'just works for you', or because it is open source.


Man, I'm trying real hard to make my dad to use linux, I spent 3 hours last weekend formatting and setting up his computer with ubuntu, but developers are letting new users down.

He is familiar with chrome, so after the installation he downloaded chrome. At this point I was hoping that he would be able to just double click the .deb file and install with no hassle, but he couldn't. I don't know if was the package manager fault or google's... All I now is as long as people have to use the terminal to do basic things, windows users won't be able to make te switch.

Nice job though, we need more projects like this.


> double click the .deb file and install with no hassle

That sounds like a great way to finally introduce the concept of trojan-horse malware to the consumer Linux ecosystem.

You should almost never be installing a raw .deb, anyway, because packages form networks of requirements/versions/etc. It’s probably outdated, and might even be for the wrong version of the OS—or even for the wrong distro!

The proper GUI workflow, I think, would be for third-parties like Google to offer for download some sort of file representing just an apt PGP-code-signing-identity + source list; and then double-clicking it would open it in Software Center or the like to do the GUI equivalent of apt-add-repository: asking you if you want to trust $ORG and follow the http://org.example.com apt repo. You’d say yes, and then `apt update` would get triggered, and new packages would appear (hopefully highlighted as such) in the Software Center list.

I’m kind of surprised things don’t already work this way. I think it’s because—other than Chrome—there’s pretty much nothing consumers want to install on Linux that isn’t best installed from the distro’s first-party package repo. For Debian/Ubuntu at least, I can’t think of a single PPA or vendor apt host—other than Chrome’s—that solves a consumer (rather than developer/administrator) use-case.


What you have described basically is how you install Chrome and a lot of other commercially developed apps (e.g. MS Teams). At least it is in the RPM world and I thought it was for deb too.

You download the RPM and click it to 'execute' in your downloads. It opens in software Centre. That package sets up an extra repo and then installs the program you want from that repo.


and this is ine of the reasons linux is a dud as a desktop os. there is no 'malware' here. the guy went to the company's official site. downloaded their official installer. running that should now do the install and figure out whatever else it needs. like it does on windows.

yes, if you download and install malware that's bad. no one asked you to be the nanny -just di what you were asked.


You can download the official installer and install it.

That's just not what happens by default when you click on it, because that's not how you get 99% of software on Linux. So if you're doing it that way it's either because you know what you're doing, in which case you know what to do with the .deb, or you don't know what you're doing, in which case you ought not to be installing random binaries from the web.

All you have to do on Ubuntu is right click on it and choose "Open With Other Application" and then choose "Software Install". But that friction is intentional. It makes you pause and ask why that software isn't in the package manager. And then whether you really need a browser with a proprietary license and closed source components instead of using Firefox or installing Chromium, which is in the package manager.


chrome from chrome's website is not a random binary. it the official installer for the most-used browser, from one of the most known companies in the world. when i download an installer, and click on it, it should *gasp -install.

again, i know you're smart. i'm an engineer, and was a unix admin for 10 years. your type of thinking is focusing on details so much that you miss the whole simple point of what you're doing. windows doesn't have this problem.


That doesn'work in latest Ubuntu. You have to use dpkg from terminal


I just tried it in Ubuntu 20.04 and it worked. Software Install can open a .deb, it's just not associated with them by default to keep novices from shooting themselves in the foot.


When I tried a couple weeks ago it didn't.


There still places without internet access.

My team still need offline installer.


Apt can handle offline installers. It's one of the core parts of the product. If you need to customise it, then the guides around setting up a "DVD repository" will put you on the right path.


Sorry, it is Windows that is lagging behind. As a Linux user I find myself insecure running applications from the web. Distribution maintained packages is the way to go. And package managers has GUI shells - last time I used it was Ubuntu Software Center [1] on Ubuntu 9.10. Looks like these days it is Ubuntu Snap [2].

Windows finally catching up with winget [3], already GUI shells by 3rd party developers [4], some day may be part of the installation. I do not know why it took so long, there is no Chrome both on Steam Store and Microsoft Store. Looks like Microsoft tried to bend developers [5], but what's with Valve?

Searching and downloading of installers, keeping them is such a crappy experience. On Linux is 1000% better.

[1] https://en.wikipedia.org/wiki/Ubuntu_Software_Center

[2] https://en.wikipedia.org/wiki/Snap_(package_manager)

[3] https://github.com/microsoft/winget-pkgs/tree/master/manifes...

[4] https://www.google.com/search?q=winget+GUI

[5] https://www.theverge.com/2017/12/19/16797358/microsoft-googl...


If it means anything, KDE allows you to click on a .deb and install it. I’ve had good luck with Kubuntu and ElementaryOS.


Couldn't you do this with WSL2 and saved yourself 3 hours?

It's the best of both worlds really.


Why not use the Ubuntu store?


> I was hoping that he would be able to just double click the .deb file and install with no hassle, but he couldn't. I don't know if was the package manager fault or google's

And yet people praise Android for "inventing" the app store and preventing people from [inadvertently] installing stuff from random website.


Debian has supported this for a while using a thing called "win32-loader":

https://deb.debian.org/debian/tools/win32-loader/stable/win3... (txt)

https://deb.debian.org/debian/tools/win32-loader/stable/win3... (exe)


It's been around since 13 years at least. I remember a website [1] that offered such installer.

[1] https://web.archive.org/web/20160523181321/http://goodbye-mi...


Win32-loader https://salsa.debian.org/installer-team/win32-loader can do this from Windows 9x up to Windows 7 and possibly later. The author of this may want to work with that project, which is well maintained as part of Debian. It might be a lifesaver for devices that can't read external USB at boot.


In a similar vein, wubi-uefi[0] is a fork of the original Wubi project, made to be compatible with newer versions of Ubuntu-based distros and newer versions of Windows. Upside is that it uses the built in Windows bootloader, so you don't have to rebuild it if you want to get rid of Linux. It's incompatible with Bitlocker though.

[0]: https://github.com/hakuna-m/wubiuefi


I remember loopback mounting always gave errors on shutdown when the file system was being unmounted. It seemed to me that it would unmount before caches were flushed, resulting in a need for fsck later (and possibly resulting in corruption or data loss). Do you know if there's been any attempt to address issues like these?


I wrote/donated the code for the original integration with the Windows bootloader for the non-Uefi version. It must have been almost ten years ago, it was even distributed on the official Ubuntu install cd. I didn’t know the project was still around.


+1 for wubi-uefi, really good there is a fork of the original version and it works perfectly. I just wish it was working with non-Ubuntu based distros


Has anyone tried it? I see the repo owner created an issue for success stories from users but it's empty.

If it works, it's very awesome!


The scariest Linux installation I'd ever done was by creating a Vitual Disk for an existing partition (you can map a disk to a virtual disk) on VirtualBox as a VMDK file, then mounting that as the root partition for a VM that booted from an SamuraiLinux ISO and installed it on the root partition. Very surprisingly, it worked without breaking anything.

[0]: https://askubuntu.com/a/47122/11736


Fun fact: you can do that for Windows too. It also works fine... assuming you can even boot it. :-) You need to make sure Windows is booting from something it sees as disk rather than a partition (i.e. include an MBR or something before it). The main caveat is preventing the host from mounting the volume, otherwise the guest can't write to it. But I've managed to do this (yes it's painful) and it's great.

Pro tip: You can even make an immutable disk representing your entire disk and then boot the very same OS that is running VirtualBox from it. It's an awesome way to test changes you want to make to your system that you're unsure about.


Windows can also boot from a VHDX directly, which is pretty nice. (having a VM both as a VM and a boot option)


Yeah, though one issue with that is that expanding or shrinking it is so much more painful.


That's a legitimate way to install Linux, and allows you to do your stuff on the machine in the meantime. One caveat is that the proper hardware won't be seen by Linux, however the kernel itself is generic anyway—only the userland setup will need to be adjusted.

What I'm really not sure about is how to install a bootloader in this approach. Dunno if Virtualbox can access the entire drive and specifically the boot sector. (IIRC I'd fire up a USB stick anyway for this finishing touch, though not having to fiddle with the Grub install almost makes it worthwhile to just use the full live installer in the first place.)


I used to dual boot Windows 7 and some Linux disro, and while in Windows 7 I could also run the same Linux distro in VirtualBox using the raw disk VMDK.


I've done the reverse recently - a machine that I had no direct access to hosed itself after a Windows update. A friend got to the machine with a modified Ubuntu image that loaded SSH on boot, I booted the Windows 10 installer through QEMU and reinstalled on to the physical drive.


The really scary version is when you use the entire system disk instead of just a partition.


This reminds me of a "Remote Install Party" I did some Debian versions ago. Basically the same, but on a computer in another contry: https://w4eg.de/code/rip/


A tangentially related, but cool AF project [1].

[1] https://en.wikipedia.org/wiki/Blue_Pill_%28software%29


So, there are no success stories so far?

https://github.com/mikeslattery/tunic/issues/12


Awesome, thank you. I am always looking for methods with the least friction to win people over to using Linux.


Wow, has anyone tried it? I really want it to work as expected. This could really help adoption.


This may become legendary.


Procedural UI written in PowerShell!


This reminds me of the old depenguinator.

http://www.daemonology.net/depenguinator/


Nice! Reminds me of when people used to call scraping Windows off a computer "defenestrating" it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: