[CentOS] partitionless installation

Peter peter at pajamian.dhs.org
Mon Nov 25 19:56:03 UTC 2013


On 11/26/2013 05:28 AM, Халезов Иван wrote:
> 
> Is it possible to install CentOS 6 without disk partitioning?

Yes, it is, but there are a couple of caveats:

1.  You can't use anaconda to do so directly.

2.  You can't boot through grub (as someone else pointed out).  You can
boot the kernel directly or boot through something similar to grub, such
as pvgrub (for Xen, which I know from experience works with this type of
setup).

I know of two different ways to do it.  The first way is to just do a
regular install to a partitioned image with anaconda, then you can copy
the whole thing over to a non-partitioned filesystem.

The second way is to use yum.  You would have to find a yum package that
runs in ubuntu, then use yum with the --config (for a custom config file
to point to the CentOS repos) and --installroot (to point to your
mounted filesystem, instead of the root of the current host system), and
do something like this:

yum --config=centos6.conf --installroot=/path/to/mountpoint groupinstall
core

Then you can chroot into the new fs (after bind mounting /proc /sys and
/dev) and set your root password, edit your network config
(/etc/sysconfig/network-scripts files) yum install any other packages
you want, and so on.

I recommend that for either method you choose, when yo've tweaked it how
you like for a basic VM, you tarball all the files up and use it as a
template for future installs.

For swap you can either pass in a second block device or use a swap file
(I use a swap file and it works just fine).


Peter



More information about the CentOS mailing list