Top
Best
New

Posted by astralbijection 18 hours ago

curl > /dev/sda: How I made a Linux distro that runs wget | dd(astrid.tech)
137 points | 60 commentspage 2
dizhn 16 hours ago|
Reminded me of how to install Alpine linux (which isn't available) on Oracle cloud over an ubuntu install. It uses dd and has the advantage of having a console.

I had found it in a github gist when I used it but here's a similar blog post.

https://alextsang.net/articles/20191006-063049/index.html

mbana 16 hours ago||
Wait hold on, can you not simply just access the underlying volume/block device using an API? The VMs in OCI have a boot volume that is attached, so I reckon it's possible to "mount" this somehow and overwrite it with whatever data you want.
dizhn 16 hours ago||
I am not sure. Maybe it's a thing about not being able to download the iso (no network on the console?) or not having space for it or something. I wouldn't know about the API thing. I am not a cloud user.

Made me think though.

astralbijection 14 hours ago||
From what it sounds like, because you have a console and therefore aren't dependent on SSHD not getting overwritten, you can just dd the live running system here?
dizhn 13 hours ago||
Like I said in the other comment I am not really familiar with the various clouds. I self host. The console is a weird web based thing that isn't the same environment as your VMs (or their hypervisor). It's a barebones shell where you can mount your volumes and such, not actually boot or enter the vm. (Edit: This was incorrect) And if I remember correctly I probably did have to do some mounting there to create device files and such. I didn't really have much use for the console after that either. I will try to find the actual gist I followed.

Here's the gist I had used. It's really simple. https://gist.github.com/unixfox/05d661094e646947c4b303f19f9b...

Why would not have not done the dd bit on the console? I have no idea. Again possibly can't download the iso there?

klinch 13 hours ago||
Sounds cursed. But I'm not judging, given that I use nixos-anywhere[0] on an almost weekly basis.

[0] https://github.com/nix-community/nixos-anywhere

astralbijection 8 hours ago|
Does it make it more cursed that the distro was built off of NixOS Anywhere, and then it theseus shipped NixOS Anywhere out of it?
PunchyHamster 16 hours ago||
and we've gone full circle, back in the day you installed os on diskettes like that!
saidnooneever 14 hours ago|
please insert diskette 34...

now go back to diskette 2...

now please put diskette 15 again....

aa-jv 14 hours ago||
That was Windows. Linux floppy-based installs usually just got through the whole series and then asked for disk 1 prior to reboot ..
zoobab 13 hours ago||
I used netcat and dd via the network to clone machines that has the same HDD:

https://support.tools/dd-over-netcat-clone-drive-remote-back...

But I like the curl approach very much!

em3rgent0rdr 11 hours ago||
> "download a pre-prepared disk image directly to your disk"

Well not quite direct; the bits go through your RAM in between.

indigodaddy 11 hours ago||
NOC techs have been doing these tricks for tens of years
creantum 12 hours ago||
Just because you can doesn’t mean you should.
anshulbasia27 11 hours ago||
Happened with me as well
ma2kx 15 hours ago||
Why not just use netboot?
kotaKat 14 hours ago|
you may be in a restricted environment with no boot option selections, like on some VPS and dedi server providers.

i've seen similar techniques used to shove windows on "linux" VPS/dedis boxes by booting into rescue mode and then applying a raw Windows boot image that's preconfigured and rebooting back to the Windows install and hoping you stood the image up right.

good ol' days of getting Windows up on Kimsufi boxen.

megous 12 hours ago|
Instead of applying some sense to the problem, and using a solution that actually allows you to kill all running processes of the original distro at runtime, incl. getting rid of the original init process, to be able to pivot_root somewhere else amd umount the original system's filesystems and free the block device for re-installation, this ridiculous approach gets promoted to a front page, lol.
More comments...