Jump to content
funtoo forums
  • 0
Sign in to follow this  
znavko

How to get new kernel ?

Question

Hello! I emerged gentoo-sources to try if my Lenovo G50-30 will not freeze suddenly on it.

I do not know where get config for it. I used config from /usr/src/debian-sources dir - last saved config that I think is workable. Is it right?

It compiled, but there is no new kernel in /boot. What to do after compilatioon?

 

Share this post


Link to post
Share on other sites

40 answers to this question

Recommended Posts

  • 0
43 minutes ago, znavko said:

[ 6.097344] sda: p3 size 229984256 extends beyond EOD, enabling native capacity [ 6.098164] sda: sda1 sda2 sda3 [ 6.098250] sda: p3 size 229984256 extends beyond EOD, truncated

I think that your partition table is somehow corrupt (EOD = end of drive) so the partitions are created larger then the drive. I personally would start over from scratch wiping the drive (backing up data before).

Share this post


Link to post
Share on other sites
  • 0
# LC_ALL="en" fdisk /dev/sda1

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device /dev/sda1 already contains a ext2 signature.
The signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xba86f0bc.

Command (m for help): p
Disk /dev/sda1: 128 MiB, 134217728 bytes, 262144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xba86f0bc

Command (m for help): v
Remaining 262143 unallocated 512-byte sectors.

Command (m for help): q

I hope I have a possibility to write necessary partitions not crashing entire system.

Please, can I prepare disk using https://www.funtoo.org/Install#Prepare_Hard_Disk  with that difference that I will not empty partition table with 'o' choice in fdisk tool?

I will only create ext2: from 0 to 128M and swap to 2G. Will my sda3 rest after making this stuff?

Share this post


Link to post
Share on other sites
  • 0
30 minutes ago, znavko said:

LC_ALL="en" fdisk /dev/sda1

Don't use /dev/sda1, when you use fdisk you always use the disk. Otherwise your output will be wrong, so use LC_ALL="en" fdisk /dev/sda instead.

 

Share this post


Link to post
Share on other sites
  • 0
# LC_ALL="en" fdisk /dev/sda

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x462af8c6

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048    264191    262144   128M 83 Linux
/dev/sda2        264192   4458495   4194304     2G 82 Linux swap / Solaris
/dev/sda3       4458496 234442751 229984256 109.7G 83 Linux

Command (m for help): v
Total allocated sectors 234442752 greater than the maximum 234441648.

Command (m for help): ^Z

 

Share this post


Link to post
Share on other sites
  • 0
43 minutes ago, znavko said:

Total allocated sectors 234442752 greater than the maximum 234441648.

znavko, backup data and start fresh with wiping the partition table, if you can. I don't know how non-destructive it would be to delete partition 3 and recreate it and hope that the filesystem is going to recognize it and be happy about the change. My recommendation it to start from scratch. You have done probably some strange things while creating this partition table. There are tools to manipulate partitions like parted and gparted, but as I've said making a backup and starting again will probably take less time then running some operation on the disk to fix the errors and with unknown result.

Plan for znavko:

  1. backup data
  2. create new partition layout recreating the partitions from scratch
  3. copy data back
  4. done and happy

Share this post


Link to post
Share on other sites
  • 0

while I have my history and by the way workable system I paste what I did

