11 ms·
A Look into CBL-Mariner, Microsoft’s Internal Linux Distribution
- PeterWhittaker 5y agoDoes Mariner include SELinux? If not, what major LSMs are supported? Thanks!
- l0b0 5y agoIt seems almost inevitable that Windows will eventually become a Linux distro. Microsoft could replace incredibly resilient cruft like NTFS with EXT4 or ZFS and the registry with human readable configuration files. On the other hand, they could replace Bash with PowerShell and hopefully pressure various orgs to adopt some sensible subset of configuration formats.
- zaptheimpaler 5y agoI love the idea of windows registry though, I hope it stays. With linux, i have to to poke around the file system or google "package X config location" and many programs have their own idiosyncratic rules around which config paths take precedence over others. Windows registry as implemented is not the best, but the idea of something like a central sqlite db for config is great.
- jeswin 5y agoCertainly not for me. Registry was one of the worst parts of the Windows experience for me; but I understand it can be subjective. With separate files, the ability to download and replace them individually is a big win. Also, I can use terminal tools on them which is great for automation.
- deleted 5y ago[deleted]
- dboreham 5y agoRegistry never made much sense on the local system: just use the filesystem. I assume there was once a plan to use it in a networked fashion. But Active Directory replaced it for that purpose.
- 0xbadcafebee 5y agoThe filesystem isn't inherently bad, but the lack of a standard config format, location, and APIs is quite terrible. There's no reason a thousand programs should have a thousand different ways to be configured, it's just a legacy of poor design with no standardization.
- marcodiego 5y agoActually there is a standard location for user settings: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html https://specifications.freedesktop.org/basedir-spec/basedir-... Dconf complements it: https://wiki.gnome.org/Projects/dconf https://wiki.gnome.org/Projects/dconf and dconf-editor is even similar to regedit. For system settings... that is a bit more complicated.
- tenebrisalietum 5y agoIt's not poor design because it wasn't really designed in the first place...because it didn't really need to be designed. There is a standard and it's minimal: - config files are text files - # indicates a comment Why standardize further when the types of programs that require config files run an extremely wide gamut? Types of programs can be as diverse as web servers, graphic editors, kernel modules, networking programs, etc. Each are vastly different. I don't need to wait for, worry about, or try to install an updated registry processor that knows about new object types. Better to build it into the program or rely on a library. Why change the entire system of configuration storage just for one new type of program? And text files are awesome for another reason: With the ability to comment config files you can understand any format - as well as include notes and conveniently have documentation where you need it. Also: You can't use git or other versioning to backup your registry keys and rollback to previous versions.
- Osiris 5y agoI'm not so sure. Windows driver model is vastly different than Linux. Linux drivers have to be compiled for every kernel release. Windows drivers that are more than a decade old can still be installed and work correctly.
- sudosysgen 5y agoDKMS and driver segmentation enables 10 year old drivers to mostly still work on Linux too.
- gsich 5y agoYes. Sometimes those old drivers can't be compiled with newer headers.
- sudosysgen 5y agoAnd sometimes old drivers won't work on Windows 10.
- marcodiego 5y agoLinux drivers can work for much longer than a decade once they reach mainline. Out of tree drivers are another story.
- yjftsjthsd-h 5y agoRight, but Windows drivers are (all?) out of tree and have been for decades; they'll never get every vendor to change that.
- marcodiego 5y agoAnd this story that windows drivers work forever is a rosy tinted view of the world. Many drivers (my ltc scanner) stopped working working from win9x to xp. I saw an USB projector driver break when a system was updated from win 7 to 8. The same device worked as a fb device out of the box on my rockpi4. And windows drivers are platfrom dependent, the same driver will nit work on 32/64 systems or arm/x86. Linux is entirely another world.
- an_opabinia 5y ago> replace Bash with PowerShell On the contrary I wish Windows shipped with busybox, so that it would be easier to run scripts with some bashisms portably.
- chasil 5y agoI've looked at the busybox source, and it appears to me that bash compatibility that is added to the Almquist shell is a very thin veneer, not much more than defining [[ as an alias for [ (test). If you're looking for arrays, you will be sorely disappointed AFAIK.
- osigurdson 5y agoAgree. Make Windows more Linux like where possible, not the other way around. Understand that most of us will never use Windows Server products but we will use Windows 10 if it works well enough as a development platform. Do away with the Teen Titans design aesthetic - carefully study what macOS is doing. Keep the fast, keep the low power consumption and keep the solidness however.
- 0x0EB0DA10 5y agoMicrosoft might chose Toybox for its zero clause BSD license over GPL.
- vxNsr 5y agoI know everyone here really likes Linux, but bash is kinda a joke compared to powershell when it comes to usability. Everything from the way piping works to function names, makes powershell easier for the beginner and memorability. The best way to figure out how to do something in bash is to google it and hope someone answered the question in SO. With powershell I just go to ms docs and scroll through the functions until I see the one function name that is self descriptive, and after a 2 min read of the docs I’m usually set. That’s not to say powershell is perfect but on the whole it’s a lot easier to find the thing you’re looking for, and you don’t usually have to wade through SO snark to do it.
- josephg 5y agoI understand a lot of the benefits of ZFS and Powershell. But whats wrong with NTFS? Can you talk a little about the relative strengths of NTFS vs EXT4?
- dboreham 5y agoNTFS is a more sophisticated files filesystem but it has a worse performance under certain workloads, specifically the workload underneath `yarn install`
- trevorishere 5y agoThat'll be due to the file system filter driver[s] (i.e. antivirus). This should impact most/all file systems where the file system filter driver supports said file system. Disable/remove the file system filter drivers and the performance issues largely disappear.
- marmaduke 5y agoOn current pro versions, you can’t really disable the live protection constantly, but you can add a permanent exclusion for your home folder or the whole drive. This should greatly speed up operations like that. Still a lot faster to do them inside a Docker container/volume on the same Windows host.
- munchbunny 5y agoAlso Docker and installing applications that have lots of small files. In general NTFS doesn’t do well with lots of small files because opening files is expensive compared to ext4 (dramatic oversimplification). This shows up in random places where very little actual file reading/writing is happening for each file, like yarn, docker, installing video games, etc.
- mdaniel 5y agoNTFS also has a 260 character path limit [0], which as the sibling comment says can really jam up node_modules and the current HEAD of the intellij-community repo which currently has some giant filename in a subdirectory of its repo I'm aware of their claim about using Group Policy to remove the limit but I've never used GP in order to know its sharp edges for my gaming computer 0: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file https://docs.microsoft.com/en-us/windows/win32/fileio/naming...
- 0xbadcafebee 5y agoHopefully not using the Linux kernel though. It changes too much, stuff gets dropped too often, it's buggy, it's insecure as hell, there no test framework. It releases features quickly, sure. But I kind of hate using it, both on my desktop and in production. Would rather BSD, but then you don't get features.
- GoOnThenDoTell 5y agoThey can use an LTS kernel, and I hear there is some work in the android world to give LTS kernels a stablish driver interface
- yjftsjthsd-h 5y ago> It changes too much, stuff gets dropped too often, Stable features that are visible from user space? That would be extremely surprising. > it's buggy, it's insecure as hell It's really not. It has bugs, even security bugs, but no more than any other modern kernel. > there no test framework. https://www.kernel.org/doc/html/latest/dev-tools/testing-overview.html https://www.kernel.org/doc/html/latest/dev-tools/testing-ove... plus assorted fuzzing and integration testing
- michrassena 5y agoI think it more likely that Microsoft continues the ABI-hosting of Linux like it is currently with WSL. It doesn't make sense for them to use third-party kernel when the one they have works well enough and supports a long legacy of hardware and software, and it's something they can maintain control over. If Microsoft feels competition from Linux, it makes more sense for them to allow hosting of Linux as a user-space application on their platform, rather than have a user migrate away.
- emteycz 5y agoDidn't they switch to hypervisor virtualization of Linux?
- smitty1e 5y agoAgreed. By the end of the decade, one expects Windows to be a desktop experience loke Apple's Aqua atop a Linix chassis, as the drift continues. Why put money into the kernel beside that of a Linux Foundation member?
- notRobot 5y agoHow is this licensed under MIT and not GPL if it's a distro built on existing Linux code that's GPL-ed?
- jdsully 5y agoThey can license their changes and userland as MIT. They would have to dual license any kernel changes with GPL though
- lights0123 5y agoThey're not distributing any GPL code, so their changes can be under any license, including proprietary. And if they were, they'd only need to license your changes under something GPL compatible (like MIT, as they've done)—no need to dual-license. Upstream Linux already includes many parts that weren't licensed as GPL, only something compatible.
- icegreentea2 5y agoAs indicated here (https://github.com/microsoft/CBL-Mariner/blob/1.0/LICENSES-AND-NOTICES/LICENSES-MAP.md https://github.com/microsoft/CBL-Mariner/blob/1.0/LICENSES-A...), the MIT license is for source code actually contained in the repo. The bulk of this repo are spec files which define dependencies and how to build/incoporate, and call out dependency licenses. The actual output of this build would still have all the proper GPL goodness intact.
- severino 5y agoCan't they just say the code was randomly generated by Copilot so copyright and stuff like that doesn't apply?
- goodpoint 5y agoGPL does not require that. E.g. you can develop closed source code that runs on top of the Linux kernel.
- directionless 5y agoIt's neat to see this! But somehow, an RPM based distro, that solely documents its instructions for Ubuntu feels very something.
- fartcannon 5y agoMicrosoft-y
- sendmarsh 5y agoLess talked about is CBL-D, a Deb packaging based Microsoft Debian distro that powers Azure Cloud Shell. https://rasmusg.net/2020/12/01/updates-to-cloud-shell-docker-image/ https://rasmusg.net/2020/12/01/updates-to-cloud-shell-docker...
- vermilingua 5y agoA MS dev writing a blog on building MS’ own distro of Linux on his _Macbook_ must have Ballmer sweating bullets.
- ThrowawayB7 5y agoBallmer was forced out of MS 8 years ago, doubt he cares. And anyway, IIRC, it would've been Sinofsky and co. trying to squash anything that threatened the Windows division's power.
- pjmlp 5y agoSinofsky and co. are also to blame for Longhorn sabotage of using .NET, and most likely trying to bring Midori stuff into Windows. Now Project Reunion, sorry Windows 11, is trying to fix the path started with Windows 8.
- dividedbyzero 5y agoLonghorn sabotage, Midori, Project Reunion? Could you give a bit more background for those of us like me who aren't up to date with Microsoft internal projects and politics?
- pjmlp 5y agoTo fully get where I am coming from, you have to go back to when .NET was released. .NET was supposed to be the great reunification of VB, C++ and COM runtimes, then also got a Java touch into the mix and .NET happenend (initially was known as Ext-VOS). https://docs.microsoft.com/en-gb/archive/blogs/dsyme/more-c-net-generics-research-project-history-the-msr-white-paper-from-mid-1999 https://docs.microsoft.com/en-gb/archive/blogs/dsyme/more-c-... Hence why CLR is just like WASM + GC if you prefer a modern comparisasion. If you go back into web archives, when Visual Studio.NET was released, it was going to be .NET everywhere, across the whole stack. However a big management mistake happened, .NET was part of DevTools business unit, while C++ was kept under WinDev, up until Satya started to change the culture, it has been pretty much WinDev vs DevTools. So Managed DirectX comes, eventually gets killed, XNA and Silverlight take over Windows Phone 7, get killed by WinRT and DirectXTK and so on. Going back to the originally statement, if you Google for why Longhorn did not work out, you will find many .NET blaming. https://hackernoon.com/what-really-happened-with-vista-4ca7ffb5a1a https://hackernoon.com/what-really-happened-with-vista-4ca7f... Yet Android, ChromeOS, Midori are examples of what happens when actually everyone works into the same direction bringing an OS into production. Joe Duffy does some remarks on his two talks, where he hints at why it was a failure to fight Windows culture "Systems Programming in C# " - https://www.infoq.com/presentations/csharp-systems-programming/ https://www.infoq.com/presentations/csharp-systems-programmi... "Safe Systems Software and the Future of Computing" - https://www.youtube.com/watch?v=CuD7SCqHB7k https://www.youtube.com/watch?v=CuD7SCqHB7k Note that for some time the Asian Bing nodes were actually running on top of Midori as production test. A big decision of Vista, was to replicate the .NET design using COM instead (hello WinDev), hence why all major modern Windows APIs are now COM based. Windows 8 doubled down on that by introducing WinRT, with AOT compiled .NET and C++/CX using COM as the future Windows runtime, this was a point of friction, as .NET Native isn't 100% compatible with regular .NET, and many C++ devs desliked C++/CX extensions (later C++/WinRT replaced C++/CX, but that is another story). So to sort out all the adoption chaos, Project Reunion was born, which is basically merging the COM improvments brought by WinRT and app sandbox into Win32, and forgeting the split ever happened. Even Reunion has had a couple of hicups, it started as XAML islands, it became eventually clear that that alone wouldn't do it, thus Project Reunion. https://blogs.windows.com/windowsdeveloper/2020/05/19/developing-for-all-1-billion-windows-10-devices-and-beyond/ https://blogs.windows.com/windowsdeveloper/2020/05/19/develo... And now a year later, it was renamed as Windows App SDK. https://blogs.windows.com/windowsdeveloper/2021/06/24/what-windows-11-means-for-developers/ https://blogs.windows.com/windowsdeveloper/2021/06/24/what-w... Note that many System C# features now live in C# 7 and later versions, and were also in the basis of C++ Core Guidelines. Also note an example of the internal competition with the pleothora of GUIs being done now, Forms, WPF, WinUI, MAUI, Blazor, React Native for Windows. Maybe if all divisions worked more together in Longhorn, the project would actually happened and Vista wouldn't have been needed, nor the strong emphasis on COM that it started.
- fouc 5y ago> Of course Mariner is open source and it has its own repo under Microsoft’s GirHub organization. I was hoping GirHub wasn't actually a typo, but a funny internal name.
- deleted 5y ago[deleted]