Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.hardware > #2756

Any Kernel Hackers in the house

From ruben safir <dont@email.me>
Newsgroups comp.os.linux.hardware
Subject Any Kernel Hackers in the house
Date 2015-03-21 08:24 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <mej9sq$evu$3@reader1.panix.com> (permalink)

Show all headers | View raw


Hello

I'm really struggling with compiling the kerne.  Actually installing it is the 
trouble.  Istead of rewriting everything I'm Copying this previous message here.

I am not understanding grub and initramfs at all at this point


On Tue, 17 Mar 2015 19:00:59 +0000, William Unruh wrote:

> I would advise you to install a distribution. and see what they do while
> you are installing it. Then make a prebuilt kernel. Then look into /boot
> and /boot/grub{,2} to see what files are there and esp the menu.lst and
> the grub.conf files.
> 
> Then read man grub or man grub2

I'm way past all this and very fustrated.  This has become another just
broken part of what was a usable system.  I can compile the kernel and
after that your on your own.  The installation has initramfs files for
each of its stock kernels with long tedious an incomprehendable 
configuration lines for each kernel.  There is no longer a mkinitrd. 
Instead I have documentation that goes on for 20 paragraphs and never
tells you how to actually make these initram files, nor does it say when
they are need.

They shouldn't BE needed, actually.  Somewhere in the compiled code,
evidently, there is a initram file that needs to be extracted out with a
versio of cpio.  Then after reading all of that, he recommends you go to
busy box to make a ram disk?

I'm like WTF. Did a 1000 penguins all jump off the wrong end of the pool
and hit their head on an iceburg?


https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt



The relevent part, I hope is this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What is initramfs?
------------------

All 2.6 Linux kernels contain a gzipped "cpio" format archive, which is
extracted into rootfs when the kernel boots up.  After extracting, the
kernel checks to see if rootfs contains a file "init", and if so it
executes it as PID 1.  If found, this init process is responsible for
bringing the system the rest of the way up, including locating and
mounting the real root device (if any).  If rootfs does not contain an
init program after the embedded cpio archive is extracted into it, the
kernel will fall through to the older code to locate and mount a root
partition, then exec some variant of /sbin/init out of that.

All this differs from the old initrd in several ways:

  - The old initrd was always a separate file, while the initramfs archive
  is
    linked into the linux kernel image.  (The directory linux-*/usr is
    devoted to generating this archive during the build.)

What is initramfs?
------------------

All 2.6 Linux kernels contain a gzipped "cpio" format archive, which is
extracted into rootfs when the kernel boots up.  After extracting, the
kernel checks to see if rootfs contains a file "init", and if so it
executes it as PID 1.  If found, this init process is responsible for
bringing the system the rest of the way up, including locating and
mounting the real root device (if any).
If rootfs does not contain an init program after the embedded cpio archive
is extracted into it, the kernel will fall through to the older code to
locate and mount a root partition, then exec some variant of /sbin/init
out of that.

All this differs from the old initrd in several ways:

  - The old initrd was always a separate file, while the initramfs archive
  is
linked into the linux kernel image.  (The directory linux-*/usr is devoted
to generating this archive during the build.)
~~~~~~~~~~~~~~~~~~~~~~


There is a whole bunch of problems though.  I compile the kernel.  I look
in to the boot directory and the initramfs are NOT internal to the
kernal...

[ruben@stat13 ~]$ cd /boot [ruben@stat13 boot]$ ls EFI                    
           initramfs-314-x86_64-fallback.img  linux310-x86_64.kver 
syslinux grub                               initramfs-314-x86_64.img      
    linux314-x86_64.kver  vmlinuz-310-x86_64
initramfs-310-x86_64-fallback.img  initramfs-319-x86_64-fallback.img 
linux319-x86_64.kver  vmlinuz-314-x86_64 initramfs-310-x86_64.img         
 initramfs-319-x86_64.img           memtest86+           
vmlinuz-319-x86_64

grub2 is incompreshensable as well:

#
# DO NOT EDIT THIS FILE #
# It is automatically generated by grub-mkconfig using templates # from
/etc/grub.d and settings from /etc/default/grub #

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt insmod part_msdos if [ -s $prefix/grubenv ]; then
  load_env
fi if [ "${next_entry}" ] ; then
   set default="${next_entry}" set next_entry=
   save_env next_entry set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry set prev_saved_entry=
  save_env prev_saved_entry set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga
    insmod video_bochs insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black set
menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else insmod part_msdos insmod reiserfs set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
else
  search --no-floppy --fs-uuid --set=root
  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale
  set lang=en_US insmod gettext
fi terminal_input console terminal_output gfxterm insmod part_msdos insmod
reiserfs set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
else
  search --no-floppy --fs-uuid --set=root
  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
fi insmod png background_image -m stretch /usr/share/grub/background.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu set timeout=5
# Fallback normal timeout code in case the timeout_style feature is #
unavailable.
else
  set timeout=5
