How To Make Your Xen-PAE Kernel Work With More Than 4GB RAM (Debian Etch With GRUB)
How To Make Your Xen-PAE Kernel Work With More Than 4GB RAM (Debian Etch With GRUB)Version 1.0 If you have a server with more than 4GB RAM and want to install a 32bit Debian Etch on it (following this tutorial: Debian Etch And Xen From The Debian Repository), you'd expect the Xen-PAE kernel to see all your RAM because the Xen-PAE kernel supports up to 64GB RAM. In fact, it recognizes only about 3.3GB RAM due to a bug in the GRUB bootloader. This article explains how you can fix GRUB so that all your RAM gets recognized. I do not issue any guarantee that this will work for you!
1 Preliminary NoteThis bug exists on 64bit Debian systems as well - the default Debian Xen kernel also recognizes only 3.3GB of RAM. It's possible that the following procedure works for 64bit Debian Etch systems as well, although I have tested it only on a 32bit Debian Etch system. I assume that you have already set up Xen on your system according to this tutorial: Debian Etch And Xen From The Debian Repository I have tested this on a system with 6GB RAM. Don't follow this tutorial if you're using another bootloader than GRUB (e.g. lilo)!
2 Check Your MemoryYou can run cat /proc/meminfo to see how much memory your system recognizes: Debian-40-etch-32-minimal:~# cat /proc/meminfo As you see, only about 3.3GB are recognized by the system...
3 Rebuild GRUBNow let's rebuild the GRUB bootloader. We need the package dpkg-dev for it: apt-get install dpkg-dev Then we download the GRUB sources... apt-get source grub ... and install all requirements to rebuild GRUB: apt-get build-dep grub We must modify the stage2/common.c file in the GRUB source directory. First we make a copy of that file: cd grub-0.97/ Then we open it: vi stage2/common.c Around line 143, you should find this section:
Modify it as follows:
Save the file, then build the new GRUB package: debian/rules binary Afterwards we can install the new GRUB package as follows: dpkg -i ../grub_0.97-27_i386.deb Now we must install GRUB on our hard drives. I'm using two hard drives, /dev/sda and /dev/sdb (for software RAID1), so I run grub-install /dev/sda If you only got one hard drive, then run grub-install only once. Make sure that you use the correct device name for your hard drive (for example, instead of /dev/sda, yours might be /dev/hda - you can find out about the hard drive names by running fdisk -l ). Finally, it's time to reboot: reboot
4 Check Your Memory AgainAfter the reboot, it's time to check the memory again. If everything went well, the system should now recognize the full amount of RAM: cat /proc/meminfo Debian-40-etch-32-minimal:~# cat /proc/meminfo As you see, my system is now recognizing my full 6GB of RAM.
5 Links
|






Recent comments
7 hours 36 min ago
9 hours 42 min ago
9 hours 51 min ago
12 hours 22 min ago
13 hours 11 min ago
15 hours 48 min ago
16 hours 13 min ago
18 hours 6 min ago
22 hours 17 min ago
1 day 1 hour ago