Subject: Re: Moving system disk to a new machine...
To: Gilbert Fernandes <gilboooo@gmail.com>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: netbsd-users
Date: 07/10/2006 15:45:17
On 7/10/06, Gilbert Fernandes <gilboooo@gmail.com> wrote:
> >  Sounds a lot like what Linux provides in terms of terminals you can switch to with
> > Ctrl-Alt-1, Ctrl-Alt-2 ...  could come in quite handy.
>
> I never heard of that Linux you talk about.

I have (almost) forgotten about it...

>
> Screen is great. It makes you have a layer of virtualization over the console.
> It means you can lose connection and everything keeps running, and you
> can connect
> back to it. You can also share the console with a friend logued, so you can show
> someone how to configure something.

It's a *must* for anyone remotely administering a server.

>
> The attach/detach is kick ass. Screen lets you monitor consoles you are not
> keeping in front of you and do copy/paste on console too.
>
> The best is to have someone that uses screen all the time show you. A two
> minute demo will make you open your mouth, babble for some time and then
> with hands shaking install Gnu Screen from your pkgsrc.

I've attached the screenrc I use (obviously I haven't created it
myself - the comments show that). Put it in $HOME/.screenrc if you
wish to try.

When one logs first time on the server, say, with ssh, or locally from
the console, one just starts 'screen'.

^P1 ^P2 etc. switches between the visrtual consoles.

^P^D detaches from the screen session.

When one then logs to the server from a different place, one runs
'screen -R -DD' to get back to the session and finds the visrtual
consoles exactly at the point he has left them. There are also other
nifty things like logging, screensaver and such, but I haven't
bothered myself to try them - this is more than good enough.

(BTW the default character to control the session is ^A, but if one is
using the emacs shell editing key binding, it is not convenient, so it
has been changed to ^P in that resource file).

As far as the hard disk move to another machine, I do that all the
time - I had to change the laptop I use several times - due to it
being old and tired - so the disk went from one to another several
times. It never took me more than 5 minutes to sort out NetBSD
partition after the move - even with X in use and with different
network card (mv /etc/ifconfig.{old_iterface_name}
/etc/ifconfig.{new_interface_name} for the network, xf86cfg for X),
whereas I always had to reinstall Windows - I dual-boot the laptop.
Once even the disk started it's trip southwards, dump/restore was
enough to get everything running quickly enough (but not in five
minutes ^:).


>
> It will also make girls dig you and make your teeth more shiny but those
> are side-effects that are not as important as console virtualization and
> multiplexing.
>
> --
> unzip ; strip ; touch ; grep ; find ; finger ; mount ; fsck ; more ;
> yes ; fsck ; umount ; sleep
>