Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating & update locales failed due to low system memory #133

Closed
suntong opened this issue Aug 10, 2019 · 15 comments
Closed

Generating & update locales failed due to low system memory #133

suntong opened this issue Aug 10, 2019 · 15 comments

Comments

@suntong
Copy link
Contributor

suntong commented Aug 10, 2019

I use grml-debootstrap to install Debian to my brand new VM but the VM is not boot-able.

I took a look at #37 and #30, but not sure if this is related to them.

Please take a look at the full log:
http://paste.debian.net/1095142/

I.e., grml-debootstrap finished to the end, fine, mostly, but the system cannot be booted. I searched through the log, and am not sure the grub-update was called or not.

BTW,

  • I choose installing grub to MBR during the installation.
  • I'm using release bullseye, but think this shouldn't be the cause of the problem.

Please verify.
Thanks

@mika
Copy link
Member

mika commented Aug 11, 2019

It's failing because of:

*** update-locale: Error: invalid locale settings:  LANG=en_US.UTF-8 LANGUAGE=en_US:en
 -> Failed (rc=1)
 * Removing chroot-script again
 * Unmount /mnt/debootstrap.2808
umount: /mnt/debootstrap.2808: target is busy.

Might be an issue in Debian bullseye, so might be worth trying with current stable release (buster) and see whether the issue is present there as well. (And please consider sharing your actual grml-debootstrap command line when reporting issues so we can more easily reproduce it. :))

@mika mika changed the title grml-debootstrap failed to make system bootable Installation of buster fails with update-locale: Error: invalid locale settings Aug 11, 2019
@suntong
Copy link
Contributor Author

suntong commented Aug 11, 2019

And please consider sharing your actual grml-debootstrap command line when reporting issues...

Oh, I was just invoking grml-debootstrap from command prompt without any command line parameters, as I don't know it's current capabilities. Will try next time.

Meanwhile, would it be a good idea to reproduce the command line used (or would be used if making choices through UI) in the last UI conformation page (the one at the top of OP link)?

              +----------------------------grml-debootstrap------------------------------+                  
               | Please recheck configuration before execution:                           |                  
               |                                                                          |                  
               |    Target:          /dev/sda1                                            |                  
               |    Install grub:    /dev/sda                                             |                  
               |    Using release:   bullseye                                             |                  
               |    Using hostname:  grml                                                 |                  
               |    Using mirror:    http://deb.debian.org/debian                         |                  
               |    Using arch:      amd64                                                |                  
               |    Config files:    /etc/debootstrap                                     |                  
               |                                                                          |                  
               | Is this ok for you? Notice: selecting 'No' will exit grml-debootstrap.   |                  
               +--------------------------------------------------------------------------+                  
               |                       < Yes >            < No  >                         |                  
               +--------------------------------------------------------------------------+                  

Thus, it's more or less self-documenting when reporting issues.

@mika
Copy link
Member

mika commented Aug 11, 2019

Ah ok, then it's clear what you chose :)

@suntong
Copy link
Contributor Author

suntong commented Aug 11, 2019

(or would be used if making choices through UI) in the last UI conformation page

Are any grml devs familiar with Golang?

As grml-debootstrap getting more and more complicated, it make sense to bit the bullet and re-write it in Golang at some point, just as what Docker has been doing. If there were any such plan, I'd be happy to take care of the command line parameters handling part, again, :-).

@suntong
Copy link
Contributor Author

suntong commented Aug 11, 2019

It's a simple language which can be taken on within no time, if you are a C/C++ developer.
I looked into it more than 10 years ago, when I heard that Docker turn their spaghetti shell script into Go, which was the problem I was facing then as well.

@mika
Copy link
Member

mika commented Aug 11, 2019

I'm familiar with golang and was considering rewriting grml-debootstrap already, but before doing so, I'd like to have more tests in place and also look into some design issues like we hit in #76. I was also considering using grml-debootstrap instead of FAI within grml-live, so that's something else to keep in mind, without taking the risk of running into the second-system effect. :)

@suntong
Copy link
Contributor Author

suntong commented Aug 11, 2019

Oh well, "all wise people thinking the same" (grin), :-)

when you're ready, drop me a note, I'd be more than happy to help on the command line parameters handling part.

@suntong
Copy link
Contributor Author

suntong commented Aug 11, 2019

the command line parameters handling part

Oh, in fact, also the whole CI/CD part, including building your own (quick) Debian package during CI/CD.

@suntong
Copy link
Contributor Author

suntong commented Aug 13, 2019

just a quick update, give me some time to test it, some irrelevant thing is blocking me so far...

@suntong
Copy link
Contributor Author

suntong commented Aug 15, 2019

So instead of Debian bullseye, I tried with current stable release (buster) this time and get the exact same error:

   Executing stage default_locales
*** update-locale: Error: invalid locale settings:  LANG=en_US.UTF-8 LANGUAGE=en_US:en
 -> Failed (rc=1)
 * Removing chroot-script again
 * Unmount /mnt/debootstrap.3434
umount: /mnt/debootstrap.3434: target is busy.
 -> Failed (rc=32)
 * Removing /var/cache/grml-debootstrap/variables_sda1
 * Removing /var/cache/grml-debootstrap/stages_sda1
[ ok ] Stopping OpenBSD Secure Shell server: sshd.
 * Unmounting /mnt/debootstrap.3434
Removing stages directory /var/cache/grml-debootstrap/stages_sda1: done
 * Removing directory /mnt/debootstrap.3434
 * Notice: remove /var/cache/grml-debootstrap/stages_sda1/umount_chroot to reexecute the stage

here is how I run it:

release=buster
grml-debootstrap -t /dev/sda1 --grub /dev/sda--release $release --hostname $release --nopassword

Please double-check.

@mika
Copy link
Member

mika commented Aug 16, 2019

Just tested this with grml-debootstrap v0.89 using your command line, no such problem here.
I'd assume this is the same issue as in #125 (comment) with locales generation "en_US.UTF-8...Killed".
How much memory do you have available on your system?
What environment is this where you're executing grml-debootstrap from?

@suntong
Copy link
Contributor Author

suntong commented Aug 16, 2019

Yes, same issue as in #125.

How much memory do you have available on your system?

Ah, that must be the most possible culprit.

I'm using grml-small on a minimum VM under VMWare, which only has 512M of memory.

Any idea what the minimum memory is?

@mika
Copy link
Member

mika commented Aug 16, 2019

No idea, but given that the live system is already supposed to have 512MB of memory available, I'd assume you should upgrade to 768 or 1024MB of RAM.

@suntong
Copy link
Contributor Author

suntong commented Aug 16, 2019

Yep, bump system memory up to 1024MB of RAM solved the problem.

Thanks mika!

@suntong suntong closed this as completed Aug 16, 2019
@suntong suntong changed the title Installation of buster fails with update-locale: Error: invalid locale settings Generating & update locales failed due to low system memory Aug 16, 2019
@suntong
Copy link
Contributor Author

suntong commented Aug 16, 2019

It succeeded with Debian bullseye BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants