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
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video







Recent comments
2 hours 38 min ago
3 hours 23 min ago
5 hours 13 min ago
5 hours 24 min ago
7 hours 24 min ago
16 hours 39 min ago
17 hours 8 min ago
18 hours 50 min ago
20 hours 50 min ago
21 hours 25 min ago