I don’t have spare peripherals like a monitor and a keyboard. How do you suggest I do a bare-metal install of Debian on a computer (meant to be a server)?

  • notabot@lemm.ee
    link
    fedilink
    English
    arrow-up
    11
    ·
    6 months ago

    While I agree with most people here that finding a keyboard and screen would be the easiest option, you do have a couple of other options:

    • Use a preseed file A preseed lets the installer run completely automatically, without user intervention. Get it to install a basic system with SSH and take it from there. You’ll want to test the install in a VM, where you can see what’s going on before letting it run on the real server. More information here: https://wiki.debian.org/DebianInstaller/Preseed

    • Boot from a live image with SSH Take a look at https://wiki.debian.org/LiveCD in particular ‘Debian Live’. It looks like ssh is included, but you’d want to check the service comes up on boot. You can then SSH to the machine and install to the harddrive that way. Again, test on a VM until you know you have the image working, and know how to run the install, then write it to a USB key and boot the tsrget server from that.

    This all assumes the target server has USB or CD at the top of its boot order. If it doesn’t you’ll have to change that first, either with a keyboard and screen, or via a remote management interface sych as IPMI.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      I did look at Preseed and it’s probably a good idea if I’m doing many installs at once. I will still look at it but I’ll likely have to purchase a monitor anyway. It is unfortunate because I don’t have any thrift stores nearby

  • TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 months ago

    https://github.com/philpagel/debian-headless

    It is possible but I wouldn’t do it. Too much effort for too little result.

    Just plug your main monitor / keyboard into the server, run the setup and don’t install a DE. Afterwards login, enable SSH, unplug the monitor and do whatever you need over SSH.

    Let’s face it, you’ll have to do this procedure once every xyz years, there’s no point in complicating this stuff. Also depending on your motherboard you may or may not be able to boot into the installer without a screen / keyboard attached. Another option is to install the OS in another computer and the move the hard drive to the target server - this is all fine until you run into UEFI security or another detail and it doesn’t boot your OS.

      • catloaf@lemm.ee
        link
        fedilink
        English
        arrow-up
        8
        ·
        6 months ago

        You’re going to want a monitor and keyboard anyway. It’s going to be pretty hard to troubleshoot a boot issue in the future without them.

        • where_am_i@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          4
          ·
          6 months ago

          yep, a tiny boot error and suddenly you need to punch commands into initramfs. good luck with that headlessly.

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        6
        ·
        6 months ago

        I picked up a second hand monitor from a goodwill shop for like $7USD. It would be worth having a display of some sort for troubleshooting.

        • TCB13@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          Yeah at those price points it isn’t worth it at all to attempt a headless install.

      • hydrogen@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        Take out the hard drive out of your laptop and put the drive for the server in it, install Debian using the built in monitor and keyboard of your laptop.

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        edit-2
        6 months ago

        Well I see your problem, but you’re going to have a bad time without a screen. Maybe you can get something second hand / cheap or even ask a friend to borrow one for a few days?

  • NeoNachtwaechter@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    6 months ago

    Usually I want to see the BIOS settings at least once. So that’s enough reason to carry a keyboard + monitor there.

    Otherwise that network boot option with a TFTP server comes to my mind. But I have never tried it on a new, empty machine.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Wow that’s expensive. But thanks something to keep in mind. I’m planning to build my own $25 KVM with Chinese parts off of Aliexpress and PiKVM (if that’s possible)

  • changeableface@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    6 months ago

    I use a KVM over IP.

    I made my own tiny pilot device for less than £100 and it has worked flawlessly for a few years.

    This assumes your server has a hdmi output, if not you will need a VGA to hdmi or similar converter, danger of it becoming a bit of a hodge-podge of adapters, but hey, if it works, it works!

    • vividspecter@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      6 months ago

      There’s a bunch of other variants like PiKVM and BIiKVM as well. Even some cheap knockoffs on Aliexpress that may do the job.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      I’m planning to use a Raxda Zero 3W/Banana Pi Zero for this. Do you think this will suffice? I don’t need speed or power, it just needs to be usable.

      • changeableface@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        I’ve no experience with either of those devices. So long as they’re comparable in terms of USBC features (otg) to emulate the keyboard and mouse then you should be good as the overhead of running the software seems to be minimal from my usage.

        Without that, you’ll get video without keyboard and mouse support.

  • Deckweiss@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 months ago

    Not sure about debian, but the archlinux iso has ssh on per default, so if you have no other bootable drives in your server other than the usb with the iso, just fire it up and try to connect to it via ssh.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      Arch linux install wouldn’t be a problem really because the way the install is done. Pretty sure I could it all over SSH. Unfortunately, Debian isn’t exactly that…