fi ### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu
--class os $menuentry_id_option
'gnulinux-simple-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
	load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
	reiserfs set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
	  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
	  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
	else
	  search --no-floppy --fs-uuid --set=root
	  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
	fi echo	'Loading Linux 3.19.1-1-MANJARO x64 ...'
	linux	/boot/vmlinuz-319-x86_64
	root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
	resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
	'Loading initial ramdisk ...'
	initrd	 /boot/initramfs-319-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option
'gnulinux-advanced-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
	menuentry 'Manjaro Linux (Kernel: 3.19.1-1-MANJARO x64)' --class manjaro
	--class gnu-linux --class gnu --class os $menuentry_id_option
	'gnulinux-3.19.1-1-MANJARO
	x64-advanced-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
		load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
		reiserfs set root='hd0,msdos3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
		  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		else
		  search --no-floppy --fs-uuid --set=root
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		fi echo	'Loading Linux 3.19.1-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-319-x86_64
		root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
		resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
		'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-319-x86_64.img
	}
	menuentry 'Manjaro Linux (Kernel: 3.19.1-1-MANJARO x64 - fallback
	initramfs)' --class manjaro --class gnu-linux --class gnu --class os
	$menuentry_id_option 'gnulinux-3.19.1-1-MANJARO
	x64-fallback-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
		load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
		reiserfs set root='hd0,msdos3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
		  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		else
		  search --no-floppy --fs-uuid --set=root
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		fi echo	'Loading Linux 3.19.1-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-319-x86_64
		root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
		resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
		'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-319-x86_64-fallback.img
	}
	menuentry 'Manjaro Linux (Kernel: 3.14.27-1-MANJARO x64)' --class manjaro
	--class gnu-linux --class gnu --class os $menuentry_id_option
	'gnulinux-3.14.27-1-MANJARO
	x64-advanced-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
		load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
		reiserfs set root='hd0,msdos3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
		  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		else
		  search --no-floppy --fs-uuid --set=root
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		fi echo	'Loading Linux 3.14.27-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-314-x86_64
		root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
		resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
		'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-314-x86_64.img
	}
	menuentry 'Manjaro Linux (Kernel: 3.14.27-1-MANJARO x64 - fallback
	initramfs)' --class manjaro --class gnu-linux --class gnu --class os
	$menuentry_id_option 'gnulinux-3.14.27-1-MANJARO
	x64-fallback-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
		load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
		reiserfs set root='hd0,msdos3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
		  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		else
		  search --no-floppy --fs-uuid --set=root
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		fi echo	'Loading Linux 3.14.27-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-314-x86_64
		root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
		resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
		'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-314-x86_64-fallback.img
	}
	menuentry 'Manjaro Linux (Kernel: 3.10.63-1-MANJARO x64)' --class manjaro
	--class gnu-linux --class gnu --class os $menuentry_id_option
	'gnulinux-3.10.63-1-MANJARO
	x64-advanced-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
		load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
		reiserfs set root='hd0,msdos3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
		  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		else
		  search --no-floppy --fs-uuid --set=root
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		fi echo	'Loading Linux 3.10.63-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-310-x86_64
		root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
		resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
		'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-310-x86_64.img
	}
	menuentry 'Manjaro Linux (Kernel: 3.10.63-1-MANJARO x64 - fallback
	initramfs)' --class manjaro --class gnu-linux --class gnu --class os
	$menuentry_id_option 'gnulinux-3.10.63-1-MANJARO
	x64-fallback-22171af4-2b9c-4b5c-a53c-7cbb927f0a75' {
		load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod
		reiserfs set root='hd0,msdos3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3
		  --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		else
		  search --no-floppy --fs-uuid --set=root
		  22171af4-2b9c-4b5c-a53c-7cbb927f0a75
		fi echo	'Loading Linux 3.10.63-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-310-x86_64
		root=UUID=22171af4-2b9c-4b5c-a53c-7cbb927f0a75 rw   
		resume=/dev/disk/by-uuid/ee081d34-d809-4b6c-a57d-af1308eaaf6b echo
		'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-310-x86_64-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type
the # menu entries you want to add after this comment.  Be careful not to
change # the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi ### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu
    --class tool {
        search --fs-uuid --no-floppy --set=root --hint-bios=hd0,msdos3
        --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 
        22171af4-2b9c-4b5c-a53c-7cbb927f0a75 linux16
        /boot/memtest86+/memtest.bin
    }
