[SOLVED] Slackware64-14.2 installed and FreeBSD installed with GRUB partition identifier in progress

Discussion in 'UDOO X86' started by stecolumna, Jul 1, 2017.

  1. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    Today I have successfully installed Slackware (slackware64-14.2-install-dvd.iso) with the xfce desktop in /dev/sbd/3 of SSD SATA disk in my Udoox86 Ultra. I have not created a "personal" GRUB but I have used the Debian GRUB installed in /dev/sda of M2 SSD. I have used the command <update-grub> and automatically has been identified Slackware's installation and created a menu item for Slackware.

    In the future I will study as generate a GRUB phisically written in the same disk of installation but for now it's difficult because I have also installed FreeBSD in ada1 of SATA SSD then I think may be a boot conflict.
    Now I have to discover the correct identifier for FreeBSD installation to modify etc/grub.d/40_custom and reuse update-grub of Debian to add another menu item for FreeBSD too.
    I have installed FreeBSD in the first partition of SATA SSD then /dev/sdb1 i.e. ada1 partition in FreeBSD terminology.
    I have used precedently in and old PC the following item of 40_custom:

    <CODE>

    menuentry 'Unix FreeBSD' {
    set root='(hd0,3)'
    chainloader +1
    }

    </CODE>

    But this code does not work. If you know wich is the exact hard disk partition nomenclature corresponding to that of FreeBSD please help me.

    Thanks in advance
     
  2. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Don't know if it is what you need, but lsblk outputs on my Ultra:
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    mmcblk0 179:0 0 29,1G 0 disk
    ├─mmcblk0p1 179:1 0 512M 0 part /boot/efi
    └─mmcblk0p2 179:2 0 28,6G 0 part /
    mmcblk0boot0 179:8 0 4M 1 disk
    mmcblk0boot1 179:16 0 4M 1 disk
    mmcblk0rpmb 179:24 0 4M 0 disk
     
  3. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    Dear Maurice

    this are the identifiers of internal EMMC. I need to know the identifiers of SATA disk in FreeBSD style.

    Thanks for your answer.
     
  4. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
  5. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
  6. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    I have understood that 11.0 version of FreeBSD have some issues during Udoox86 boot because the fan don't off during all the installation. Indeed with FreeBSD-11.1-RC2-amd64-memstick.img the fan correctly off at the end of the boot.
    I have installed this new version 11.1-RC2 and after the multiuser reboot with memstick I was able to mount the ada1s1a disk (SATA one).
    Gparted used from M2 disk with Debian correctly recognize UFS partition on SATA disk with boot option.

    Now I'm still searching the code to add to etc/grub.d/40_custom of the Ubuntu 17.04 GRUB that I have installed on the SATA disk or to the other Debian 9.01 GRUB installed on M2 disk.

    UPDATE: 09 July 2017
    I have successfully installed and booted FreeBSD-12.0-CURRENT-amd64-20170703-r320599-memstick.img on internal EMMC 32GB of Udoox86 Ultra. I have installed xorg and xfce4 but it was impossible to start xfce4. I don't know where is the problem.
     
    Last edited: Jul 9, 2017
  7. Benjamin

    Benjamin New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    7
    Have a look in /var/log/Xorg.0.log it might give some reason why xorg failed to start. FreeBSD 12-Current defaults to using the vesa xorg video driver so speed is quite slow. If you want to use the intel xorg driver you need to build a custom kernel off of the drm-next branch at: https://github.com/FreeBSDDesktop/freebsd-base-graphics and rebuild Mesa. That will give you hardware video playback (if you need it). In regards to grub, FreeBSD normally installs its boot loader to the mbr or first partition of the gpt table depending on what setup you selected. You might need to write it to the partition you are trying to boot instead to get grubs chainloader to work. See the EXAMPLES section in: man gpart for ways to install the bootloader manually.
     
  8. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33

    Dear Benjamin

    in effect I made three different installations: the 11.0 on the SATA disk (by I can't boot on it), the 12-Current in the internal EMMC 32GB (I can boot directly with FreeBSD bootloader and this is an MBR installation) and the 11.1-RC2 in the 64GB MicroSD (I can boot directly with FreeBSD bootloader and this ia a GPT installation). All 3 installation are in legacy mode.
    I'm not to your grade of preparation so I don't know how to rebuild a kernel but I have studied very much in the past the Xorg for a Debian xfce4 installation on an old notebook and PC so I can send you the Xorg.log of 11.2-RC2 64GB MicroSD installation.

    Thank you very much for your help.
     

    Attached Files:

  9. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    Solution for the boot of FreeBSD on MBR SATA disk:

    boot from a FreeBSD LiveCD memstick
    login as root

    <code>
    boot0cfg -B ada1
    </code>

    Now, booting directly from MBR SATA disk of Udoox86 I have the FreeBSD boot manager and I can regularly boot the FreeBSD installation.
    I can boot also the Slackware and Ubuntu installation on the same disk from the Debian GRUB installed on the M2 disk.

    This are the problems: the Ubunt GRUB has been overwritten. If I rebuild the Ubuntu GRUB from the Ubuntu installation of the MBR SATA disk this cancel the FreeBSD bootloader then I boot from the Debian GRUB installed on the M2 disk.
    Perhaps I have to reinstall FreeBSD on a GPT partition to obtain freebsd-boot slice but now I don't have the time for experiments

    Second problem:
    The X of FreeBSD don't start then I have only the shell

    However until now I have a Debian 9.0.1 xfce4, Ubuntu 17.04 and Slackware 14.2 running with xfce4 installations and a FreeBSD 11.02-RC2 with only the shell. A Unix and 3 Linux OS on the same PCB Udoox86 and I'm very satisfied.
     
  10. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    Perhaps it's useful to publish my 3 UdooX86 FreeBSD's dmesg.boot

    1) FreeBSD 11.1-RC2 #0 r320779 on SATA disk
    2) FreeBSD 12.0-CURRENT #0 r320599 on EMMC
    3) FreeBSD 11.1-RC2 #0 r320779 on 64GB MicroSD

    This 3 installations of FreeBSD run correctly but I have again some problems with X.
     

    Attached Files:

  11. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    Dear Benjamin

    I have worked to 3 FreeBSD installation on my UdooX86 Ultra.
    Now I publish my xorg.log of FreeBSD 12.0 amd64 on EMMC 32GB internal of UdooX86 Ultra.
    I don't understand why X start but give a black screen with a very small white vertical rectangle in upper left of the screen and give me this error after the Xserver stop:
    failed to set mtrr Invalid argument

    I add also X.org.log of MicroSD FreeBSD 11.1 RC_2 installation

    Thanks in advance
     

    Attached Files:

    Last edited: Aug 15, 2017
  12. Benjamin

    Benjamin New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    7
    Hi Stecolumna, looking at your FreeBSD12 xorg output, it's trying to use the vesa driver. You'll need to use the intel driver to get acceleration for the udoo. Your logs show that loading this driver fails:

    [ 1583.449] (II) LoadModule: "intel"
    [ 1583.451] (WW) Warning, couldn't open module intel
    [ 1583.452] (II) UnloadModule: "intel"
    [ 1583.452] (II) Unloading intel
    [ 1583.452] (EE) Failed to load module "intel" (module does not exist, 0)


    Make sure that you have:
    i915kms_load="YES"

    in:

    /boot/loader.conf

    This will load the intel kernel mode setting graphics driver at boot. When I built my 12-Current box I needed to build a kernel from the drm-next branch of https://github.com/FreeBSDDesktop/freebsd-base-graphics for the intel driver to detect the udoo . I don't know if this is still the case, I'm not sure if it's been merged into the main kernel yet. (To build the kernel see: https://github.com/FreeBSDDesktop/freebsd-base-graphics/wiki)

    Also how are you starting X? If your just using: X or Xorg at the command line you'll see a black screen by default.
    You'll then need to start some app. You might be better off doing: pkg install xinit
    Then running: startx
    This should at least put you in an xterm when X eventually does start. Also make sure you have the packages: xf86-input-mouse and xf86-input-keyboard installed as FreeBSD's evdev support isn't fully complete yet. If you don't install them you'll end up in xorg with no mouse and no keyboard.
     
    Last edited: Aug 17, 2017
    stecolumna likes this.
  13. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    Dear Benjamin
    Thanks to your detailed answer I have finally understood that my poor installation of FreeBSD don't have the proprietary firmware for Intel Graphics. With my Debian installations I have always used the "non free firmware" CDROM so the procedure was simple and painless. Now, with FreeBSD, according to your instructions (since the simple instruction i915kms_load="YES" is not sufficient) I will have to rebuild the OS kernel and it's the firs time for me. But your references are very detailed so I think studying I will do it.

    Very very thanks and best regards
     
  14. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    According to your PRECIOUS instructions and informations I have successfully builded and merged the kernel with drm-next git clone and now finally I have a X and xfce4 desktop at full HD.

    Thanks very very very much !
     
    waltervl likes this.
  15. stecolumna

    stecolumna UDOOer

    Joined:
    May 20, 2016
    Messages:
    146
    Likes Received:
    33
    jj_0 likes this.

Share This Page