Bug 1015 - detectloader misdetects the loader in some circumstances
Summary: detectloader misdetects the loader in some circumstances
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: bootloader-utils (show other bugs)
Version: unstable
Hardware: all Linux
: P4 major
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 7371
  Show dependency tree
 
Reported: 2002-06-18 02:46 MSD by Mikhail Zabaluev
Modified: 2009-09-16 17:31 MSD (History)
16 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Zabaluev 2002-06-18 02:46:22 MSD
In this loop:

    foreach (@disks) {
        $loader = typeOfMBR($_) and return $loader;
    }

The @disks list is not sorted by device name. This can lead to, e.g., /dev/hdd checked before /dev/hda. My /dev/hdd (my old drive) hosts LILO, and this is what detectloader finds first. This resulted in a hosed system when I have updated grub on my system which resides in /dev/hda.
---

---

Comment 1 Mikhail Zabaluev 2002-06-18 03:14:07 MSD
I hereby propose a solution.
Make detectloader accept the optional device parameter, as a pathname or in
Grub format. Having this parameter specified, detectloader restricts probes to this device. The install scripts for Grub and Lilo should then determine target device from their respective configuration files.
Comment 2 Mikhail Zabaluev 2002-06-18 03:14:07 MSD
I hereby propose a solution.
Make detectloader accept the optional device parameter, as a pathname or in
Grub format. Having this parameter specified, detectloader restricts probes to this device. The install scripts for Grub and Lilo should then determine target device from their respective configuration files.
Comment 3 inger@altlinux.org 2003-01-15 18:31:01 MSK
добавлен skiplist
Comment 4 inger@altlinux.org 2003-01-15 18:31:01 MSK
добавлен skiplist
Comment 5 Sergey Vlasov 2003-10-18 21:57:33 MSD
1) skiplist - это не решение. Невозможно перечислить все места, где не надо
искать загрузчик - после подключения USB flash и прочих подобных устройств тоже
появляются записи в /proc/partitions. Должно быть ещё средство для явного
указания списка устройств.

2) Всё это должно быть документировано - запись "skiplist for mhz" в %changelog
пакета никак не может считаться документацией.
Comment 6 Dmitry V. Levin 2004-06-03 20:16:21 MSD
Reassigned to maintainer.
Comment 7 Anton Farygin 2006-02-09 16:49:03 MSK
Неужто нельзя прочитать существующие конфиги, посмотреть где там у них должен
быть bootloader и уже там искать ?
Comment 8 Michael Shigorin 2009-08-14 18:11:09 MSD
Мужики, подсобите?
Comment 9 Repository Robot 2009-09-16 17:31:02 MSD
bootloader-utils-0.4.1-alt1 -> sisyphus:

* Wed Sep 16 2009 Vladislav Zavjalov <slazav@altlinux> 0.4.1-alt1

- installkernel:
  - change lilo restarting logic (closes #1014, #1015, #20695):
    old behaviour: restart lilo if first bootloader found in
      devices from /proc/partitions is lilo
    new one: restart lilo when lilo bootloader is found in
      device from boot= setting in lilo.conf
  - when detectliloboot.sh fails to find device, there are no
    need to run detectloader.sh (thx Dmitry V. Levin)
      (closes: #21106)
  - suppress unwanted output from cd -
- detectloader: replace by two shell scripts:
    detectliloboot.sh -- to get boot device from lilo.conf
    detectloader.sh -- to get bootloader type on the given device or file
- bootloader_utils.pm:
  - (getroot): recognize UUID and LABEL
      (thx Dmitry V. Levin) (closes: #2194, #18127)
  - remove unused functions (partitions, typeOfMBR) used in
      removed detectloader program
- rebootin
  - remove GRUB support
  - fix working with quoted labels in lilo.conf (closes: #11446).
  - cleanup code, improve error and help messages
  - add long options, add -l option for listing available labels.
  - update manpage
- remove URL and Packager tags (thx Dmitry V. Levin).