[Bug 432254] Re: *BSD not detected by os-prober

Andrey Gavrilin 432254 at bugs.launchpad.net
Mon Oct 3 11:23:33 UTC 2011


I did it.

50mouted-tests:

		if [ "$type" = ufs ]; then
			for ufstype in ufs2 44bsd; do
				if mount -o ro,ufstype=$ufstype -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
					mounted=1
					break
				fi
			done
		else
			if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
				mounted=1
			fi
		fi

50linux-distro:

known_distro=(

90bsd-distro:

if [ "$type" = ufs ]; then
  pattern_disk='([[:alpha:][:punct:]]+)[[:digit:]]+'
  pattern_system="$partition[[:blank:]]+\*[[:blank:]]+.+[[:blank:]]+(.+)BSD"

  system=

  if [[ "$partition" =~ $pattern_disk ]]; then
    disk="${BASH_REMATCH[1]}"

    while read line; do
      if [[ "$line" =~ $pattern_system ]]; then
        system="${BASH_REMATCH[1]}BSD"
        break
      fi
    done< <( fdisk -l $disk )
  fi

  if [ ! -z $system ]; then
    if [ -f $dir/etc/motd ]; then
      pattern_version=

      case $system in
      FreeBSD | NetBSD | OpenBSD) pattern_version="$system[[:blank:]]+([[:graph:]]+)[[:blank:]]+(\([[:graph:]]+\))"
                                  ;;
      esac

      title="$system"

      if [ ! -z $pattern_version ]; then
        while read line; do
          if [[ "$line" =~ $pattern_version ]]; then
            title="$system ${BASH_REMATCH[1]} ${BASH_REMATCH[2]}"
            break
          fi
        done< <( cat $dir/etc/motd )
      fi
    fi

    label="$(count_next_label "$system")"
    echo "$partition:$title:$label:chain"

    exit 0
  else
    exit 1
  fi
else
  exit 1
fi

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to os-prober in Ubuntu.
https://bugs.launchpad.net/bugs/432254

Title:
  *BSD not detected by os-prober

Status in Bootloader Manager for Ubuntu:
  Invalid
Status in “os-prober” package in Ubuntu:
  Triaged

Bug description:
  Binary package hint: os-prober

  I have a multiboot system with Windows XP, Ubuntu 9.10 alpha, and
  FreeBSD 7.2 installed. After Karmic Alpha-4 (upgrading with apt-get up
  to the time of the bug report) installing with Grub 2 in the MBR, the
  FreeBSD partition is not recognized.

  Some system information:
  DISTRIB_ID=Ubuntu
  DISTRIB_RELEASE=9.10
  DISTRIB_CODENAME=karmic
  DISTRIB_DESCRIPTION="Ubuntu karmic (development branch)"
  Linux lightning 2.6.31-10-generic #34-Ubuntu SMP Wed Sep 16 00:23:19 UTC 2009 i686 GNU/Linux
  model name	: VIA Samuel 2
  cpu MHz		: 798.000

  General disk layout:

  /dev/sda1 - Windows XP
  /dev/sda2 - Ubuntu /boot partition
  /dev/sda3 -  FreeBSD 'slice' containing all BSD partitions
  /dev/sda4 - subdivided into remaining partitions for Ubuntu

  Previously (with Ubuntu 9.04 and Grub 1) the booting worked well for
  all 3 OSes.

  There is an old Windows 95 drive on /dev/sdb - the OS on that is
  detected by os-prober. Currently, running os-prober gives me the
  results:

  root at lightning:~# os-prober
  /dev/sda1:Microsoft Windows XP Professional:Windows:chain
  /dev/sdb1:Windows NT/2000/XP:Windows1:chain
  root at lightning:~# 

  On a similar system runing XP, Ubuntu 9.04, and FreeBSD, the (Grub 1)
  menu.lst stanza for FreeBSD 7.1 is

  # Choice 0: use 1st BSD subpartition in disk 1 partition 3
  title FreeBSD 7.1
    root (hd0,2,a)
    kernel /boot/loader

  ProblemType: Bug
  Architecture: i386
  Date: Thu Sep 17 21:13:00 2009
  DistroRelease: Ubuntu 9.10
  Package: os-prober 1.33
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcVersionSignature: Ubuntu 2.6.31-10.34-generic
  SourcePackage: os-prober
  Uname: Linux 2.6.31-10-generic i686

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-bootloader-manager/+bug/432254/+subscriptions




More information about the foundations-bugs mailing list