Installing a gentoo server without removable media

UPDATE:

  1. Fixed a problem with chrooting into read only squashfs system
  2. Fixed a problem with resolving DNS names

I've rented recently a dedicated hosts. It's preinstalled OS was Fedora. I decided to install gentoo, as that's my preferred choice since few years now.

Because strange Orange policy – they are blocking Samba (Windows) shares to the outside world – I couldn't mount a Gentoo mini CD installation disk on the dedicated server.

I made several approaches to mount a USB floppy disk which nadn't have such requirements (it's enough to just upload an image to the remote control management software), but I failed for many reasons. Hal91 couldn't mount ext3 partitions, some other couldn't work from USB, no distro could recognize installed network card… fail after fail.

Meanwhile one idea came to my mind: „maybe it would be possible to extract CD ISO and mount it as a drive?“. Unfortunately I couldn't login as root into such prepared system, but it opened the door to another, cleaner solution. Instead of booting from the extracted CD I decided to chroot into it. The rest was eas – follow the Gentoo Handbook.

Here is how I did it step by step:

I needed some space. As there were all partitions used I decided to move all Fedora into one. I've copied all /var and /home (which were placed on other than ‚/‘ partition) to /xvar and /xhome, removed their entries in /etc/fstab, restarted server and switched it to single mode (easy with grub – just hit ‚e‘ to edit entries and change add word ‚single‘ on the end of the line calling the kernel). Then I removed empty /var and /home, renamed /xvar to /var, /xhome to /home and rebooted again. All Fedora was on one partition. The rest is free for my gentoo system.

To copy the /var and /home it's better to use --preserve parameter

cp -pr /var /xvar
cp -pr /home /xhome

after reboot to single mode:

rm -r /var /home
mv /xvar /var
mv /xhome /home

reboot again – should work fine.

I have gentoo minimal ISO image in the root's home directory.

mkdir mini
mount -t iso9660 -o loop install-x86-minimal-2006.1.iso mini

Inside the mini dir exists a file called image.squashfs. That's the real system installed on the CD. We have to copy it's content to the filesystem and umount loop filesystems.

