Jump to content











Photo
- - - - -

Limiting maximum RAM in Syslinux

ram syslinux

  • Please log in to reply
9 replies to this topic

#1 netgod

netgod
  • Members
  • 5 posts
  •  
    Canada

Posted 01 December 2012 - 01:34 AM

Is there a way to limit the "visible" with Syslinux? I can do that with lilo and Grub so that my OS' see as much RAM as I choose.

#2 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 01 December 2012 - 02:35 AM

Is there a way to limit the "visible" with Syslinux? I can do that with lilo and Grub so that my OS' see as much RAM as I choose.

Not really, but what are you booting, exactly?

#3 netgod

netgod
  • Members
  • 5 posts
  •  
    Canada

Posted 01 December 2012 - 03:04 AM

ESXi 5.1, it will not boot if you have over 32GB of RAM. And this is a leased server in a remote DC so no way of physically removing the RAM either. Lilo and Grub can fool the ESXi kernel no problem with conf file setting and I was wondering if Syslinux (the ESXi bootloader) has this capability or else I will have to use another bootloader.

#4 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 01 December 2012 - 03:34 AM

ESXi 5.1, it will not boot if you have over 32GB of RAM. And this is a leased server in a remote DC so no way of physically removing the RAM either. Lilo and Grub can fool the ESXi kernel no problem with conf file setting and I was wondering if Syslinux (the ESXi bootloader) has this capability or else I will have to use another bootloader.

I assume that you are using Syslinux' mboot.c32 to boot ESXi 5.1. mboot.c32 does not take a command-line parameter modify the E820 memory map, as far as I know. Doing so would involve installing a hook before Syslinux passes control to the kernel.

Just out of curiosity, what LILO and/or GRUB invocations are you using to limit memory? I asked my original question because some OS's will allow you to control the memory perspective via a kernel command-line parameter. If that's how you're doing it with LILO and GRUB, then it should be possible with mboot.c32.

The only exception to this would be if it's not really a kernel command-line parameter, but merely looks like one. (For example, if the command-line parameter is an instruction to LILO or GRUB, rather than to the kernel.)

#5 netgod

netgod
  • Members
  • 5 posts
  •  
    Canada

Posted 01 December 2012 - 04:13 AM

On a Debian 7 system we added this to the grub.conf:

# these options don't get added to recovery boot entry
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

# these options get added to both standard and recovery boot entries
GRUB_CMDLINE_LINUX="var1 var2 mem=1024m"

And Debian sees only 1024m

#6 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 01 December 2012 - 04:32 AM

On a Debian 7 system we added this to the grub.conf:

# these options don't get added to recovery boot entry
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

# these options get added to both standard and recovery boot entries
GRUB_CMDLINE_LINUX="var1 var2 mem=1024m"

And Debian sees only 1024m

That looks like it could go in an mboot.c32 invocation. Try placing those after the kernel module's name and before the next set of hyphens, or share your Syslinux config-file and we can think about the change, together.

#7 netgod

netgod
  • Members
  • 5 posts
  •  
    Canada

Posted 01 December 2012 - 05:19 AM

Here you go:

default safeboot.c32
nohalt 1

#8 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 01 December 2012 - 05:51 AM

Here you go:

default safeboot.c32
nohalt 1

Unfortunately, this is a custom ComBoot32 module; not one that comes with Syslinux. We will have to find the source code in order to see what it does. If it invokes mboot.c32 somehow (or is a modified version of it), then perhaps we'll find out what needs to happen in order to pass the mem= option to the ESXi multiboot kernel. Let's see...

---EDIT--- As usual, it's non-trivial to find the source code from a vendor that is using open source software with their product. I've e-mailed the mailing-list to find out if anyone knows where to find it. However, since there don't seem to be many options in that file, is there perhaps another config-file that safeboot.c32 might be using for further options? You might gain a clue by examining the output of strings safeboot.c32. I came across web-pages mentioning a boot.cfg file, for instance...

#9 netgod

netgod
  • Members
  • 5 posts
  •  
    Canada

Posted 01 December 2012 - 10:21 AM

Maybe it could be decompiled and examined for possible arguments. Files alongside with it are ldlinux.sys mboot.c32 and syslinux.cfg

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 December 2012 - 12:24 PM

Maybe it could be decompiled and examined for possible arguments. Files alongside with it are ldlinux.sys mboot.c32 and syslinux.cfg

That's exactly the idea of OPEN SOURCE, you decompile the binary! :w00t:

Are we talking of VMware ESXi?

There are sources for v 5.1 (though not linked to from the "main" product page :dubbio:):
https://my.vmware.co...5_1#open_source

https://my.vmware.co...S&productId=285
https://my.vmware.co...S&productId=268
https://my.vmware.co...S&productId=284

:cheers:
Wonko




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users