Fork me on GitHub
Vincent Cantin05:05:45

I wrote a joke difficult to understand about recursion on Twitter, but for some reasons I will not explain it

😏 8
🙌 4
👍 4

"Proficiency in at least two programming languages (Clojure doesn't count)." - I found this line in one of the job description on Indeed.

💀 16

works fine for me :P

parrot 12
😆 8

It seems like an odd exception to make for such a requirement.

Drew Verlee20:05:54

Clojurescript counts so your still good

😄 4

It’s just so gosh darn simple?

Drew Verlee17:05:53

Does anyone know a good place to get help with operating system level stuff? Paid or otherwise 🙂 I'm trying to fix my dual boot setup and i'm worried i'm past what i can saftly due following tutorials. In case your interested read on. Basically I want to dual boot such that windows is on hard drive SDA and ubuntu is on SDB. This was working before but i needed to install ubuntu 20.04 over my curropted version of 19.04. Fast fordward several failed attempts at this and this is what i get when i click on installation type "something else" where i can pick paritions: with dev/8 etc 4 at 500gb ubuntu (20.04LTS) and /dev/sdb5 swap size:15998, used:uknown. So ubuntu should be there, but it usually loads with issues (its all over the place). What's new and troubling is that dev/sda2 should be used: windows. That it's not implies i probably messed something up. In fact the main menu doesn't even list windows as being installed anymore. Ugh. i'm guessing ill have to rebuy a windows disk ( have no idea where mine went).


Something I don't know enough about: how uefi works across hard drives


I'd try and mount sda2. There's tools for extracting the serial from a drive.


Linux forums and all the other places you've ended up while debugging this are good forums btw.


I can try to help, since I have done dual boot setup many times in the past, with and without UEFI. DM?


I think you have both these things installed and you want to mess with GRUB the boot loader, nay? Have you tried a Knoppix CD ? Are you trying to partition things a'fresh or preserve data ?

Drew Verlee19:05:12

@U3ES97LAC It says there installed but picking either from the load results in an error. SDA => grub recovery ubuntu/SDB => an ubuntu that crashes when you try to login Well, it used to say windows was installed 🙂. Now it doesn't. I"m learning towards the "erase disk and install ubuntu option" i'll lose windows but at this point that might be for the best.


You don't need all those fat32 partitions on sdb if you are trying to use EFI to boot. I would delete all of those useless 500MB fat32/efi partitions on SDB, and then do a custom install.


If you don't care about the data on SDB, just wipe it and create three partitions, the EFI for boot, a / partition for system stuff, and a /home partition for the rest of the storage. Then make the EFI partition the one your boot loader is installed to. It should pick up your Windows install on its own.


Partition for Boot Loader Partition for Linux Swap Partition for Linux Partition for Windows Well you can "repair" your windows install if you can boot into it, and that will overwrite the boot loader with a new windows one. Then you got to do some GRUB surgery.


The fastest way is probably to cut it into 4 fresh slices accordingly and install windows first then linux ... i have not done this in years but i don't presume much has changed for a successful setup unless you just cut the chase and go VM like Parallels


@UAWHA5LKY it will notice the windows partition? nice.


There's no need imo. His windows looks untouched. Just format SDB and do the install manually instead of letting the installer do it for you. Manual partitioning is easy. Set 500MB aside for kernels in EFI, then say, 60-80GB for / (overkill), and all the rest of the storage for /home.


@U3ES97LAC yeah Grub is super smart. 🙂


The nice thing about Linux is that people respect you might be running multiple operating systems and try to detect them and list them as options in the boot loader. Windows is just rude and overwrites it, pretending like there is only one OS.


For future reference @U0DJ4T5U1, it's always best to do manual partitioning if you are going to overwrite an Ubuntu install. That way you just need to tell the installer about the existing partitions (here is my root, here is my home, here is my boot) and it can just format them and be on its way. If you let it do its own thing, its not too smart and will try to create boot partitions on its own like it did here. It makes zero assumptions about existing structure, and tries to be as non-destructive as possible.


Oh and the reason I create a / and a /home is that you can have your files and configuration left intact in home while you wipe only the root partition. It's very nice if the system gets corrupted somehow.

Drew Verlee20:05:09

