Earlier quoted context omitted.
you can always connect an external screen and go from there
I can connect HDMI and can get into UBUNTU, but I cannot get into BIOS to tell it to boot from USB. If I could get that figured out- I think HDMI will activate on the boot of the ISO, but Im not sure. I even tried VGA to a monitor, but that dont show me bios either. Dont wake up till Ubuntu starts to boot.
Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
51–60 of 80 posts
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#52Earlier quoted context omitted.
You really only need two (kernel and initrd/initramfs), at least to get into a basic running state. This requires building your own initrd, of course, but it's pretty common in non-graphical Linux installers (Slackware's install media still does this, IIRC). I think it's even possible to embed the initrd in the kernel binary itself, but I've never really investigated that.
Yes, it's a fun exercise to build a tiny Linux install that's fully on the initrd. Not that you'd want to have that kind of system in daily use outside of special applications. > I think it's even possible to embed the initrd in the kernel binary itself, but I've never really investigated that. Yes, the kernel config has an option to embed the initrd in the kernel image. I'm not sure if there are any advantages to th…
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#53Pretty cool, although I'm pretty sure I would never use something like this. What has saved my skin on a number of occasions is the ability to boot remote servers into rescue mode and chroot into the broken system. That way you can use package managers, all your diagnostic tools, and everything else the boot image doesn't provide. Basically you just mount the different partitions and then chroot just swaps /proc /sys…
Haha yes, this is the default install procedure for Gentoo! :D
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#54If you have remote console access, a similar thing can be done for OpenBSD by dd(1)'ing a miniroot ramdisk install image.
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#55Earlier quoted context omitted.
I can connect HDMI and can get into UBUNTU, but I cannot get into BIOS to tell it to boot from USB. If I could get that figured out- I think HDMI will activate on the boot of the ISO, but Im not sure. I even tried VGA to a monitor, but that dont show me bios either. Dont wake up till Ubuntu starts to boot.
Can you physically disconnect the hard drive? Maybe you'll get lucky and USB will be next in the boot order. Contrary to popular belief, you can USUALLY plug the hard drive back in while the system is running from USB without any problems.
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#56Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#57Pretty cool, although I'm pretty sure I would never use something like this. What has saved my skin on a number of occasions is the ability to boot remote servers into rescue mode and chroot into the broken system. That way you can use package managers, all your diagnostic tools, and everything else the boot image doesn't provide. Basically you just mount the different partitions and then chroot just swaps /proc /sys…
I'm pretty sure hackers do. Lets face it how many people audit their systems IF they feel its secured?
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#58Earlier quoted context omitted.
Can you physically disconnect the hard drive? Maybe you'll get lucky and USB will be next in the boot order. Contrary to popular belief, you can USUALLY plug the hard drive back in while the system is running from USB without any problems.
oh. You may be onto something. I am pretty sure USB is boot option 2, but if not it would be my disc drive- but I can make that work too. It's a Lenova (maybe acer) laptop with some wierd tool it seems to open it up. I can try to figure it out though. I just want to use it as an inhome server so it dont need to look pretty.
If that doesn't work (kernel panic or whatever) you can disconnect the drive and connect it via a SATA-to-USB adapter in which case hot plugging should definitely work.
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#59Earlier quoted context omitted.
You can ditch the initrd if you compile in the kernel the drivers you need to boot the system, as a minimal example SATA/SCSI, EXT4/JFS, that usually are compiled as kernel modules.
This only works if you stick to a simple filesystem, not crypto, RAID, etc. Otherwise you'll need to have file system utilities (lvm2, mdadm, cryptsetup, zfsprogrs, etc) on the initrd to get your rootfs mounted.
It never crossed my mind that LVM and similar needs utilities to access the filesystem and to be honest, I thought initrd/initramfs contained only kernel modules, not executables and scripts... ^__^;
Re: Takeover.sh – Wipe and reinstall a running Linux system via SSH without reboot
#60Earlier quoted context omitted.
I recommend to copy a rescue disk iso image or/and network installation image to boot partition and add it to GRUB menu. This way it is possible to boot into working environment without risk to damage root partition. https://wiki.archlinux.org/index.php/Multiboot_USB_drive
That usually doesn't work for remote servers because you can't access the grub menu over SSH and you want something that works even in those cases that grub or your boot record are trashed. So you just want to do a netboot from a generic rescue iso. Zero dependencies. Works even when your hard drives are severely damaged and you just need to /bin/dd some raw sectors.
That reminds me of the time when some partitioning utility overwrote the first block of my filesystem and then set the filesystem start to the wrong block. I thought I was hosed, but I managed to use hexdump to find a backup superblock, calculate the correct filesystem offset from that, and dd the backup superblock into the primary location. I may be misremembering some details.