We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

How-To: Remote Debian installation


heise
16-12-2014, 21:23
Worked for debian 6 - 32bit. Thank you very much.

GPT partition needs a small grub partition 1MB set to bios_grub, then second partition for /boot (can be subdirectory of root).

Blackangel
24-10-2011, 22:18
All fine with grub works my server response for a ping
I have other problem after installation ssh have like close port
I can't connect to my server :/ Connection refuse :/
I duble check config file etc and all looks ok

What wrong with squeeze from deboostrap with lenny i not have problems

Myatu
21-10-2011, 20:34
You could install Debian Squeeze from the OVH Manager, then immediately after change the kernel to Debian's default (see http://forum.ovh.co.uk/showthread.php?t=5616).

Blackangel
21-10-2011, 01:54
Hi i have kimsufi 2g server, i try install debian squeeze from rescu pro mode all looks fine only when i try boot from HDD this server is offline i dpn't know maybe eth0 not wakeup or maybe not have drivers :/
I use this tutorial http://wiki.nixhelp.de/ovh-spezifisc...y-from-scratch
Somebody have this same problem ??

Best Regards
BlackAngel

Winit
12-10-2010, 21:08
This works fine on the Q-1T.

I installed Debian Squeeze.

Code:
debootstrap --arch i386 squeeze /a http://mir1.ovh.net/ftp.debian.org/debian/
No need to configure grub manually if you're installing Squeeze. It'll take care of the config during the install of the grub package. It may ask you a couple of questions but they're fairly straight forward.

bruxia
08-05-2010, 13:22
Agreed! Very good instructions, nice one!

Winit
08-05-2010, 00:22
The instructions are fine.

enigmajr
07-05-2010, 23:30
I'm fine up until I try to configure grub. The command update-grub returns:

Searching for GRUB installation directory ... found: /boot/grub
The file /boot/grub/stage1 not read correctly.
Any ideas?

Quote Originally Posted by Matt
i did use "mount --bind" and not "mount -obind" assume its a typo in the tut?
I'm pretty sure it wasn't a typo, so that could be causing some problems.

Matt
18-04-2010, 18:54
Ttt

Matt
06-04-2010, 22:15
hmm, does anyone know if this is possible with an RPS?
i tried the following a few times and it doesn't seem to want to come back online..

i set rescue mode in ovh-manager, then ssh'd my RPS and rebooted, then ssh again with the new rescue mode pass, then:

Code:
cfdisk /dev/sda
mkfs.ext3 /dev/sda1
mkfs.ext3 /dev/sda2
mkfs.ext3 -m 0 /dev/sda3
mkdir /di
mount /dev/sda2 /di
mkdir /di/boot
mount /dev/sda1 /di/boot
debootstrap --arch i386 lenny /di ftp://ftp.uk.debian.org/debian/
echo "127.0.0.1 localhost" > /di/etc/hosts
echo "namerps" > /di/etc/hostname
nano /di/etc/network/interfaces
then entered (which i copied from the ovh RPS debian install):

PHP Code:
auto lo
iface lo inet loopback

auto eth0
:0
iface eth0
:0 inet static
address 178.rps.ip
netmask 255.255.255.255 
Code:
nano /di/etc/fstab
PHP Code:
/dev/sda2    /    ext3    errors=remount-ro    0    1
/dev/sda1    /boot    ext3    errors=remount-ro    0    1
proc        
/proc    proc    defaults    0    0 
Code:
nano /di/etc/apt/sources.list
PHP Code:
deb http://ftp.uk.debian.org/debian/ lenny main non-free
deb http://security.debian.org/ lenny/updates main non-free
deb http://volatile.debian.org/debian-volatile lenny/volatile main non-free 
i did use "mount --bind" and not "mount -obind" assume its a typo in the tut?

