Those steps aren’t required at all and are overly complicated/not relevant. They look to target digitalocean which is a whole different thing. AWS does use grub, it’s just a different config file you need to edit than usual. Changing the kernel boot parameters on AWS for the official Ubuntu images is just as simple as editing /etc/default/grub.d/50-cloudimg-settings.cfg in the same way you’d usually edit /etc/default/grub. Note that you have to run ‘update-grub’ afterwards and then reboot. This assumes you’re using one of the hvm images and not one of the pv images.

 

If you have any other trouble getting things to work with AWS let me know, I have quite a bit of experience with running DOMjudge on it.

 

From: DOMjudge-devel [mailto:domjudge-devel-bounces@domjudge.org] On Behalf Of Malcolm Corney
Sent: Monday, July 11, 2016 4:11 AM
To: 'Myungwoo Chun' <mc.tamaki@gmail.com>
Cc: domjudge-devel@domjudge.org
Subject: RE: Kernel Parameter on AWS EC2

 

I’m not sure what you mean by:

 

** In above step I choose replace menu.lst **

 

You are correct about not requiring:

 

*** Add

http://ubergarm.github.io/ (** I'm not sure I need to add this line **)

 

I must have left that there as the source of my information – apologies.

 

Yes, reboot is required.

 

 

From: Myungwoo Chun [mailto:mc.tamaki@gmail.com]
Sent: Monday, 11 July 2016 2:34 PM
To:
m.corney@tpg.com.au
Cc:
domjudge-devel@domjudge.org
Subject: Re: Kernel Parameter on AWS EC2

 

Thank you for fast reply.

 

But I don't solve the problem with this.

I have several questions about the solution.

Please check parts below which I wrap with ** **.

 

My instance is Ubuntu 14.04.03 LTS (trusty).

 

===========================================================================================

sudo -s

apt-get update

apt-get purge linux-image-*

apt-get install linux-image-generic-lts-trusty linux-headers-generic-lts-trusty

** In above step I choose replace menu.lst **

 

# setup kexec to actually run the kernel you chose w/ the GRUB_CMDLINE options

vi /etc/default/grub

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

 

vi /etc/init.d/rcS

*** Add

http://ubergarm.github.io/ (** I'm not sure I need to add this line **)

if grep -qv ' kexeced$' /proc/cmdline ;then

   kexec --load /vmlinuz --initrd=/initrd.img --append='root=LABEL=DOROOT cgroup_enable=memory swapaccount=1 kexeced' &&

   mount -o ro,remount / &&

   kexec -e

fi

 

echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/docker.conf

apt-get install kexec-tools

dpkg-reconfigure kexec-tools #yes/yes

 

# install docker (despite the old package name, lxc is optional as of 0.90)

apt-get install docker cgroup-lite lxc

 

# libcontainer is default, but im still running lxc for now

vi /etc/default/docker (** At this step, /etc/default/docker is not existed **)

DOCKER_OPTS="-e lxc"

 

** And then I reboot the instance **

===========================================================================================

 

After the rebooting,

output of "cat /proc/cmdline" is

===

BOOT_IMAGE=/boot/vmlinuz-3.13.0-91-generic root=UUID=736fad7a-387f-4420-b934-4ccbafa26d16 ro console=tty1 console=ttyS0 crashkernel=384M-:128M

===

 

Thank you,

Myungwoo Chun

 

 

On Mon, Jul 11, 2016 at 12:09 PM, Malcolm Corney <m.corney@tpg.com.au> wrote:

I have included the steps below for what I did to enable cgroups on an Amazon EC2 instance.  The instructions are for “saucy” but “saucy” can be replaced with whichever version of Debian/Ubuntu you are running.  Hopefully this will work for you as well.

 

The information comes from:

 

https://gist.github.com/ubergarm/9695532
http://ubergarm.github.io/

Malcolm Corney

 

Alter Boot to allow GRUB loader for CGroups - Required for Amazon Web Services EC2 Instance

=============================================================================================

sudo -s

apt-get update

apt-get purge linux-image-*

apt-get install linux-image-generic-lts-saucy linux-headers-generic-lts-saucy

 

# setup kexec to actually run the kernel you chose w/ the GRUB_CMDLINE options

vi /etc/default/grub

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

 

vi /etc/init.d/rcS

*** Add

http://ubergarm.github.io/

if grep -qv ' kexeced$' /proc/cmdline ;then

   kexec --load /vmlinuz --initrd=/initrd.img --append='root=LABEL=DOROOT cgroup_enable=memory swapaccount=1 kexeced' &&

   mount -o ro,remount / &&

   kexec -e

fi

 

echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/docker.conf

apt-get install kexec-tools

dpkg-reconfigure kexec-tools #yes/yes

 

# install docker (despite the old package name, lxc is optional as of 0.90)

apt-get install docker cgroup-lite lxc

 

# libcontainer is default, but im still running lxc for now

vi /etc/default/docker

DOCKER_OPTS="-e lxc"

 

 

 

From: DOMjudge-devel [mailto:domjudge-devel-bounces@domjudge.org] On Behalf Of Myungwoo Chun
Sent: Sunday, 10 July 2016 9:29 PM
To:
domjudge-devel@domjudge.org
Subject: Kernel Parameter on AWS EC2

 

Hi,

 

I want to enable cgroups for Java memory issues and running multiple judgedaemons in AWS EC2 Ubuntu 14.04 Server instance.

 

However, I can't add "quiet cgroup_enable=memory swapaccount=1" since AWS EC2 doesn't use grub.

 

Is there any method to add kernel parameters to AWS EC2 instance?

 

Thanks,

Myungwoo Chun