Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Let's say that you're working on a strange machine with these limitations:

  • You don't have physical access at all. You get a serial console, and a network.
  • You get one of six Linux installs to work with, and
  • A network-booted Debian install that doesn't touch the HDs at all.

Given that, say that you want to install a new unixy OS on the machine. Linux, BSD, Solaris, whatever. How do you do it? In gentoo, you would just:

  1. Boot from recovery image,
  2. Partition and format the HD as needed,
  3. Mount the drive in /mnt/new (/mnt/new/boot, .../home, etc),
  4. untar the gentoo stage-3 into /mnt/new,
  5. chroot /mnt/new

At that point, you're in an effectively identical environment to what you would get booting off of the Gentoo CD and following the install instructions.

Arch Linux, IIRC, can do a similar game, though it isn't as happy about it.

So, how about your OS of choice? I'm not really interested in NetBSD or OpenBSD, but I'd love to hear it if they'll do it.

If you can come up with a way to get a Windows on here, you're a pervert, but I'll give you upvote points for it.

FM(W)S

(That's Frequently Made (Wrong) Suggestions)

"Netboot the installer for something"
That would work, but we're already netbooting the recovery disk. I don't have control over the server that does that, and I don't have anything that can win the BOOTP race.
"Tell the hosting company to drop in the CD of your choice"
That would be great, but their pricing model is based off of something I'll call "we don't touch your hardware". Also, they don't really like that I'm doing this, preferring that I run an OS that they backdoored installed for me.

Edit: I realized this really should be a community wiki, since there's no "right" answer. I upvoted everyone who gave me an answer, thanks!

share|improve this question

closed as not a real question by Mark Henderson Jan 15 '12 at 5:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

up vote 1 down vote accepted

I second debootstrap for debian based systems. I've used a similar tool in the past called rpmstrap which, as you'd expect, is the same concept for RPM based distros.

I can't however find it in Ubuntu, and it's not listed in the debian stable repo - oldstable/etch only: http://packages.debian.org/search?keywords=rpmstrap

As an alternative, there are a number of repositories of prebuilt VM or UML images, eg stacklet.com. With some care, you could dd or untar one of these to a partition. Once you've unpacked it, you can chroot into and use the distro's package management tools to finish it off.

share|improve this answer
    
I'm going to give you the answer, since it's the most comprehensive (including links). Thanks! –  Bill Weiss Aug 23 '09 at 17:25

I did something similar to this with OpenBSD last night (possibly the same thing, if we're thinking of a certain hosting company of french origin), using this. You can dd it to the hard disk from rescue mode, and then it boots an installer with ssh access. Although, it does require an OpenBSD machine elsewhere to compile, and if we are talking about the same company, the install won't boot unless you have a particularly small / (mine is 500MB. I know 5GB and greater won't work.).

share|improve this answer
    
Not the same company, at least unless I mistake their origin :) Still, looks interesting. I've got VMWare as the other machine. –  Bill Weiss Jul 9 '09 at 0:20

Debian (and probably Ubuntu) has a system called 'debootstrap' that will do what you want for those systems. There's a good basic article on it.

share|improve this answer
    
That's exactly what I was talking about for Debian. Thanks! –  Bill Weiss Jul 9 '09 at 17:34

Linux From Scratch. It's the whole idea of the system - you download and install Linux packages on your own, without any external installers, just an existing environment and a network connection.

I can't find the docs for this, but for some reason I thought that Slackware was also capable of doing something like this.

Worst-case scenario? Find and install packages for some virtual machine manager into your netbooted Debian install, create a new VM with the ISO of the installer disk as your CD-ROM drive and the actual target install disk as your VM's disk. Do the install, making sure to support both the VM hardware and actual hardware in the kernel/wherever else needed. Now just configure your bootloader of choice outside the VM as appropriate and reboot. Voila. (This may also work with Windows, if you install it as a generic PC rather than allowing it to do its hardware-specific thing. YMMV.)

share|improve this answer
    
Gentoo is like Linux From Scratch + automation :) That VM trick might be fun, though I bet getting the drivers right would be a bit tricky. –  Bill Weiss Jul 9 '09 at 17:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.