''' delete all tmp data, like this large /var/tmp/portage/distfiles
# rm -rf /var/tmp
''' tar all my folder
# tar -cvpf funtoo-10-03-2018.tar.gz bin etc lib32 lib64 opt root run sbin srv usr var
''' archive is without compression, so gz is just automatic input by my hands
''' archive was 11 GB and did could not be copied with error by usb flsh Adata ch94)
''' i splitted (process was very long about 25 minutes)
# split -n 11 funtoo-10-03-2018.tar.gz funtoo-splitted-tar.gz.
''' i got splitted files and copied to usb flash
''' after that i rebooted into workable kernel and tar and copied /boot
# mount /dev/sda1 /boot
# tar -cvpf /root/boot.tar /boot
# cp /root/boot.tar /run/media/user/MYTOM

so now i go to fdisk all my disk, clearing what i have. see you later

Share this post


Link to post
Share on other sites
  • 0

No result achieved. Laptop does not boot from ssd after all.

What I did? I booted with systemrescuecd, deleted partitions, created partitions as it was, created filesystems as they were, mounted and untar with ownership and permissions my funtoo files and /boot files. unmount and reboot. Laptop says: PXE: no bootable device.

So i booted iin systemrescuecd again and can paste what I have:

root@sysresccd /root % fdisk -l /dev/sda        
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8d9a6437

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1            2048 134217728 134215681   64G 83 Linux
/dev/sda2       134219776 138414079   4194304    2G 82 Linux swap / Solaris
/dev/sda3       138414080 234441647  96027568 45.8G 83 Linux
root@sysresccd /root % mkdir /mnt/funtoo/boot -p
root@sysresccd /root % mount /dev/sda3 /mnt/funtoo
root@sysresccd /root % mount /dev/sda1 /mnt/funtoo/boot
root@sysresccd /root % ls /mnt/funtoo
bin   boot.tar  funtoo-arch  lib32  lost+found  root  sbin  usr
boot  etc       funtoo.tar   lib64  opt         run   srv   var
root@sysresccd /root % ls /mnt/funtoo/boot -la
total 46200
drwxr-xr-x  4 root root    4096 Mar  8 19:09 .
drwxr-xr-x 16 root root    4096 Mar 10 13:06 ..
drwxr-xr-x  6 root root    4096 Mar  9 21:54 grub
-rw-r--r--  1 root root 9287700 Feb 17 03:03 initramfs-debian-sources-x86_64-4.14.12-2
-rw-r--r--  1 root root 8003644 Dec 28  2016 initramfs-debian-sources-x86_64-4.8.15-1
-rw-r--r--  1 root root 3796608 Mar  9 02:51 initramfs-genkernel-x86_64-4.15.7-gentoo-r1
-rw-r--r--  1 root root       0 Feb 17 11:18 .keep_sys-apps_baselayout-0
-rw-r--r--  1 root root 5236496 Feb 17 01:14 kernel-debian-sources-x86_64-4.14.12-2
-rw-r--r--  1 root root 4322880 Dec 28  2016 kernel-debian-sources-x86_64-4.8.15-1
-rw-r--r--  1 root root 6640080 Mar  9 02:21 kernel-genkernel-x86_64-4.15.7-gentoo-r1
drwx------  2 root root    4096 Feb 16 16:53 lost+found
-rw-r--r--  1 root root  150024 Feb 17 07:01 memtest86.bin
-rw-r--r--  1 root root 3285399 Feb 17 01:14 System.map-debian-sources-x86_64-4.14.12-2
-rw-r--r--  1 root root 3368872 Dec 28  2016 System.map-debian-sources-x86_64-4.8.15-1
-rw-r--r--  1 root root 3090051 Mar  9 02:21 System.map-genkernel-x86_64-4.15.7-gentoo-r1

What is wrong?

Share this post


Link to post
Share on other sites
  • 0

yes. I installed grub and my system booted again.

But trouble is that it does not start services: xdm, wpa_supplicant. lsmod is showing too few modules, without wifi.

I even cannot mount usb, cause `fdisk -l` doesnot see flash and `mount /dev/sdb1 /mnt/usb` not gives effect

So I recompiled my kernel twice  but no effect.

what can I do ?

root@sysresccd /root % mkdir /mnt/funtoo
root@sysresccd /root % mount /dev/sda3 /mnt/funtoo
root@sysresccd /root % ls /mnt/funtoo
bin   boot.tar  etc      lib    lib64       mnt  proc  run   srv  tmp  var
boot  dev       fun.tar  lib32  lost+found  opt  root  sbin  sys  usr

is it possible recover absent stuff and how?

Share this post


Link to post
Share on other sites
  • 0

but `emerge -e @system` caused error installing lzo

...
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10-abi_x86_32.x86':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10-abi_x86_32.x86/config.log
 * ERROR: dev-libs/lzo-2.10::dev-kit failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  121:  Called src_configure
 *             environment, line 1387:  Called multilib-minimal_src_configure
 *             environment, line  883:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *             environment, line 1097:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line  813:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line  811:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *             environment, line  211:  Called multilib-minimal_abi_src_configure
 *             environment, line  877:  Called multilib_src_configure
 *             environment, line 1309:  Called econf '--enable-shared' '--disable-static'
 *        phase-helpers.sh, line  666:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/lzo-2.10::dev-kit'`,

what i need install for wlan atheros/qualcom drivers to boot into my system and reemerge everything?

maybe can portage download packages for emerge @system that i run them in my system?

Share this post


Link to post
Share on other sites
  • 0

I think the problem was I untar without 'p' flag.. Also can share this:

When I boot intoo gentoo-sources it booted into console without xdm, wlan drivers. But booted. After I recompiled gentoo-sources it did not booted - just first screen of boot log and then black screen (when usually log becomes in a smaller font). The same with debian-sources - before recompile it booted in console, but after recompile it gives black screen.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×