fi ### END /etc/grub.d/60_memtest86+ ###
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`

Even after running the grub configurator it is not even finding my
compiled kernel

This is the /boot directly

[ruben@manjaro linux]$ ls -l /boot total 81464 drwxr-xr-x 2 root root    
4096 Dec 31  1969 efi drwxr-xr-x 3 root root     4096 Mar  7 23:42 EFI
drwxr-xr-x 7 root root     4096 Mar 21 03:51 grub -rw-r--r-- 1 root root
19189717 Mar 14 15:03 initramfs-318-x86_64-fallback.img -rw-r--r-- 1 root
root  4003774 Mar 14 15:03 initramfs-318-x86_64.img -rw-r--r-- 1 root root
19262363 Mar 15 03:21 initramfs-319-x86_64-fallback.img -rw-r--r-- 1 root
root  4004395 Mar 15 03:21 initramfs-319-x86_64.img -rw-r--r-- 1 root root
  663040 Feb  9 10:42 intel-ucode.img -rw-r--r-- 1 root root       21 Mar 
7 13:20 linux318-x86_64.kver -rw-r--r-- 1 root root       21 Mar  7 14:01
linux319-x86_64.kver drwx------ 2 root root    16384 Mar 14 13:58
lost+found drwxr-xr-x 2 root root     4096 Oct  6  2013 memtest86+
drwxr-xr-x 2 root root     4096 Oct 13 18:25 syslinux -rw-r--r-- 1 root
root  3112889 Mar 21 02:49 System.map -rw-r--r-- 1 root root 10914329 Mar
15 03:02 System.old -rw-r--r-- 1 root root  5974592 Mar 21 02:49 vmlinuz
<<-----------NEW KERNEL -rw-r--r-- 1 root root  4087776 Mar  7 13:20
vmlinuz-318-x86_64.NO -rw-r--r-- 1 root root  4146640 Mar  7 14:01
vmlinuz-319-x86_64 -rw-r--r-- 1 root root  7887376 Mar 15 03:02
vmlinuz.old

[ruben@manjaro linux]$ sudo grub-mkconfig -o /boot/grub/grub.cfg [sudo]
password for ruben:
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal
  scanning.
Found memtest86+ image: /boot/memtest86+/memtest.bin Found Intel Microcode
image Found linux image: /boot/vmlinuz-319-x86_64 Found initrd image:
/boot/initramfs-319-x86_64.img Found initrd fallback image:
/boot/initramfs-319-x86_64-fallback.img Found linux image:
/boot/vmlinuz-318-x86_64.NO done


It passed right over vmlinuz [ruben@manjaro linux]$ file /boot/vmlinuz
/boot/vmlinuz: Linux kernel x86 boot executable bzImage, version 3.19.2
(ruben@manjaro) #1 SMP Sat Mar 21 01:28:19 EDT 2015, RO-rootFS, swap_dev
0x5, Normal VGA


I'm at a complete dead end.  I was hoping that a kernel developer with a
few minutes would apear here, but evidently not.


Ruben

-- 
The Coin Hangout: http://www.coinhangout.com/home

Back to comp.os.linux.hardware | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Any Kernel Hackers in the house ruben safir <dont@email.me> - 2015-03-21 08:24 +0000
  Re: Any Kernel Hackers in the house ruben safir <dont@email.me> - 2015-03-21 16:21 +0000
  Re: Any Kernel Hackers in the house Aragorn <thorongil@telenet.be.invalid> - 2015-03-21 19:04 +0100
    Re: Any Kernel Hackers in the house Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2015-03-21 22:48 +0100
      Re: Any Kernel Hackers in the house ruben <ceo@iran.gov> - 2015-04-20 09:11 +0000
        Re: Any Kernel Hackers in the house Aragorn <thorongil@telenet.be.invalid> - 2015-04-20 14:49 +0200
          Re: Any Kernel Hackers in the house Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2015-04-22 00:40 +0200
            Re: Any Kernel Hackers in the house ruben safir <ruben@mrbrklyn.com> - 2015-04-22 05:38 -0400
              Re: Any Kernel Hackers in the house ruben safir <ruben@mrbrklyn.com> - 2015-04-22 05:39 -0400
    Re: Any Kernel Hackers in the house Baho Utot <baho-utot@columbus.rr.com> - 2015-03-21 17:52 -0400
      Re: Any Kernel Hackers in the house Aragorn <thorongil@telenet.be.invalid> - 2015-03-22 00:03 +0100
  Re: Any Kernel Hackers in the house Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2015-03-21 22:50 +0100
    Re: Any Kernel Hackers in the house ruben safir <ruben@mrbrklyn.com> - 2015-03-21 18:25 -0400
      Re: Any Kernel Hackers in the house Marc Haber <mh+usenetspam1118@zugschl.us> - 2015-03-22 10:51 +0100
    Re: Any Kernel Hackers in the house ruben <ceo@iran.gov> - 2015-04-20 09:18 +0000
  Re: Any Kernel Hackers in the house Richard Kettlewell <rjk@greenend.org.uk> - 2015-03-22 10:28 +0000
    Re: Any Kernel Hackers in the house ruben <ceo@iran.gov> - 2015-04-20 09:35 +0000
      Re: Any Kernel Hackers in the house Richard Kettlewell <rjk@greenend.org.uk> - 2015-04-20 10:37 +0100
        Re: Any Kernel Hackers in the house ruben safir <ruben@mrbrklyn.com> - 2015-04-20 09:36 -0400
          Re: Any Kernel Hackers in the house Richard Kettlewell <rjk@greenend.org.uk> - 2015-04-20 16:23 +0100
            Re: Any Kernel Hackers in the house ruben safir <ruben@mrbrklyn.com> - 2015-05-01 01:55 -0400
  Re: Any Kernel Hackers in the house Thomas Richter <thor@math.tu-berlin.de> - 2015-03-24 13:00 +0100
    Re: Any Kernel Hackers in the house ruben safir <dont@email.me> - 2015-03-25 02:54 +0000

csiph-web