Migrating VMWare Gentoo to Linode

If any one can assist on this it would be greatly appreciated!

I have a VMWare gentoo installation on my machine at work. I would like to migrate it to my newly acquired Linode (thanks Chris!).

I followed the following steps but am now stumped -

1. I created a Linode with the existing gentoo distro.

2. Created a new disk image, changed config, and rebooted

3. Mounted the new disk image under /newdrive

4. started rsync –daemon

5. rsynced from my vmware machine using the following command

vmware:/etc # rsync --verbose  --progress --stats --compress --rsh=/usr/bin/ssh --recursive --times --perms --links --delete --exclude "/boot" --exclude "*bak" --exclude "*~" --exclude "/proc" --exclude "/sys" --exclude "/dev" /* xx.xxx.xx:/newdrive

6. Copied /etc/fstab /newdrive/etc/fstab

7. Copied /boot /newdrive/boot

And now I am not sure what to do next. I presume I need to move the kernel and associated libaries over - how/where?

The alternative is ofcourse to rebuild the gentoo machine (with my USE settings), but again what I am not clear on is how to get Chris's kernels on the gentoo image I create, rather than thru the disto wizard.

Any ideas?

Thanks

Ro

10 Replies

Linode Staff

I think all that's left for you to do is grab my /etc/inittab and /etc/securetty files, and then reboot using your new disk image in a config profile as the boot drive. I can't think of much else I changed for Gentoo. Maybe the devfs config file, too, unless it already has the /dev/ubd/ entries.

The actual UML kernel resides on the host, so you don't have to worry about having a kernel installed in your filesystem.

-Chris

Would it be this easy to install a new "test" OS in vmware using debian?

Thanks got a login prompt! but am getting the following warnings/errors:

Partition check:

hda: unknown partition table

hdb: unknown partition table

Warning: unable to open an initial console.

Also, now how do I get gentoo to start all my default level services (init.d)

Thanks

Linode Staff

You can ignore the partiton messages. And you did use my /etc/inittab, correct? I'm not so sure you should see the warning about the console.

Also, if your VMWare Gentoo booted into the correct runlevel, so should it under UML.

-Chris

You specified –exclude "/dev" when you rsynced your installation across to the new partition, so where did your /dev come from?

If you haven't created / don't want to create all the necessary devices, you can cp -av the /dev from caker's distro to your partition.

Here's what I changed to get a Gentoo stage 1 install to run on a Linode:````
fremont etc # diff inittab inittab.orig
32,38c32,37
< c0:12345:respawn:/sbin/agetty 115200 tty0 linux
< #c1:12345:respawn:/sbin/agetty 38400 tty1 linux
< #c2:12345:respawn:/sbin/agetty 38400 tty2 linux
< #c3:12345:respawn:/sbin/agetty 38400 tty3 linux
< #c4:12345:respawn:/sbin/agetty 38400 tty4 linux
< #c5:12345:respawn:/sbin/agetty 38400 tty5 linux

< #c6:12345:respawn:/sbin/agetty 38400 tty6 linux

c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
fremont etc # diff securetty securetty.orig
1c1,26

< vc/0

/etc/securetty: list of terminals on which root is allowed to login.

See securetty(5) and login(1).

vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
vc/12
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
fremont etc #

````
As caker said, the kernel is supplied by the host, but you need to copy the config (which you can get from here if you are using caker's latest 2.4 kernel) to /usr/src/linux/.config so that Gentoo is aware of which kernel it is running under.

Ok, everything is working now, I had to remove hotplug etc from my runlevels.

I did copy /dev over from Chris's distro.

Couple of more questions:

1. What should I exclude safely and yet keep these in sync (using rsync) both from a backup perspective and a test/production type scenario. I am obviously going to exclude the files that I got from the distro + /dev + /proc + /etc/runlevels + /etc/init.d + /var/run + /var/log… What else? How about the /usr/lib files that are coming from the uml host?

2. Now that I have my Linode, what do I need to do to transfer my dns (www) from my isp over to here, what do I need to emerge, what registrations do I need to change?

Thanks for all the help so far!

@ramarnat:

How about the /usr/lib files that are coming from the uml host? I am currently using the /usr/lib that I built during my Gentoo stage 1 install. In the past, I have used the /usr/lib from caker's distro and emerge upgraded it without problems - except - be advised that linking glibc really bogs a Linode 64 down - I intend to use distcc next time.

@ramarnat:

2. Now that I have my Linode, what do I need to do to transfer my dns (www) from my isp over to here, what do I need to emerge, what registrations do I need to change? You need to emerge net-dns/bind and net-dns/bind-tools. Once you have bind running on your Linode, tell your domain registrar the address of your name server. Alternative solution: use ZoneEdit - it's free for up to five domains, gives you primary and backup nameservers and saves messing with bind.

click .. bookmarked :)

thanks a lot you guys

On a linode64 tinydns might be better suited. I switched from bind to tinydns because bind segfaulted regularly and was basically useless but I'm staying with tinydns because its memory footprint is really light and once understood (its configuration is nowhere like bind's one) I find it quite easier to maintain.

Also, some of you might be interested in this topic I started over on the Gentoo forums: http://forums.gentoo.org/viewtopic.php?t=246788

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct