Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

There are many tutorials (e.g. the main I think: D.3. Installing Debian GNU/Linux from a Unix/Linux System), how to install a new Debian from one another. But they all sounds for me like you need a LiveCD to boot from.

I would like to install a Debian from a Debian and while install I want to have a possibility to repartition the whole disk (only one in the system). So if I use debootstrap I have to use a swap partition or to create a new partition at the end of the disk. But that means that I can't repartition the whole disk:

======
/boot
======
/swap
======
/
======

That means, I will have a partition in the middle of the disk? And what if I would like to use LVM? If I use fdisk and delete all the partitions and then create a new one (or two one normal for /boot and one for the rest of the system, e.g. /swap, /var, /var/tmp, etc.) then I can't use a pvcreate /dev/sda1: it will say

Can't open /dev/sda1 exclusively.  Mounted filesystem?

And if I will just format it all, I will not come back to the system...via SSH.

So how can I really install a new Debian from within an old one via SSH, with repartitioning using LVM?

Update:

the server provider makes the OS install in automated way (I need just select the OS and one from five "different" schemes, so no control of the installation process, I get only the server with Debian already installed on it)

share|improve this question
1  
You boot from the installation media. What's wrong with that? –  Michael Hampton Jun 10 '13 at 15:20
2  
While this is possible, with a very long and obscure series of steps, the chance of failing and leaving your system unreachable is very high. –  Zoredache Jun 10 '13 at 15:24
    
@MichaelHampton: no, the server provider makes the install process in automated way (I need just select the OS and one from five "different" schemes, so no control of the installation process, I get only the server with Debian already installed on it) –  static Jun 10 '13 at 15:43
3  
Sounds like you need a better provider. –  Michael Hampton Jun 10 '13 at 15:55
    
@MichaelHampton :) yep, already thought about it. not for now, but in 2-3 months will move to a better one. –  static Jun 11 '13 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.