Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Ubuntu/FreeBSD

  1. #1
    Join Date
    Dec 2014
    Beans
    46

    Ubuntu/FreeBSD

    Hi,
    I am not able to write a 40_custom file despite much reading.
    ( for example https://help.ubuntu.com/community/Grub2/CustomMenus).
    The FreeBSD kernel isn't loaded by /etc/grub.d/40_custom.

    Some information:
    $ uname -a
    Linux zety-SATELLITE-C70D-B 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    FreeBSD release: FreeBSD-12.2-RELEASE-amd64-dvd1.iso
    $ sudo fdisk -l /dev/sda
    Disque /dev/sda : 931,53 GiB, 1000204886016 octets, 1953525168 secteurs
    Disk model: TOSHIBA MQ01ABD1
    Unités : secteur de 1 × 512 = 512 octets
    Taille de secteur (logique / physique) : 512 octets / 512 octets
    taille d'E/S (minimale / optimale) : 512 octets / 512 octets

    Type d'étiquette de disque : gpt
    Identifiant de disque : EF15C24E-9779-49A5-863F-E111923F2391


    Périphérique Début Fin Secteurs Taille Type
    /dev/sda1 2048 1050623 1048576 512M Système EFI
    /dev/sda2 1050624 1543503871 1542453248 735,5G Système de fichiers Linux

    /dev/sda3 1543503872 1543913471 409600 200M Système EFI
    /dev/sda4 1543913472 1946157055 402243584 191,8G UFS FreeBSD
    /dev/sda5 1946157056 1953525134 7368079 3,5G Partition d'échange FreeBSD
    $ sudo blkid
    [sudo] Mot de passe de zety :
    /dev/sda2: UUID="78a9f048-e88d-4c2e-9c83-e0f8efb74c17" TYPE="ext4" PARTUUID="a75f3628-3530-4eb0-a70b-d5382d6b9e00"
    /dev/loop0: TYPE="squashfs"
    /dev/loop1: TYPE="squashfs"
    /dev/loop2: TYPE="squashfs"
    /dev/loop3: TYPE="squashfs"
    /dev/loop4: TYPE="squashfs"
    /dev/loop5: TYPE="squashfs"
    /dev/loop6: TYPE="squashfs"
    /dev/loop7: TYPE="squashfs"
    /dev/sda1: UUID="4D9D-7FE8" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="b344a956-bc2a-46e9-b2ef-4fe10bf85e01"
    /dev/sda3: SEC_TYPE="msdos" LABEL_FATBOOT="EFISYS" LABEL="EFISYS" UUID="BD41-11EE" TYPE="vfat" PARTUUID="20dc2407-715d-11eb-9846-008cfa86905a"
    /dev/sda4: UUID="602d7a3d46fa2dc1" TYPE="ufs" PARTUUID="2107172a-715d-11eb-9846-008cfa86905a"
    /dev/sda5: PARTUUID="210c0f68-715d-11eb-9846-008cfa86905a"
    FreeBSD installation information:
    Auto UFS
    /ada0p4 192GB freebsd-ufs /
    /ada0p5 3,5GB freebsd-swap none

    In advance thank you very much for your attention.
    Ciao

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ubuntu/FreeBSD

    Use sudoedit when editing system files.

    Is this a trick question?

    Don't know much about BSD. I usually just login as root on those systems via ssh. My BSD systems don't run any GUI.

  3. #3
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Ubuntu/FreeBSD

    1) You don't show what is in /etc/grub.d/40_custom
    2) I just put my customizations to /boot/grub/custom.cfg which is then read by /etc/grub.d/41_custom

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ubuntu/FreeBSD

    Quote Originally Posted by schragge View Post
    1) You don't show what is in /etc/grub.d/40_custom
    2) I just put my customizations to /boot/grub/custom.cfg which is then read by /etc/grub.d/41_custom
    I backup everything in /etc/.
    I never backup /boot/ - ever.
    Whenever modifying things, always consider the impacts to your backups.

  5. #5
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Ubuntu/FreeBSD

    I will ask the obvious question. Did you run

    Code:
    sudo update-grub
    You say this

    The FreeBSD kernel isn't loaded by /etc/grub.d/40_custom.
    Does FreeBSD appear in the Grub menu? Are you pointing Grub to the right partition? FreeBSD is on sda4. Grub wants that to be hd0,4. set root=(hd0,4)

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  6. #6
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,326

    Re: Ubuntu/FreeBSD

    BTW, I have always found OpenBSD easier to install than FreeBSD, and once they are working, there is not much of a difference.

  7. #7
    Join Date
    Dec 2014
    Beans
    46

    Re: Ubuntu/FreeBSD

    Hi,
    1-
    the command:
    Code:
    sudo update-grub
    displays FreeBSD in the Grub menu but that runs a error message.

    2-
    Gparted information says:
    /dev/sda3
    /dev/sda4
    /dev/sda5
    unmounted
    Périphérique Début Fin Secteurs Taille Type
    /dev/sda1 2048 1050623 1048576 512M Système EFI
    /dev/sda2 1050624 1543503871 1542453248 735,5G Système de fichiers Linux
    /dev/sda3 1543503872 1543913471 409600 200M Système EFI
    /dev/sda4 1543913472 1946157055 402243584 191,8G UFS FreeBSD
    /dev/sda5 1946157056 1953525134 7368079 3,5G Partition d'échange FreeBSD
    3-
    I tried several commands:
    HTML Code:
    # /dev/sda4: UUID="602d7a3d46fa2dc1" TYPE="ufs" PARTUUID="2107172a-715d-11eb-9846-008cfa86905a"
    sudo mount -t ufs -o rw -U 602d7a3d46fa2dc1 /boot
    ~$ sudo mount -t ufs -o rw -U 602d7a3d46fa2dc1 /boot
    mount: /boot: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
    
    $ sudo fdisk -l /dev/sda4
    [sudo] Mot de passe de zety : 
    Disque /dev/sda4 : 191,82 GiB, 205948715008 octets, 402243584 secteurs
    Unités : secteur de 1 × 512 = 512 octets
    Taille de secteur (logique / physique) : 512 octets / 512 octets
    taille d'E/S (minimale / optimale) : 512 octets / 512 octets
    
    $ dmesg | tail
                   
                   >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
    [  422.785064] ufs: ufs_fill_super(): bad magic number
    [ 2755.388657] ufs: ufs was compiled with read-only support, can't be mounted as read-write
    [ 2755.388766] ufs: You didn't specify the type of your ufs filesystem
                   
                   mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
                   
                   >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
    [ 2755.409913] ufs: ufs_fill_super(): bad magic number
    
    sudo mount -t ufs2 -o ro -U 602d7a3d46fa2dc1 /boot
    $ sudo mount -t ufs2 -o ro -U 602d7a3d46fa2dc1 /boot
    mount: /boot: type de système de fichiers « ufs2 » inconnu.
    
    sudo mount -t 44bsd -o ro -U 602d7a3d46fa2dc1 /boot
    $ sudo mount -t 44bsd -o ro -U 602d7a3d46fa2dc1 /boot
    mount: /boot: type de système de fichiers « 44bsd » inconnu.
    
    sudo mount -U 602d7a3d46fa2dc1 -t ufs /boot -o ro
    $ sudo mount -U 602d7a3d46fa2dc1 -t ufs /boot -o ro
    mount: /boot: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
    
    
    
    sudo mount /dev/sda4 /boot
    $ sudo mount /dev/sda4 /boot
    mount: /boot: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
    
    
    sudo mount /dev/sda4 /media
    $ sudo mount /dev/sda4 /media
    mount: /media: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
    
    
    
    
    
    
    sudo mount -t ufstype=ufs -o ro -U 602d7a3d46fa2dc1 /boot
    $ sudo mount -t ufstype=ufs -o ro -U 602d7a3d46fa2dc1 /boot
    mount: /boot: type de système de fichiers « ufstype=ufs » inconnu.
    
    
    sudo mount -t ufstype=old -o ro -U 602d7a3d46fa2dc1 /boot
    sudo mount -t ufstype=old -o ro -U 602d7a3d46fa2dc1 /boot
    mount: /boot: type de système de fichiers « ufstype=old » inconnu.
    zety@zety-SATELLITE-C70D-B:/boot$ sudo mount -t old -o ro -U 602d7a3d46fa2dc1 /boot
    mount: /boot: type de système de fichiers « old » inconnu.
    
    
    sudo mount -t ufs -o  ufstype=ufs -o ro -U 602d7a3d46fa2dc1 /boot
    [sudo] Mot de passe de zety : 
    mount: /boot: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
    4-
    As you can see I lacks a firm grasp of the subject,

    Ciao

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ubuntu/FreeBSD

    Code tags, please: https://ubuntuforums.org/misc.php?do=bbcode#code Outputs with columns are difficult to read, especially when not in a language we know.

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ubuntu/FreeBSD

    I see two ESP - efi system partitions. You have sda1 & sda3 as ESP.
    Most systems will only work with one ESP. Some have used a second FAT32 partition to hold boot files.
    UEFI will not directly boot from a FAT32 partition, but grub may find & use the files in it to boot.

    Best to only have one ESP. Normally all installed systems share that one ESP with different folders for their boot.
    And then UEFI refers to that one ESP to find boot files.

    You may need to reinstall boot loader. Do not know BSD's and how they do UEFI.
    You can also post this from Ubuntu to see what partition by GUID/partUUID & files it uses to boot.
    sudo efibootmgr -v
    lsblk -o name,mountpoint,label,size,fstype,uuid,partuuid | egrep -v "^loop"
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #10
    Join Date
    Dec 2014
    Beans
    46

    Re: Ubuntu/FreeBSD

    Hi,
    Here are the requested information:
    Code:
    $ sudo efibootmgr -v
    [sudo] Mot de passe de zety : 
    BootCurrent: 0000
    Timeout: 0 seconds
    BootOrder: 0000,0001,2003,2001,2002
    Boot0000* ubuntu    HD(1,GPT,b344a956-bc2a-46e9-b2ef-4fe10bf85e01,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
    Boot0001* EFI HDD Device (TOSHIBA MQ01ABD100)    PciRoot(0x0)/Pci(0x11,0x0)/Ata(0,0,0)/HD(3,GPT,20dc2407-715d-11eb-9846-008cfa86905a,0x5c000000,0x64000)RC
    Boot0002* Realtek PXE    PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)/MAC(008cfa86905a,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
    Boot0003* Realtek PXE    PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)/MAC(008cfa86905a,0)/IPv6([::]:<->[::]:,0,0)RC
    Boot2001* EFI USB Device    RC
    Boot2002* EFI DVD/CDROM    RC
    Boot2003* EFI Network    RC
    Code:
    $ lsblk -o name,mountpoint,label,size,fstype,uuid,partuuid | egrep -v "^loop" 
    NAME   MOUNTPOINT                   LABEL    SIZE FSTYPE   UUID                                 PARTUUID
    sda                                        931,5G                                               
    ├─sda1 /boot/efi                             512M vfat     4D9D-7FE8                            b344a956-bc2a-46e9-b2ef-4fe10bf85e01
    ├─sda2 /                                   735,5G ext4     78a9f048-e88d-4c2e-9c83-e0f8efb74c17 a75f3628-3530-4eb0-a70b-d5382d6b9e00
    ├─sda3                              EFISYS   200M vfat     BD41-11EE                            20dc2407-715d-11eb-9846-008cfa86905a
    ├─sda4                                     191,8G ufs      602d7a3d46fa2dc1                     2107172a-715d-11eb-9846-008cfa86905a
    └─sda5                                       3,5G                                               210c0f68-715d-11eb-9846-008cfa86905a
    sr0                                         1024M
    The report is available at:
    http://paste.ubuntu.com/p/PWCnF2Njgz/

    Boot-Repair suggests:
    Suggested repair: __________________________________________________ ____________

    The default repair of the Boot-Repair utility would reinstall the grub-efi-amd64-signed of
    sda2,
    using the following options: sda1/boot/efi,
    Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

    Final advice in case of suggested repair: ______________________________________


    Please do not forget to make your UEFI firmware boot on the Ubuntu 20.04.2 LTS entry (sda1/efi/****/shim****.efi (**** will be updated in the final message) file) !
    I need some advice.
    The repair option of Boot Repair (Recommended repair) is it effective?
    Ciao :

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •