Tiny Core Base > Corepure64

Corepure64 Kernel : Bootup Failure after Recompiling with X2APIC

(1/2) > >>

abrahamrhoffman:
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

curaga:
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.

abrahamrhoffman:
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

abrahamrhoffman:
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

curaga:
Your original post shows the correct url?

Navigation

[0] Message Index

[#] Next page

Go to full version