pocopico / tinycore-redpill

GNU General Public License v3.0
2.16k stars 633 forks source link

support FreeBSD's bhyve hypervisor #253

Closed WanpengQian closed 1 year ago

WanpengQian commented 1 year ago

I am using FreeBSD 13.0 bhyve hypervisor. I can success boot tinycore redpill. tinycore-redpill verson is : tinycore-redpill-uefi.v0.9.4.3.img I am using following config as vm-bhyve config:

loader="grub"
cpu=4
memory=16G

network0_type="e1000"
network0_switch="lan"

ahci_device_limit="6"
disk0_type="ahci-hd"
disk0_name="disk0.img"
disk0_opts="sectorsize=512"
disk1_type="ahci-hd"
disk1_name="disk1.img"
disk1_opts="sectorsize=512"
disk2_type="ahci-hd"
disk2_name="disk2.img"
disk2_opts="sectorsize=512"
disk3_type="ahci-hd"
disk3_name="disk3.img"
disk3_opts="sectorsize=512"
disk4_type="ahci-hd"
disk4_name="disk4.img"
disk4_opts="sectorsize=512"
disk5_type="ahci-hd"
disk5_name="disk5.img"
disk5_opts="sectorsize=512"

grub_run_partition=3
grub_run0="linux /vmlinuz64 loglevel=3 cde waitusb=5 vga=791"
grub_run1="initrd /corepure64.gz"

uuid="d5e783fa-cc5c-11ed-807b-ac1f6bb4c10e"
network0_mac="58:9c:fc:02:51:e1"

actually it can boot. and stuck after generating SSH Key.

Setting hostname to box Done.
login[3978]: root login on 'tty1'
Generating public/private rsa key pair.
Your identification has been saved in /usr/local/etc/ssh/ssh_host_rsa_key
Your public key has been saved in /usr/local/etc/ssh/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:8TTad2zcKHAV5LsJvT4t3JDk5LUbCBMfukBPtuOQl2o root@box
The key's randomart image is:
+---[RSA 3072]----+
|             .+. |
|         . + +   |
|        o O B o  |
|         X & =o+.|
|        S O O=Xoo|
|         E + *=* |
|        .    .++o|
|             .+.o|
|              .o |
+----[SHA256]-----+
Generating public/private dsa key pair.
Your identification has been saved in /usr/local/etc/ssh/ssh_host_dsa_key
Your public key has been saved in /usr/local/etc/ssh/ssh_host_dsa_key.pub
The key fingerprint is:
SHA256:ZJx0G7TDxr1zecCKW5sulRCr0PpsTuztYDx2NgLnxVw root@box
The key's randomart image is:
+---[DSA 1024]----+
|        ..+      |
|       o =.= .   |
|       .= BoE o  |
|      .o.+o+ o o |
|      .oS.=.=.o .|
|      .*.. oo= . |
|       o@ =.o    |
|       =+B.o     |
|       oo.o..    |
+----[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /usr/local/etc/ssh/ssh_host_ecdsa_key
Your public key has been saved in /usr/local/etc/ssh/ssh_host_ecdsa_key.pub
The key fingerprint is:
SHA256:DbYec/qSXUd+nPnQSVaC0fBMlBUwjMpZ8lrIcoG5Rh4 root@box
The key's randomart image is:
+---[ECDSA 256]---+
|        o   =O++o|
|       E o o.== .|
|      o B O   o..|
|       * @ o  .o |
|      . S =  ooo+|
|       . *  . +++|
|        oo . . o.|
|        o..     .|
|         ..      |
+----[SHA256]-----+
Generating public/private ed25519 key pair.
Your identification has been saved in /usr/local/etc/ssh/ssh_host_ed25519_key
Your public key has been saved in /usr/local/etc/ssh/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:mlUPSzDmvpYRFWI85JUGRtIJqfEvG9yEERlzn26pjgA root@box
The key's randomart image is:
+--[ED25519 256]--+
|      *@%o+o     |
|    . +X=Bo.     |
|     + o+o*      |
|    . o..= =     |
|  E  . +S = .    |
|   .  ++o*       |
|    . o+=        |
|     ..+         |
|      . .        |
+----[SHA256]-----+
::::::::::: ::::::::  :::::::::  :::::::::   
    :+:    :+:    :+: :+:    :+: :+:    :+: 
    +:+    +:+        +:+    +:+ +:+    +:+ 
    +#+    +#+        +#++:++#:  +#++:++#+  
    +#+    +#+        +#+    +#+ +#+       
    #+#    #+#    #+# #+#    #+# #+#       
    ###     ########  ###    ### ###  TinyCore - RedPill 

=.

If I use Graphic/UFEI boot. it shows following error from UEFI console. Snipaste_2023-03-27_14-15-09

the vm-bhyve config is

loader="uefi"
graphics="yes"
cpu=4
memory=16G

network0_type="e1000"
network0_switch="lan"

ahci_device_limit="6"
disk0_type="ahci-hd"
disk0_name="disk0.img"
disk0_opts="sectorsize=512"
disk1_type="ahci-hd"
disk1_name="disk1.img"
disk1_opts="sectorsize=512"
disk2_type="ahci-hd"
disk2_name="disk2.img"
disk2_opts="sectorsize=512"
disk3_type="ahci-hd"
disk3_name="disk3.img"
disk3_opts="sectorsize=512"
disk4_type="ahci-hd"
disk4_name="disk4.img"
disk4_opts="sectorsize=512"
disk5_type="ahci-hd"
disk5_name="disk5.img"
disk5_opts="sectorsize=512"

I have try all img.(UEFI/NON-UFEI/VMDK), all same result.

WanpengQian commented 1 year ago

I have some updates. after check the DHCP server, I found it actually boots and works. I can ssh and build ds3617xs, download the pat file. but when I try to install DSM, it failed here: Snipaste_2023-03-27_17-27-41 Snipaste_2023-03-27_17-28-14

fdisk -l shows

DiskStation> fdisk -l
Disk /dev/synoboot: 1024 MB, 1073741824 bytes, 2097152 sectors
130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/synoboot1 *  0,32,33     6,62,56           2048     100351      98304 48.0M 83 Linux
/dev/synoboot2    6,62,57     15,205,62       100352     253951     153600 75.0M 83 Linux
/dev/synoboot3    15,205,63   130,138,8       253952    2097151    1843200  900M 83 Linux
Disk /dev/sdb: 80 GB, 85899345920 bytes, 167772160 sectors
10443 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdb1    0,130,3     1023,254,63       8192   16785407   16777216 8192M fd Linux raid autodetect
/dev/sdb2    1023,254,63 1023,254,63   16785408   20979711    4194304 2048M fd Linux raid autodetect
Disk /dev/sdc: 80 GB, 85899345920 bytes, 167772160 sectors
10443 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdc1    0,130,3     1023,254,63       8192   16785407   16777216 8192M fd Linux raid autodetect
/dev/sdc2    1023,254,63 1023,254,63   16785408   20979711    4194304 2048M fd Linux raid autodetect
Disk /dev/sde: 80 GB, 85899345920 bytes, 167772160 sectors
10443 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sde1    0,130,3     1023,254,63       8192   16785407   16777216 8192M fd Linux raid autodetect
/dev/sde2    1023,254,63 1023,254,63   16785408   20979711    4194304 2048M fd Linux raid autodetect
Disk /dev/sdf: 80 GB, 85899345920 bytes, 167772160 sectors
10443 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdf1    0,130,3     1023,254,63       8192   16785407   16777216 8192M fd Linux raid autodetect
/dev/sdf2    1023,254,63 1023,254,63   16785408   20979711    4194304 2048M fd Linux raid autodetect
Disk /dev/sdd: 80 GB, 85899345920 bytes, 167772160 sectors
10443 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdd1    0,130,3     1023,254,63       8192   16785407   16777216 8192M fd Linux raid autodetect
/dev/sdd2    1023,254,63 1023,254,63   16785408   20979711    4194304 2048M fd Linux raid autodetect
Disk /dev/md0: 8191 MB, 8589869056 bytes, 16777088 sectors
2097136 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 2047 MB, 2147418112 bytes, 4194176 sectors
524272 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md1 doesn't contain a valid partition table
pocopico commented 1 year ago

Please try latest version