Code:
mount --bind /dev /di/dev
chroot /di
mount none /proc -t proc
apt-get update
apt-get install linux-image-2.6-686 openssh-server module-init-tools grub
mkdir /boot/grub
grub-install /dev/sda
update-grub 
nano /boot/grub/menu.lst
PHP Code:
title           Debian GNU/Linuxkernel 2.6.26-2-686
root            
(hd0,0)
kernel          /vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet
initrd          
/initrd.img-2.6.26-2-686 
Code:
passwd
exit
umount /di/dev
umount /di/proc
umount /di/boot
umount /di
then i went to ovh-manager and set the RPS to boot from the hd, and finally entered:

Code:
reboot
anyone spot any holes in what im doing
i waited an hour and it didnt come back

freshwire
11-03-2010, 17:58
Software raid worked fine for me.. My ubuntu install was using soft raid.

derchris
11-03-2010, 12:02
And what is not working?
I don't have a server with Soft Raid, but obviously, setting up Raid before doing the Debian install is a requirnment, and shouldn't be covered by this guide.

IainK
11-03-2010, 01:39
Doesn't work well with soft raid on the EG 10 Hybrid. Played with a few things but couldn't get it to work. Not really got the time to play any more just thought I would post.

freshwire
06-03-2010, 01:03
Thanks. Used this as a helper to installing ubuntu. Will post ubuntu guide within a few hours

Lilpaul340
29-01-2010, 20:14
Great Guide

Ashley
28-01-2010, 23:08
Err hangon I'm stuck on installing grub at 50%

Ashley
28-01-2010, 22:00
Ok I've achieved it, managed to set up RAID1 (i hope) and done it all using vKVM and not rescue pro.

Neil
25-01-2010, 18:27
Quote Originally Posted by Winit
C-05G supports 64bit
Not all servers are, please be careful. If you get a Celeron then it might not.

Ashley
25-01-2010, 15:05
Quote Originally Posted by derchris
Hardware or Software Raid ?
Software.

I will try again tonight. I guess I can make the partitions using the OVH re-install tool on the manager, and then just rescue mode, format all of them, and then vKVM and install a netinst ISO?

That way I don't have to configure RAID as it's already done?

derchris
25-01-2010, 09:41
Hardware or Software Raid ?

Ashley
25-01-2010, 04:18
If anyone could talk me through this on MSN would be great.

I can't seem to set up a RAID either

Ashley
25-01-2010, 04:17
root@rescue:/a# mount /dev/sda2 /a/tmp
mount: /dev/sda2: can't read superblock
Urgh?

jonlewi5
08-01-2010, 22:03
just a little update, as expected, it was user error haha

jonlewi5
08-01-2010, 00:29
Thats what i thought?

meh must be user error, ill try again tomorow

DigitalDaz
08-01-2010, 00:11
That is a 64bit?

jonlewi5
07-01-2010, 23:07
Well i tried with the 64bit kernel, but it wouldnt boot, so checked in through the vkvm and debian was failing to boot as the kernel was x86_64 and the processor found was an i686 processor

Here is what i have in mine

Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz

Winit
07-01-2010, 22:57
C-05G supports 64bit

jonlewi5
07-01-2010, 22:19
apologise for bumping an old thread, but just been through this and it worked a treat.

i was doing it on an kimsufi C-05G. All i had to change was change

Code:
apt-get install linux-image-2.6-amd64 openssh-server module-init-tools grub
to
Code:
apt-get install linux-image-2.6-686 openssh-server module-init-tools grub
Thanks very much for the info

derchris
11-11-2009, 12:46
You just replace the debootstrap with the ARCH you would like to use

i386 in this case

RikT
11-11-2009, 11:10
any chance that you could post the alterations to do a 32 bit install please

makno
10-11-2009, 21:10
no worries i'm quite happy with the ubuntu install i have at the moment but guess it will be better to have a guide at hand for the future and yes i know ubuntu is debian based so not much different.
Thanks in advance for your effort anyway

