Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Truly silent boot [SOLVED]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
JKosta
n00b
n00b
Posts: 32
Joined: Mon Nov 11, 2013 3:26 pm

Truly silent boot [SOLVED]

  • Quote

Post by JKosta » Wed Nov 13, 2013 7:13 pm

I want to get rid of the following output when kernel is loading:

early console in decompress-kernel
Decompressing Linux . . . Parsing ELF . . .done
Booting the kernel

Anybody knows how?
Last edited by JKosta on Thu Nov 14, 2013 12:36 am, edited 1 time in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Nov 13, 2013 8:28 pm

JKosta,

Patch the kernel to remove those text ouputs.

Use gep to find the strings in the kernel source.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
JKosta
n00b
n00b
Posts: 32
Joined: Mon Nov 11, 2013 3:26 pm

  • Quote

Post by JKosta » Wed Nov 13, 2013 8:44 pm

NeddySeagoon,

Can you detail?
Thanks.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Nov 13, 2013 9:20 pm

JKosta,

I will do an example here ...

Code: Select all

roy@NeddySeagoon_SSD ~ $ cd /usr/src/linux
roy@NeddySeagoon_SSD /usr/src/linux $ grep -R Decompressing
Searches the entire kernel for the word "Decompressing" with a capital D.

In my kernel, the output is

Code: Select all

Documentation/xz.txt:    is used in single-call mode. Decompressing the kernel itself is an
arch/alpha/boot/bootpz.c:	srm_printk("Decompressing the kernel...\n"
Binary file arch/x86/boot/compressed/misc.o matches
arch/x86/boot/compressed/misc.c:	debug_putstr("\nDecompressing Linux... ");
Binary file arch/x86/boot/compressed/vmlinux matches
Binary file arch/x86/boot/vmlinux.bin matches
Binary file arch/x86/boot/bzImage matches
Binary file arch/x86_64/boot/bzImage matches
arch/m32r/boot/compressed/misc.c:	puts("\nDecompressing Linux... ");
We can ignore the binary files as they are not source code.
We also ignore Documentation/, as that is human readable instructions.
This leaves three files ...

Code: Select all

arch/alpha/boot/bootpz.c:	srm_printk("Decompressing the kernel...\n"
arch/x86/boot/compressed/misc.c:	debug_putstr("\nDecompressing Linux... ");
arch/m32r/boot/compressed/misc.c:	puts("\nDecompressing Linux... ");
The first one is for DEC Alpha based sysems, the second one is for Intel/AMD based systems.
I don't know what m32r is.

Open the file in nano

Code: Select all

nano -w arch/x86/boot/compressed/misc.c
Notice the file starts with lots of comments that are started with /* and ended with */
Press Ctl-W in nano to search and enter

Code: Select all

Decompressing
to search

At the end of the file there is

Code: Select all

        debug_putstr("\nDecompressing Linux... ");
        decompress(input_data, input_len, NULL, NULL, output, NULL, error);
        parse_elf(output);
        debug_putstr("done.\nBooting the kernel.\n");
        return;
Add the comment marks around

Code: Select all

 debug_putstr("\nDecompressing Linux... "); 
and

Code: Select all

debug_putstr("done.\nBooting the kernel.\n");
so it reads

Code: Select all

/*        debug_putstr("\nDecompressing Linux... ");  */
        decompress(input_data, input_len, NULL, NULL, output, NULL, error);
        parse_elf(output);
/*        debug_putstr("done.\nBooting the kernel.\n");  */
        return;
These lines of code are now comments and will not be compiled when you rebuild the kernel.
You could also just delete the lines but comments are easier to reverse.
You can also add a comment of your own for you to read later.

That is the method with a worked example.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
JKosta
n00b
n00b
Posts: 32
Joined: Mon Nov 11, 2013 3:26 pm

  • Quote

Post by JKosta » Thu Nov 14, 2013 12:32 am

NeddySeagoon,

I've followed your example and it worked!
Thanks a lot! :D
Top
666threesixes666
Veteran
Veteran
User avatar
Posts: 1248
Joined: Tue May 31, 2011 9:46 pm
Location: 42.68n 85.41w
Contact:
Contact 666threesixes666
Website

  • Quote

Post by 666threesixes666 » Thu Nov 14, 2013 12:38 am

is there a way to automatically patch any kernel that comes past me so i can run a command instead of digging through files by hand? how do i tell openrc shush too?
http://www.funtoo.org/
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Nov 14, 2013 7:20 pm

666threesixes666,

Building on the above example, you can make a patch file and run patch < patchfile to apply your patch.

Code: Select all

man patch 
tells how to use diff to make a patch.
If the package of interest supports epatch, you only need drop the patch into the right place in /etc/portage and portage will apply it for you.

For openrc, file a feature request for a silent USE flag. Of course, patches welcome.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Lukas0907
n00b
n00b
Posts: 1
Joined: Mon Jun 23, 2014 10:25 am

  • Quote

Post by Lukas0907 » Mon Jun 23, 2014 10:28 am

Hi,

instead of patching the kernel you can also simply disable CONFIG_X86_VERBOSE_BOOTUP which does the same thing (Linux 3.13).

Cheers,

Lukas
Top
Post Reply

8 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic