5 ms·
How to install Linux from a Windows installer
- bigstrat2003 3y agoGod, that's cursed. I love it. Thank you for that wonderful journey to a place no man was meant to go.
- landgenoot 3y agoCool! But I still can't browse the internet during the installation.
- arjvik 3y agoI also want to see: How to install Linux from Windows (a la Ubuntu’s long-discontinued WUBI)
- Rucadi 3y agoNow that Linux has a rather good NTFS support, it should be possible to just have a folder in C:\Linux with the plain rootfs in there without any kind of virtual disk.
- ogurechny 3y agoMake a partition, copy the kernel and base system of your choice there, copy GRUB to EFI partition, configure it to load that kernel, reboot. Because of lemmas [1] and [2], the problem is solved. [1]: Any Linux system can be turned into Arch/Gentoo. [2]: Arch/Gentoo can be turned into any Linux system. If you are not limited by RAM size and metered traffic, enabling or installing tiny PXE boot agent is even faster. Then you can load everything netboot.xyz offers, including regular installers.
- eythian 3y agoBack in my day we had UMSDOS and loved^Whated it! It let you have Linux file semantics (owners, permissions, etc) on top of the MS-DOS FAT filesystem, and so you could install Linux without its own partition right beside DOS. Then you'd use loadlin which would load the kernel into memory and run it, basically shoving DOS out of memory.
- stuaxo 3y agoAh, memories of buggering up Linux from DOS.
- ssl-3 3y agoSome of us here might remember the joys of using MS-DOS, Windows, Linux, and OS/2 Warp (with extended attributes) all from the same FAT16 filesystem. (And actually, that usually worked OK. They didn't fight. The filesystem shims, where necessary, weren't always the most reliable, but the operating systems themselves and the applications associated with them were generally pretty chill together.)
- ssl-3 3y agoRunning loadlin from MS-DOS was peak Linux usability, IMHO: There was a whole entire (simple, limited) operating system to work with (MS-DOS) to use for sorting out any issues with booting the "real" operating system, and that bootloader-OS worked well with the hardware, and was familiar to the people using it -- at that time. I used it for a long time (longer than most, I'm afraid). The method provided for systems that would [hopefully, and almost-alwaus] successfully boot MS-DOS, whereafter the boot environment was easy to manage and sort out so that a real operating system (Linux) could be loaded and run. Back then, given any working PC, it was trivial to make an MS-DOS boot floppy, and therefore it was also trivial to make a Linux system boot up with loadlin. After that, I used LILO for a time: LILO worked great if everything was in order, but it tended to fall down hard if things weren't just-so. And then: GRUB. I still hate GRUB. (I will probably always hate GRUB: It still has too much interdependence between boot and system environments. It has done an OK job at autocnfiguring itself for a couple of decades, but that interdependence remains, and things can get hairy on reboot when the autoconfig doesn't do the right thing for whatever reason. It all feels like it is too limited, and also too far-reaching -- concurrently.) tl;dr, I dearly miss the seemingly-simple concept of using a "real," common, minimal-ish operating system as a bootloader. I've been told that UEFI provides something similar to what MS-DOS and loadlin provided, but I haven't found a single utterance as to how that's actually supposed to work. Working within UEFI seems to be mostly a dark black box in common use, and the boot environment should never be a black box.)
- stuaxo 3y agoGreat stuff. I know OSX has a tool to automatically fix permissions, is there anything in Linux? If this installed + used a driver for btrfs or ext3 on the Windows side, I wonder it might be 99% of the way there (combined with however the permissions fix would work).
- supriyo-biswas 3y agoThere was also Wubi[1], which, while not exactly this (which is more about putting a Linux FS in a WIM) was a windows based installer for Ubuntu which would save your disk contents on the NTFS partition in a single file (much like swapfile.sys). [1] https://en.m.wikipedia.org/wiki/Wubi_(software) https://en.m.wikipedia.org/wiki/Wubi_(software)
- haunter 3y agoIt has a fork for UEFI systems but it's also not updated anymore. Though it still works more or less https://github.com/hakuna-m/wubiuefi https://github.com/hakuna-m/wubiuefi And 22.04 was an LTS release so still under support
- nolongerthere 3y agoThis is one of those things that you’re super happy it exists but you never want to find yourself in a situation that requires implementing it.
- delta_p_delta_x 3y ago> Step 1: Install Linux on an NTFS partition > This is formatted as NTFS, mounted at / using the ntfs3 partition type IIRC, the Paragon ntfs3 in-kernel driver is extremely fragile and hasn't been maintained properly since its merge. It's a mildly amusing novelty to see /usr, /bin, Program Files and Windows all in one root, but the novelty wears off real quick as the filesystem is just so brittle. The author discusses this as a caveat at the end of the post—glad it was at least mentioned.
- ingigauti 3y agoI really would like to be able to install Linux with Windows installer, just to make the switch easier. I wanted to switch on my laptop and gave up. I didn't have large enough USB stick, so it just became to complex Give me an Windows installer, and I'll switch today. Windows has really started to be slow in areas it shouldn't be, which translates to: it sucks
- lambdaba 3y agoYou can make a new partition and write the ISO there.
- ryukoposting 3y agoI think this may fall under the commenter's definition of "too complex." This kind of thing is normal for old heads, but I installed Linux on dozens of machines before I ever had to do manual anything. Just slap the iso onto a flash drive or DVD, and go. Nix broke the streak, and even that was just a matter of following instructions in their wiki.
- ingigauti 3y agobingo I have done my share setting up systems, I just don't have the patience I had when I was younger, put 2 hours into it. Gave up. There are new thing that I don't understand, need to learn that to understand. To much work. Just need to buy that usb stick
- sva_ 3y agoYou don't have any 1GB USB drive?
- petepete 3y agoConsidering you can pick up a 16GB one for £2.50 at a supermarket checkout I don't think it's really that much of a hurdle.
- mjg59 3y agoIf anyone wants to do this without relying on the EFI/boot/bootx64.efi fallback, I wrote https://github.com/endlessm/rufus/blob/master/endless/src/endless/UEFIBootSetup.cpp https://github.com/endlessm/rufus/blob/master/endless/src/en... a while back[1], which allows configuring the boot variables from under Windows. [1] which has since been improved by Endless, so linking to their repo
- Dibby053 3y agoThat's pretty cool, but what would really be useful is making Linux boot from a Microsoft-signed .efi. I don't see why it couldn't be done.
- malkocoglu 3y agoIMHO, This was done in case you want the installation of Linux to take much longer than needed :-)
- muhammadn 3y agoReminds me of monkey linux back then in the 90s that allows Linux to be used on a MS-DOS partition.
- nubinetwork 3y agoSome of the earliest versions of Linux would drop a file onto your fat32 partition and boot from that, and replaces the currently running version of Windows. No messing with bootloaders or partitions, as long as you had free space to run the whole thing, it just worked.
- UncleSlacky 3y agoZipslack springs to mind: https://en.wikipedia.org/wiki/ZipSlack https://en.wikipedia.org/wiki/ZipSlack
- FdbkHb 3y agoOr Topologilinux: https://topologi-linux.sourceforge.net/ https://topologi-linux.sourceforge.net/
- uyzstvqs 3y agoWhat would be more interesting is installing Windows from a Linux live boot environment. It could actually be very useful to have a custom open-source Windows installer like that, with customization options and repositories with community-made mods.
- zamadatix 3y agoThe windows install process is actually pretty hackable despite not being open source. It largely boils down to extracting an OS image archive into a partition and installing the boot loader in another, all of which can be directed manually via CLI from the install media (shift+F10 if you want to do it manually). So the modifications are more or less: Do you want to customize the partitions? Do you want to tweak/replace the bootloader? Do you want to extract a custom image? Do you want to modify the image after to customize the install?
- U1F984 3y agoThis is actually possible. There's Linux tools to extract the WIM files from a Windows installation iso. You have to create the appropriate partition setup (EFI partition with bootloader, NTFS partition with the extracted files), and for configuration of the bootloader I created https://github.com/U1F984/create_bcd/ https://github.com/U1F984/create_bcd/
- RulerOf 3y agoVery nice implementation of a BCD creator. And in a language I can read, heh. The only thing that's missing would be driver reflection. I always wanted to have a magic command to just reflect a driver from WinPE into an already-installed Windows, but that seemed to be handled directly by Windows Setup back when I looked at it. I think you can do it with DISM nowadays though. So just make a trip through a WinPE on the way to starting for the first time and everything would probably work fine. I would bet that FOG[1] probably handles all of this reliably already. Anyone wishing for a real devops-style workflow for Windows installation could also look at Glazier[2]. 1: https://fogproject.org/ https://fogproject.org/ 2: https://github.com/google/glazier https://github.com/google/glazier
- kotaKat 3y agoAbusing wimlib's pipable WIM format allowed me to build a Windows PE-based installer that deployed a WIM to a hard drive... from a tape drive attached via USB. I streamed the entire install from the tape right onto the hard drive and it... worked amusingly well. Anyone want a setup tape of Windows? ;)
- znpy 3y agoI didn't know there was so much available knowledge about windows installation. I wonder if it would be possible to do the opposite and boot a live linux system with a "better" windows installer ?
- tendstofortytwo 3y agoShould be pretty easy. Capture a WIM of a Windows EFI partition, then use wimlib-imagex to apply that and also the install.wim. I'm not sure if the Windows boot process requires the UEFI boot entry to be present or if they drop their efi file in the standard location... but if not, you should just be able to copy it there.
- hexmiles 3y agoI wonder if the WinPE step could also be used to rewrite the fstab file so that the partition layout isn't hardcoded
- tendstofortytwo 3y ago(author here) I did consider it, but you'd also have to modify the copy of the fstab in the initramfs in addition to the one in the root. Admittedly I didn't try very hard to make that happen, I just wanted something working for the bit. :P
- dudeWithAMood 3y agoCirca ~2013-2014 i don't remember ubuntu had a windows installer you'd downloand then reboot after installation, no usb drive needed. It's how my gf at the time, no wife, got her torrenting partition on her pc. Idk what happened but that's not a thing anymore :'(
- gcarvalho 3y agowubi? I remember using it ~2011.
- dudeWithAMood 3y agoI wanna say it was a little different? Super idiot-proofed for a windows user. Download a .exe from the ubuntu website, might've downloaded something after installation I don't remember, then click a few buttons and wait.
- beeboobaa3 3y agoI remember using this as well for my first foray into linux. Don't remember any details, beyond what you said though.
- belthesar 3y agoUbuntu provided a Windows installer to set it up, but it was indeed wubi under the hood.
- t067633 3y agoThis is the sort of masochism I must tip my hat to, but am not willing to torture myself with.
- yonatan8070 3y ago> This took me three days of headbanging, trial and error, giving up, retrying, and more, to figure out. > Windows cannot find the Microsoft Software License Terms. Make sure the installation sources are valid and restart the installation. Would it kill Microsoft to tell you what file the installer couldn't find so you could save several days worth of troubleshooting?
- asveikau 3y agoI used to work on that stuff (mostly focused on WIM file format). There's probably a file somewhere called setupact.log that gives you tons of detail on what goes wrong. They don't surface a lot of detailed errors to UI, but the logging is usually precise about what fails and why.
- yonatan8070 3y agoThe problem I have with that is that you need to know which log file to look into when an obscure error shows up. If you already know it, you can solve an issue easily, but if you don't, and the error doesn't tell you the details or where to find them, you'll find yourself banging your head against the wall for days. Instead of the (fairly useless) "Make sure the installation sources are valid and restart the installation", the error could have said "More information can be found in X:\...\setupact.log" which would have been more useful to a person technical enough to read it, and equally useless for the few non-technical users who will ever encounter this error. This applies to many errors that just tell you what failed with generic steps that might help instead of actual useful information.
- asveikau 3y agoCorrect, I won't defend all of that, some of these messages were irritatingly vague, and it doesn't tell you how to find the log. Though in fairness, I believe though the most common cause for an error in that path would be a problem with the installation media, and probably more likely to be checksum errors on an optical drive, or perhaps corruption on the machine capturing the WIM file, or even a bad drive on the target machine -- all of these are much more likely that than someone stuffing a Linux image onto installation media.. So I could see a message geared towards that. When I was responsible for the WIM code, I got pinged with a lot of noise from people all over Microsoft installing Windows onto bad disks. They usually thought they hit setup bugs.
- giantg2 3y agoOnly counts if you installed it on encrypted zfs...