derchris
09-11-2009, 14:08
Thanks @Mods for sticky the thread.

Let me check if I have some some free time to make the Ubuntu one.
I can already tell you that it is not that much different then the Debian guide.

makno
09-11-2009, 04:25
derchris if you could make one for ubuntu that would be ace. I tryed many times to install via vkvm and failed that eventually i gave up

Winit
08-11-2009, 22:00
Very nice indeed

derchris
08-11-2009, 15:24
Yes, but it is just a security thing.
That should be covered in another how-to

I can also make one for Ubuntu if needed?

Myatu
08-11-2009, 15:01
Excellent! Thanks Mods should make this a sticky.

One thing, I'd add a safe & fast /tmp directoy to fstab as following:

Code:
...
tmpfs /tmp tmpfs noatime,nodev,noexec,nosuid,rw  0 0
You can specify the size with "size=" if you think it's too large for your average use.

derchris
08-11-2009, 09:49
Here is a quick guide on how to install Debian from scratch via the rescue-pro.

1. Format the harddrive:

PHP Code:
cfdisk /dev/sd[x
I normaly make 3 partitions

sda1 - 200 MB for boot, and make it bootable
sda3 - 2xMemory for Swap
sda2 - Rest for Root

2. Create FS

PHP Code:
mkswap /dev/sda3
mkfs
.ext3 /dev/sda1
mkfs
.ext3 /dev/sda2 
3. Prepare environment and mount FS

PHP Code:
mkdir /a
mount 
/dev/sda2 /a
mkdir 
/a/boot
mount 
/dev/sda1 /a/boot 
4. Install Debian

PHP Code:
debootstrap --arch amd64 lenny /a http://mir1.ovh.net/ftp.debian.org/debian/ 
This will install a 64bit Lenny
To install a 32bit use this

PHP Code:
debootstrap --arch i386 lenny /a http://mir1.ovh.net/ftp.debian.org/debian/ 

5. Configure Debian

PHP Code:
echo "127.0.0.1 localhost" > /a/etc/hosts
echo "hostname" > /a/etc/hostname 
You obviously change it to your hostname


6. Create network config in /a/etc/network/interfaces

PHP Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet 
static
address x.x.x.x
netmask 255.255.255.0
network x
.x.x.0
broadcast x
.x.x.255
gateway x
.x.x.254 
7. Create /a/etc/fstab

PHP Code:
/dev/sda2       /       ext3    errors=remount-ro       0       1
/dev/sda1       /boot   ext3    errors=remount-ro       0       1
/dev/sda3       swap    swap    defaults        0       0
proc            
/proc   proc    defaults        0       0
sysfs           
/sys    sysfs   defaults        0       0 
8. Modify /a/etc/apt/sources.list

PHP Code:
deb http://mir1.ovh.net/debian/ lenny main contrib non-free 
9. Chroot into new debian and finalize configuration

PHP Code:
mount -obind /dev /a/dev/
chroot /a
mount none 
/proc -t proc
apt
-get update 
10. Install kernel, grub, ssh

PHP Code:
apt-get install linux-image-2.6-amd64 openssh-server module-init-tools grub 
11. Configure grub

PHP Code:
mkdir /boot/grub
grub
-install /dev/sda
update
-grub 
The boot entry in menu.lst should look like this:

PHP Code:
title Debian GNU/Linuxkernel 2.6.26-2-amd64
root
(hd0,0)
kernel/vmlinuz-2.6.26-2-amd64 root=/dev/sda2 ro 
initrd
/initrd.img-2.6.26-2-amd64 

12. Set root password, reboot

PHP Code:
passwd
exit
umount /a/dev
umount 
/a/proc
umount 
/a/boot
umount 
/a
reboot 
Change to hdd boot in the Manager before you reboot the server.
If everything was ok, the server should come back online, and then you can ssh into it with user 'root' and the password you set.

Have fun playing around