[Bug 658140] Re: Isadora install to /dev/sdb1 gives wrong grub setup

eexo 658140 at bugs.launchpad.net
Thu Mar 28 10:03:27 UTC 2013


Same problem here.
It seems to be caused by linux-boot-prober:
# linux-boot-prober /dev/sdb1
/dev/sdb1:/dev/sdb1:Linux Mint 14 MATE 32-bit, 3.4.34-030434-i7 (/dev/sda3):/boot/vmlinuz-3.4.34-030434-i7:/boot/initrd.img-3.4.34-030434-i7:root=UUID=ce078971-fdfb-4b0f-aaa8-728dc9b2f83b ro crashkernel=384M-2G:64M,2G-:128M quiet splash $vt_handoff

while blkid shows:
# blkid
/dev/sda3: UUID="ce078971-fdfb-4b0f-aaa8-728dc9b2f83b" TYPE="ext4" 
/dev/sdb1: UUID="a1849561-5dae-4680-b989-8651e05fe1eb" TYPE="ext4" 

i.e it puts wrong "root=".

The code below works it around, insert at approriate place in
/etc/grub.d/30_os_prober:

    linux)
      LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
      prepare_boot_cache=
      boot_device_id=
      is_first_entry=true
      title_correction_code=
      OS="${LONGNAME}"

      for LINUX in ${LINUXPROBED} ; do
        LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
        LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
        LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
        LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
        LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
        LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' ' | sed -e 's/root=[^ ]*//;'`"

        if [ -z "${LLABEL}" ] ; then
          LLABEL="${LONGNAME}"
        fi

        if [ "${LROOT}" != "${LBOOT}" ]; then
          LKERNEL="${LKERNEL#/boot}"
          LINITRD="${LINITRD#/boot}"
        fi

        if [ -z "${prepare_boot_cache}" ]; then
          prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
          [ "${prepare_boot_cache}" ] || continue
        fi

        found_other_os=1
        onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
        if [ -z "$boot_device_id" ]; then
            boot_device_id="$(grub_get_device_id "${DEVICE}")"
        fi
        LPARAMS="root=$boot_device_id ${LPARAMS}"

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

Title:
  Isadora install to /dev/sdb1 gives wrong grub setup

Status in The Linux Mint Distribution:
  Triaged
Status in Ubiquity:
  Invalid
Status in “ubiquity” package in Ubuntu:
  Incomplete

Bug description:
  During install of Isadora (LXDE 32 bit download .iso image) it asks you if it should create a boot loader on /dev/sda
  I said NO. I have a boot loader there already, and also a dual boot setup that I would have a hard time recreating.

  Isadora then creates a /boot/grub/grub.cfg file on /dev/sdb1 that refers to /dev/sda1 and also has UUID's in the menu entry
  that do not exist on my machine.

  When I reboot into Ubuntu and run sudo update-grub, the new grub.cfg
  on /dev/sda1 picks up the linux Mint 9 entries, but it copies the info
  from the file that Isadora made, and hence the menus are wrong.

  When I try to boot isadora, it exits to busybox saying it cannot find
  the disk with the UUID isadora has created.

  I have to manually edit the grub.cfg file to fill in the correct
  UUID's.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linuxmint/+bug/658140/+subscriptions




More information about the foundations-bugs mailing list