@U013CA8A28J This has been vastly helpful. It seems the two specific things i need to do are: 1. repair the windows. The suggestion is that this involves grub surgery. I tried the instructions about setting the boot to the parition it found e.g set=boot(hd,msdos6) and ended up with an error about "pc-normal-mode-not-found". 2. Given i don't care about about anything on SDB it seems i need to setup the 3 paritions you specific • Boot : 500mb : EFI --- The boot disk refered to UEFI (thats why i mentioned it, i'm not sure what the difference is) • 60gb for / to save files and config (though maybe ill do less as i only have 500gb to play with • /home: rest for storage

Drew Verlee20:05:17

is repairing windows going to involve my windows boot loader disk that i got 4 years ago and can't find 🙂

Drew Verlee20:05:47

it also seems likely that i can do the "Erase disk and install ubuntu" option and then just select SDB.


What @U3ES97LAC was saying about repairing Windows is for starting all over and basically letting Windows control the boot process again, like it did before you installed Ubuntu. If you still want to use Ubuntu, you just need to fix grub as the bootloader. It will list both Ubuntu and Windows (because it autodetects Windows installations). I would use the advanced partitioning tool and create the partitioning setup that I suggested. It's easy. EFI/UEFI is interchangeable. It just means you are using UEFI as the bootloader rather than BIOS. Yeah 500MB is plenty for kernels. 60GB is excessive yes, you can use less. For reference, my well used / partition is only using 31GB, and that's with lots of big things like the Android SDK on it. Linux is very efficient with space. You could use 30/25GB instead and be fine. I'd recommend setting the filesystem to EXT4 for simplicity. That's the default for Ubuntu. You don't need a swap partition because Ubuntu uses swap files now (automatically takes what it needs from your main storage)

Drew Verlee22:05:49

@U013CA8A28J what does the space set aside for kernels do? The 500mb efi. In mysetup its set to /dev/sb1 and i understand i should set it as the "deivce for boot loader instructions" . In the tutorials i read over they didnt create it. I have even read that my selection for "device for boot loader installation" doesn't matter for a UEFI boot system > Case in point: With two disks, if you have prepared an EFI system partition on sdb and select that, it will still install the bootloader to sda if there is an EFI system partition there to use. I don't know what would happen if there was an EFI system partition on sdb but none on sda. Never had a chance to see.


@U0DJ4T5U1 That's where the bootloader (grub) is installed. No idea what tutorials you read, but it is mandatory to have a boot partition. Either on Windows or on Linux. It absolutely does matter. > I have even read that my selection for "device for boot loader installation" doesn't matter for a UEFI boot system That post is saying that if you already have a UEFI partition, then making a second one is pointless because the installer will use the existing one. The reason I say to create one is because it does not recognize any of your Windows partitions as EFI for some reason. You can try using SDA1 if you like, as it seems the appropriate size to be one. It won't hurt anything either way.

Drew Verlee16:05:52

what it mean that if i boot into the windows drive that i get dropped into grub recovery mode and none of the offered filesystems are known? I'm trying to understand the information from my system When i boot into the windows drive the bootloader for that hard drive should take over, Why is grub there at all? Does this imply i installed grub in SDA somehow? Shouldn't it be isolated to SDB?

Drew Verlee16:05:42

I think the boot repair suggestion is that GRUB manage all the disks. The alternative solution (that i had before) is that grub only exists on SDB with ubuntu and i use the bios to select the hardrives.


Well you can see based on the pastebin that you installed grub into the SDA MBR.


Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for /boot/grub.


The reason it goes into recovery mode is because when you do a new install while grub is already in MBR, you need to do this complex thing of chrooting into your Ubuntu install from a livecd and running "update-grub" to update the bootloader installation, letting it know where your grub.cfg file is, etc.

Drew Verlee17:05:12

So grub was installed on /dev/sda, then when i installed it again in /dev/sdb1 the location /dev/sda (1?) pointed to wasn't valid? So i have to tell it where the new location was? What about a reinstall where i just dont make an sdb1 and make change /dev/sda1 to efi and use it as the device for boot loader instructions?


What happened is you installed on /dev/sda, and then you blew away the Ubuntu installation that the boot loader in sda depended on. So to make it work like it used to, you would have to load up a livecd, chroot into your new Ubuntu install, and then reinstall the grub bootloader into sda, which has the effect of updating the bootloader about your new Ubuntu installation. I didn’t know that you did this originally, so now that I do, I recommend following the guide I posted about updating grub on your sda disk.

👍 4
eccentric J18:05:06

The more I use Clojure daily, the more I realize the little things: being able to comment out an entire form with #_ is incredibly convenient!

😮 8
👍 12

could you post an example?


instead of doing:

;; (defn long-fn
;;  ..
;;  ..
;;  )
you can just do:
#_(defn long-fn


or easily comment out k/v pairs by stacking 2 of these:

{:a 42
 #_#_:dont-need-this (do 
                   (println 42)
                   :multiline is also fine)
 :c true}

eccentric J22:05:55

Exactly! It’s been amazing when working on pipelines. I also didn’t even know about the #_#_ that’s even better.

Say there’s some kind of issue with one of those steps in the middle there. Instead of having to line comment out the last lines and manage the closing parenthesis I can just do:
The last two don’t get run, outer structure is still preserved and I’m good to test.


Hey y’all! I was hoping to talk to a community moderator for this slack. I’m interested in community building in open source projects. :) Anyone know who I should hit up?


Hey! 👋 what do you want to know?


I have a small vps where I'm running a clojure web server which is proxied to via nginx. I start the server with systemd like so:

ExecStart=/usr/bin/java -cp /srv/app/app.jar clojure.main -m app.server.server-entry
I'd like to deploy a new version of the app with no downtime, but things are tricky due to the long startup time. I'm thinking about a strategy where I start the new version of the app on a different port and wait until it is accepting http connections, then update the nginx vhost config to point at the new port and reload nginx. Finally, kill the process running the old version of the server. I'm stuck though, on also wanting systemd to manage this so I get process restarts on failure and easy logging to syslog. Any suggestions on how to go about this?


hmm, maybe some combination of ExecReload and ExecStartPost ..


I might make a template ( with the parameter to the template being the build version


So each version of your service is actually a distinct unit, and you have multiple versions running at once behind your lb


I think socket activation might also work for this in systemd


Thanks for the suggestions, I think the core of the solution is load balancing via nginx. I should be good to explore some options from here