News for hackers. Stuff that matters.
Re:Microsoft's Linux Kernel by gambiting on Saturday June 29, 2019 @12:09PM (#20313324)
So after a very long hiatus I have decided to try installing linux on a raspberry pi - and wow, the results were amazing. Using my decade-old knowledge of using fstab I added some drives to /etc/fstab and rebooted. Oooops. Raspbian would fail boot with a message "root account locked, couldn't open console".

Fantastic - so if any of the fstab entries are missing, the entire system effectively bricks itself. The only way to fix it was to remove the SD card, put it in another machine, and manually remove the offending entries from the fstab file. Fantastic. I Don't think I have ever managed to get windows to self-brick itself with something so simple.

Re:Microsoft's Linux Kernel by gorio on Saturday June 29, 2019 @01:42PM (#20313781)
I think you are being unfairly downvoted. On of the major downsides to Linux is that while you can, and often have to, tinker to make it work you can break it on many levels. Sometimes it's even hard to know if it is working properly, until you realize it doesn't. Many developers uses virtualization just for those reasons alone. It might even be a major upside to using WSL, if they do it well.
Re:Microsoft's Linux Kernel by smilliken on Saturday June 29, 2019 @01:48PM (#20313828)
Our tools are either too powerful or too weak. To each their own. I can cope with a tool that is too powerful, but I can't cope with a tool that is too weak.
Re:Microsoft's Linux Kernel by gorio on Saturday June 29, 2019 @03:55PM (#20314442)
I don't think that is the general problem. More so inconstancy. It's almost harder to quit vi then to delete your boot record. I am not sure many tools are even that powerful. Which often means you have to use many different ones, making it even more confusing. Linux lacks abstraction and makes you do things manually as root, it isn't very robust.
Re:Microsoft's Linux Kernel by ajford on Monday July 01, 2019 @04:24PM (#20329364)
I've had a windows update brick my laptop. It failed to complete an update, would roll back, reboot, then try again. Nothing I did fixed it. I spent almost a week with it in a boot loop, trying various fixes and such before giving up and reformatting. Put linux on it and added it to my pile of linux laptops.
Re:Microsoft's Linux Kernel by neop1x on Monday July 01, 2019 @04:46AM (#20323545)
You probably haven't tried changing windows partition and messing with Windows bootloader's registry file...
Re:Microsoft's Linux Kernel by ex3xu on Saturday June 29, 2019 @01:27PM (#20313703)
With great power comes great responsibility, I guess. I agree it would have been nice for Linux to come with a few more sanity checks by default, like maybe a warning flag for rm -rf /* and dd commands...
Re:Microsoft's Linux Kernel by dredmorbius on Sunday June 30, 2019 @05:30PM (#20320650)
Standard rm (coreutils) has included rootfs protections since at least 2012:

    --no-preserve-root
        do not treat '/' specially
    --preserve-root
        do not remove '/' (default)
https://manpages.debian.org/stretch/coreutils/rm.1.en.html

Mind that if your rm comes from elsewhere (say, Busybox), it may not have that protection.

Very careful use of rm as root is an excellent habit to cultivate.

As are backups.

Re:Microsoft's Linux Kernel by Dylan16807 on Monday July 01, 2019 @02:26AM (#20322904)
What about it? I don't think that does anything for "/*"
Re:Microsoft's Linux Kernel by ex3xu on Sunday June 30, 2019 @11:03PM (#20322151)
Interesting, I didn't know that and I stand corrected.
Re:Microsoft's Linux Kernel by gambiting on Saturday June 29, 2019 @01:57PM (#20313867)
I'm just more offended that the default behaviour on an extremely popular distro is failed boot = brick. You don't even get a basic command prompt to fix something, the default behavior is to lock everything down and forbid access, making it impossible to repair the machine from itself. Windows will reboot a few times and then automatically start in safe mode when this happens, you don't need to extract the drive to manually edit some text files before the system can boot again.
Re:Microsoft's Linux Kernel by rbanffy on Saturday June 29, 2019 @02:24PM (#20313990)
> I'm just more offended that the default behaviour on an extremely popular distro is failed boot = brick

If you can't properly start the OS, that's correct behavior. You don't want the OS to start writing things to /var when it can't mount the filesystem that should be mounted to /var.

In any case, the fix with an RPi is easy - pop out the microSD, mount it on the other computer and fix whatever is broken (which should be in the logs). If the RPi is the only computer, put a microSD with a plain install of the OS, mount the other microSD through an USB dongle and fix it the same way you'd do with a laptop.

Re:Microsoft's Linux Kernel by majewsky on Saturday June 29, 2019 @05:10PM (#20314799)
FWIW, you're using the word "brick" incorrectly. Bricking is when the only fix is to throw the device away and buy a new one, which clearly is not the case here.
Re:Microsoft's Linux Kernel by namibj on Sunday June 30, 2019 @06:20PM (#20320941)
Distinguish Hard Brick and Soft Brick.
Re:Microsoft's Linux Kernel by gambiting on Saturday June 29, 2019 @05:20PM (#20314846)
I don't think I am. I've been fixing hardware for years and any device that doesn't switch on is "bricked" - its utility has dropped down to zero, it has turned into a literal brick. Just because you can revive it through some arcane procedure doesn't make it any less bricked to the end user.
Re:Microsoft's Linux Kernel by majewsky on Saturday June 29, 2019 @06:04PM (#20315077)
Flashing a new OS onto the SD card is not "some arcane procedure" for the RPi's target audience.
Re:Microsoft's Linux Kernel by JudgeWapner on Sunday June 30, 2019 @04:14PM (#20320243)
you're getting downvoted, but as a 19-year Linux fanboi, I actually agree with you. If the system has booted at least once, then it knows how to successfully boot. i.e. it knows of a string of modules, kernel, initrd image, etc that worked. As you upgrade, the OS should have a courtesy feature where it doesn't simply delete these files (unless you do the equivalent of issue a "-rf" force command). For instance, we currently have (kernel, initrd, filesystem, and modules that exist on our fs). All we would need to make it (nearly) brick-proof is to add one more thing: fallback-rd that has all the previous shit that worked last time. This would save so many users' asses at hardly any cost since storage is so cheap these days.
Re:Microsoft's Linux Kernel by grumpydba on Sunday June 30, 2019 @04:50PM (#20320420)
Use a gui if you don't know your way around the shell. I'm pretty sure Debian provides one.
Re:Microsoft's Linux Kernel by gambiting on Sunday June 30, 2019 @05:18PM (#20320582)
I wanted to setup a headless Samba server - so after the reboot I didn't even have any way of knowing why the system wouldn't appear on the network anymore. I had to find the right HDMI adapter to see if the system even attempts to start as it was completely dead by all other indications.

And no, I'm sorry but I hate the argument of "you should have known better" - the system first and foremost shouldn't have defaults set up in such a way that not only the SSH server doesn't come up in case of an issue during boot, but the local console is entirely disabled for any access. That's a crazy default.

Re:Microsoft's Linux Kernel by pcollins123 on Monday July 01, 2019 @08:54PM (#20331172)
Check your video card chipset and call support :P