mkdir squash_fs
mount -t squashfs -o loop mini/image.squashfs squash_fs
mkdir squash
cp -rp squash_fs/* squash/
umount squash_fs
umount mini
rm -r squash_fs
rm -r mini

Copy resolv.conf from Fedora to gentoo:

cp /etc/resolv.conf squash/etc/

Now there is a need to chroot into the copied system:

mount -t proc none squash/proc
mount -o bind /dev squash/dev
chroot squash
env-update.sh
source /etc/profile

Here we have a system almost the same as if we would boot from the CDROM burned from mini CD ISO image.

Go into your Gentoo Handbook written for you distribution (in my case x86 ) and follow the steps until Booting the Grub installation and/or configuration process begins.

Instead of following the steps from the handbook do the following:

Go out from the chrooted environment (Ctrl-D,Ctrl-D) and umount the disks:

umount squash/mnt/gentoo/proc/
umount squash/mnt/gentoo/dev/
umount squash/mnt/gentoo
umount squash/proc
umount squash/dev

Now edit Grub menu file:

vi /boot/grub/menu.lst

and add new entry for Gentoo:

title Gentoo
  root (hd0,1)
  kernel /boot/vmlinuz ro root=/dev/hda2

Reboot and be happy. Digg the story

Trackback URL for this post:

http://piotr.zalewa.info/trackback/20

Comments

nabiha (not verified) 1970, January 1 - 00:00

Nice effort, very informative, this will help me to complete my task. flowers delivery bulgaria|bulgaria flower delivery

Jordans shoes Online (not verified) 1970, January 1 - 00:00

Michael Jordan is not around and to support Michael Jordan in s coring and leading the team when Michael Jordan is around.The increasing popularity of MJ and the Constant dominance of the Chicago Bulls in the court, contributed greatly to the popularity of Scottie Pippen.

tom ford sunglasses (not verified) 1970, January 1 - 00:00

Hal91 couldn't mount ext3 partitions, some other couldn't work from USB, no distro could recognize installed network card

andreea (not verified) 1970, January 1 - 00:00

Because strange Orange policy – they are blocking Samba (Windows) shares to the outside world – I couldn't mount a Gentoo mini CD installation disk on the dedicated server.

I made several approaches to mount a USB floppy disk which nadn't have such requirements (it's enough to just upload an image to the remote control management software), but I failed for many reasons. Hal91 couldn't mount ext3 partitions, some other couldn't work from USB, no distro could recognize installed network card… fail after fail.

prada sunglasses (not verified) 1970, January 1 - 00:00

markup is pretty straight forward, where the h2 tag is a link that “trigger” the toggle effect.

reebok shoes women wide (not verified) 1970, January 1 - 00:00

I have to say, I dont know if its the clashing colours or the bad grammar, but this blog is hideous! I mean,
I dont want to sound like a know-it-all or anything, but could you have possibly put a little bit more effort into this subject. Its really interesting, but you dont represent it well at all, man. http://www.rbksho­es4u.com/…hoes_7_1­.htm

reebok zigtech review (not verified) 1970, January 1 - 00:00

I have to say, I dont know if its the clashing colours or the bad grammar, but this blog is hideous! I mean,
I dont want to sound like a know-it-all or anything, but could you have possibly put a little bit more effort into this subject. Its really interesting, but you dont represent it well at all, man. http://www.rbksho­es4u.com/…ech_11­_1.htm

Cheap Nike Dunks (not verified) 1970, January 1 - 00:00
Best 3D LED TV (not verified) 1970, January 1 - 00:00

I will continue to visit for the latest information.

bag factory (not verified) 1970, January 1 - 00:00

t into such prepared system, but it opened the door to another, cleaner soluti

Carla (not verified) 1970, January 1 - 00:00

I wish that i know those things like you know! You have something special, i hope you realize that!

Website design (not verified) 1970, January 1 - 00:00

Such posts are so rare these days to find

Brochure Design (not verified) 1970, January 1 - 00:00

Very informative post that is.

ortiz vs mayweather (not verified) 1970, January 1 - 00:00

These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post, writing is simply great, thank you for the post.

miami generators (not verified) 1970, January 1 - 00:00

not working with opera 11.

Sanchez Peter (not verified) 1970, January 1 - 00:00

thank you for this guide. I recently bought a VPS with linux and its default OS is Fedora. I am going to install gentoo server on my VPS. this method will be really useful.

Senthil (not verified) 1970, January 1 - 00:00

You now need to inform Linux about your network. This is defined in /etc/hosts and helps in resolving host names to IP addresses for hosts that aren't resolved by your nameserver. You need to define your system. You may also want to define other systems on your network if you don't want to set up your own internal DNS system. Veterinary Jobs

prabhu (not verified) 1970, January 1 - 00:00

Well think Using specific and relevant Hashtags makes your tweets easier to find and follow by your followers, leads, prospects and customers because it categorizes your tweets around certain ‘standard’ and ‘universal’ topics, Wholesale Dresses

John Legend Tickets (not verified) 1970, January 1 - 00:00

This blog happened to indicate up in my searches and I couldn’t aid clicking on it. I am glad I did mainly because it was a really fulfilling read.Train Concert Tickets

send flower mexico (not verified) 1970, January 1 - 00:00

I admire the time and effort you put into your blog and detailed information you offer! I didn't know that!

Biletul zilei fotbal (not verified) 1970, January 1 - 00:00

Very good article! Thank you for the update's, that explained some strange things!

Anonymous (not verified) 1970, January 1 - 00:00

I just want to emphasize the good work on this , has excellent views and a clear vision of what you are looking for Online Diploma Online Schools Online University Programs

Pandora bracelets (not verified) 1970, January 1 - 00:00

Hey there! Your post was really helpful. I was just searching for this, and here it is.

clothing factory (not verified) 1970, January 1 - 00:00

This relation looks very different and they are depending by the impact produced by the transformative works.

clark7812 (not verified) 1970, January 1 - 00:00

thanks this post really opened my eyes. it is not only eye opening rather very beneficial for the people those who want to do something good in his life Forerunner 610 Review

make money from home (not verified) 1970, January 1 - 00:00

I think that the transformative works can bring a huge impact to the fans. This relation looks very different and they are depending by the impact produced by the transformative works.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.