I recently wanted to format a disk that I had, I wanted to put Debian, for a server and try things. The point was that I was really lazy to create a Bootable USB, then boot my computer and start installing everything.
And he also had other things to do. So I started the task of investigating how to install it from another Linux, as if it were virtualized. This is how I met Debootstrap. And I will briefly explain how I did:
Installation.
This always depends on where the process is going to be done. I for example use Manjaro. So it would be something like:
yaourt -S debootstrap
Using Debian and similar, it would be.
sudo apt-get install debootstrap
It is also important to know what we are going to need Chroot.
Running
Now let's get to the point. !! The first thing we must doer is to define claRarely which disk and which partition of that disk we are going to use.
For example:
I have two discs:
First record: sDA It's divided in 4 partitions (sda1, sda2, sda3, sda4)
Second Disc: sdb It is where I have my base system installed. That is Manjaro.
In this order of ideas. I chose the disk SDA and the partition sda3
Now what I do is mount the partition.
I create the folder where I am going to mount the partition.
sudo mkdir /media/Debian
Now I mount the partition.
sudo mount /dev/sda3 /media/Debian
Install the base system
In this step then we proceed to install the base system of our Debian. For that we execute.
sudo debootstrap --arch i386 wheezy /media/Debian http://ftp.fr.debian.org/debian
–Arch: We choose the 32 or 64 bit architecture.
Wheezy: Here we are choosing the Debian version.
/ media / Debian: Where we mount our partition.
Next we see how our base system begins to be installed.
When finished we will see this message and also we will see that indeed if the files were downloaded:
Setting up Debian.
Now what we have to do is "get into" the Debian. So we can execute orders as if we were in the debian We run the following on the console.
LANG=C.UTF-8 chroot /media/Debian /bin/bash
In this way we can execute orders from the console debian
Now what?
Let's install the kernel! .. For that, first we are going to edit the sources.list.
nano /etc/apt/sources.list
To generate bliss sources.list we can use the following Web design
And we update.!
apt-get update && sudo apt-get upgrade
So we look for a kernel that we like with:
aptitude search linux-image-
Then we will get a list of available kernels. In my case I installed the linux-image-3.2.0-4-686-pae
apt-get install linux-image-3.2.0-4-686-pae
In this sense we would already have Debian, but we are going to configure a little more.
Mounting Partitions.
Editing the / etc / fstab file
nano /etc/fstab
What we are going to put there depends on each computer. In my case I will only tell you that the root "/" is in sda3 (Where you install Debian)
It would be something like:
"/ Dev / sda3 / ext4 defaults 0 1"
And now we only ride with:
mount -a
Now we are going to customize the system a bit. With the following command we configure the time zone:
dpkg-reconfigure tzdata
We are going to install the ssh (I will handle it only by RED)
apt-get install ssh
We add users and change the password to ROOT
adduser usuarioprueba
passwd root
Now we just execute "exit" to stay in the natural system console and update the grub
sudo update-grub
From here on you can do any configuration that is already to your liking. How to install other services or a graphical environment.
I hope you like the post.!
Regards.!
Excellent work.
Whoa! how useful. I will do the test
Great!
Excellent. Debian From Scrarch for archers.
there is a mistake
Lol I will never be able to with that word. I always… I ALWAYS misspell it. uu
no problem, after one of the mods fixes it: v
Yes, sure, don't bother using spell checker, that's what we're for, to use it for you, hahaha. 😀
Ok, that's it, and incidentally, I also sudoed the Yaourt command because it should never be used as root. 😛
Interesting and very practical.
interesting.
as always interesting ... usually I quickly forget almost everything I read and keep the central idea, but in this case, I can't get the 'fence' of the third paragraph out of my head, otherwise good job!
Hahaha, it's already corrected. 😀