WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC  (Read 4182 times)

Offline abrahamrhoffman

  • Newbie
  • *
  • Posts: 5
Runs in Corepure64.ISO VM on Virtualbox without issue. When I attempt to boot it on Supermicro X10 hardware, it was giving me an X2APIC error [https://imgur.com/a/CFAkOgV]. So I recompiled the kernel with the below steps:

## Manually Compile
1. Download the tinycore patched kernel and kernel config:
```
wget distro.ibiblio.org/tinycorelinux/9.x/x86_64/release/src/kernel/config-4.14.10-tinycore64
wget distro.ibiblio.org/tinycorelinux/9.x/x86_64/release/src/kernel/linux-4.14.10-patched.txz
```
2. Unpack the Kernel `tar -Jxf linux-4.14.10-patched.txz -C /tmp/my-folder`
3. Move the kernel config `mv config-4.14.10-tinycore64 /tmp/my-folder/linux-4.14.10/.config`
4. `make oldconfig`
5. `make menuconfig` add only X2APIC support
6. `make bzImage` to build the kernel itself, stored at -> arch/x86/boot/bzImage

## Remaster ISO
1. mount Corepure64.iso /mnt/tmp -o loop,ro
2. cp -a /mnt/tmp/boot /tmp/tinycore
3. Move bzImage from "Manually compile" (arch/x86/boot/bzImage) step above to boot/vmlinuz64
4. mkdir newiso
    mv boot newiso
    mkisofs -l -J -R -V TC-custom -no-emul-boot \
                                -boot-load-size 4 \
                                -boot-info-table \
                                -b boot/isolinux/isolinux.bin \
                                -c boot/isolinux/boot.cat \
                                -o remaster.iso newiso &> /dev/null

Now isolinux can't find the kernel and when I specify it: "boot: /boot/vmlinuz64", I get an invalid or corrupt error. Weirdly, the exact same kernel works inside my VM on Virtualbox, just not on the SuperMicro X10 hardware.

I need to get the compilation working for my job where I will be deploying this ISO to thousands of physical servers.

Could totally use some help!

Thank you,

Abe Hoffman
« Last Edit: June 15, 2018, 05:17:46 PM by abrahamrhoffman »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC
« Reply #1 on: June 16, 2018, 01:53:52 AM »
Looks like something went wrong in your .iso generation then. Examine the resulting iso with the usual tools (isoinfo, etc), compare to ours. One possibility is if your host system uses the "bad" cdrtools replacement instead of the genuine cdrtools, as the replacement is known to have (had?) some bugs, but mkisofs even from there should generate a basic iso properly.
The only barriers that can stop you are the ones you create yourself.

Offline abrahamrhoffman

  • Newbie
  • *
  • Posts: 5
Re: Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC
« Reply #2 on: June 17, 2018, 02:01:32 AM »
I appreciate the suggestions. Unfortunately, still not working. Confirmed I am using the genuine `cdrtools`.

Built the kernel again with only x2apic added and injected only the bzImage file -> vmlinux64.

Importantly, the exact same image boots on VirtualBox without issue. Only when booting on the Supermicro does it give the kernel error.

Virtualbox: [https://i.imgur.com/5xzzkSk.png]
Supermicro X10: [https://i.imgur.com/VBGXLbs.png]

# Stock Corepure64 ISO
$ isoinfo -d -i CorePure64-current.iso
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: CorePure64
Volume set id:
Publisher id:
Data preparer id:
Application id: MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 7181
El Torito VD version 1 found, boot catalog is in sector 36

Joliet with UCS level 3 found.
SUSP signatures version 1 found
Rock Ridge signatures version 1 found
Rock Ridge id 'RRIP_1991A'
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Cksum AA 55 OK
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 25 37

# After injecting recompiled kernel with X2APIC flag:
$ isoinfo -d -i CorePure64-current.iso
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: TC-custom
Volume set id:
Publisher id:
Data preparer id:
Application id: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 7183
El Torito VD version 1 found, boot catalog is in sector 36
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 25 37

$ diff a b
3c3
< Volume id: CorePure64
---
> Volume id: TC-custom
7c7
< Application id: MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
---
> Application id: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
14c14
< Volume size is: 7181
---
> Volume size is: 7183

« Last Edit: June 17, 2018, 02:07:57 AM by abrahamrhoffman »

Offline abrahamrhoffman

  • Newbie
  • *
  • Posts: 5
Re: Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC
« Reply #3 on: June 18, 2018, 12:38:02 AM »
It's nice to have the forum to express my frustrations! I fixed it. I needed to ensure I was downloading the proper patched kernel version with the kernel I was running in the ISO. Once I aligned those two, Virtualbox showed a nice error, and the kernel and initramfs loaded without issues on the Supermicro hardrware. Good lesson in remaining detailed, especially during the kernel compilation process.

Virtualbox Error: [https://i.imgur.com/ojvlSaM.png]
Supermicro Working: [https://i.imgur.com/klSgf4w.png]

Cheers,

Abe

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC
« Reply #4 on: June 18, 2018, 12:38:29 PM »
Your original post shows the correct url?
The only barriers that can stop you are the ones you create yourself.

Offline abrahamrhoffman

  • Newbie
  • *
  • Posts: 5
Re: Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC
« Reply #5 on: June 18, 2018, 01:39:40 PM »
Your original post shows the correct url?
Yes, however I had been testing with the 32bit kernel prior to using 64bit. I made an error during `mv` that caused the 32bit kernel to be used during the make process. What confused it was, first that mistake, then the fact that I enabled 64bit support in the 32bit `make menuconfig`. Once I got the proper versions in place, I was able to boot properly.

Sent from my SM-G960U using Tapatalk