[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: initrd with sshd ?



e-bone <ebone@DotsAndLoops.net> writes:

> Hi, I am just curious if something like this is possible.
> 
> I essentially need a two part boot process.
> 
> I would like to have linux first boot to an initrd with a sshd running
> on it.
> Then, after connecting to this system over the network, I would like to
> have the boot process finish by doing a pivot_root/chroot to a new root
> partition.
> 
> I was thinking what I really need is like a linuxrc1 and a linuxrc2.
> The initrd would be a bare minimum system with a sshd running on it,
> which is started via linuxrc1.
> linuxrc2 would be the script I execute after connecting via ssh to do
> the pivot_root.
> 
> I'm not sure if there are any limitations on the size of ramdrives or
> not, but I have 512 GB of memory and this thing doesn't need to run on
> a floppy so space issues are not too important.

Wow, can you spare me 8GB of those?
 
> If anyone can point me to a good initrd "how-to" that would be great.
> Mainly I just want to get an idea if something like this is possible
> before investing a lot in it.

For this to work you would need the following:

1. cdrom or netboot capabilities (or a lot of floppies)
2. an ssh udeb
3. build an initrd with all the network modules and ssh. The net
install initrd is probably a good starting point.
4. add the d-i udebs to the cd or have a source for them on the net

This is very very similar to what S390 wants. Except that they might
make do with telnetd instead of sshd.

After you log in you should be able to just strat up main-menu and
load the remaining udebs to finish the installation.

MfG
        Goswin



Reply to: