I've managed to install CentOS 6 on a 192MB virtual machine using LiveCD install-to-disk graphical method.
This is not normally possible because of: - hard-coded minimum supported memory in Anaconda installer - it will show a message "You do not have enough RAM to install CentOS Linux on this machine" if you try or force you to use seriously crippled text installer; - a bug in Anaconda installer, which prevents it from using swap during installation.
I think it would be useful to be able to install CentOS 6 (or Scientific Linux 6 or RedHat Enterprise Linux - RHEL 6) on low memory old computer or laptop, as it can be very capable firewall, home www server, proxy etc.
So the procedure is as follows:
1. Boot to 32-bit CentOS LiveCD (CentOS-6.0-i386-LiveCD.iso) in graphical mode (if you have at least 256MB RAM) or text mode (if you have less than 256MB RAM).
2. Login as root.
3. Edit a file /usr/sbin/anaconda - using vim in text mode or gedit in graphical mode - search for "within" and modify function "within_available_memory" adding a line "return True" like this: def within_available_memory(needed_ram): return True # kernel binary code estimate that is # not reported in MemTotal by /proc/meminfo epsilon = 15360 # 15 MB return needed_ram < (iutil.memInstalled() + epsilon) This would get rid of artificial hard-coded memory requirement.
4. Edit a file /usr/lib/anaconda/storage/__init__.py - search for 4th occurrence of "swapoff" and modify a fragment of function "umountFilesystems" from: for device in devices: if not device.format.mountable and \ (device.format.type != "swap" or swapoff): continue to: for device in devices: if not (device.format.mountable and \ (device.format.type != "swap" or swapoff)): continue (add parentheses - left one after "if not" and right one after "or swapoff"). This would fix a bug in installer.
5. Run "liveinst" which should start graphical installer.
6. During installation create swap partition so that you have at least 1GB of available memory (RAM+swap) (default setup should suffice, but I personally do not recommend it as it used LVM, which AFAIK prevents disks from using barriers).
The bug is reported upstream: https://bugzilla.redhat.com/show_bug.cgi?id=708966 but for Fedora Linux.
Regards Tometzky
On Wed, 27 Jul 2011, Tomasz Ostrowski wrote:
I've managed to install CentOS 6 on a 192MB virtual machine using LiveCD install-to-disk graphical method.
<snip rework of Anaconda, Live CD discussions>
I think you are over-thnking this. Anaconda is overkill if all you want to do is blow images onto arbitrary hardware
So long as you are going through all this, why not just install to taste into a chroot with yum or RPM, rsync into a prepared hard drive, optionally fix up the fstab grub.conf settings, and run grubby or do a mkinitrd and grub initialization
(The transfer and bootloader fixup my be done with a minimal image, PXE loaded, so one does not even need a working CD/DVD/ USB port. PXE has been on substantially all hardware built for the last decade)
That approach is portable, and works across all CentOS variants
-- Russ herrold
On 07/27/2011 01:06 PM, R P Herrold wrote:
On Wed, 27 Jul 2011, Tomasz Ostrowski wrote:
I've managed to install CentOS 6 on a 192MB virtual machine using LiveCD install-to-disk graphical method.
So long as you are going through all this, why not just install to taste into a chroot with yum or RPM, rsync into a prepared hard drive, optionally fix up the fstab grub.conf settings, and run grubby or do a mkinitrd and grub initialization
I think installing using installer, even if you have to hack it a little, is much easier and faster than that. And allows for easy partitioning, setting up for example software RAID etc. And installer will take care of proper selinux labeling, partition alignment etc.
Installing normally on a virtual machine of the same disk size as target system and then copying disk image over network using LiveCD is another possible approach, also simpler than yours.
Regards Tometzky