Bug 1014

Summary: detectloader doesn't skip CD-ROMs
Product: Sisyphus Reporter: Mikhail Zabaluev <mhz>
Component: bootloader-utilsAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: minor    
Priority: P4 CC: at, boyarsh, glebfm, ldv, mike, placeholder, sem, slazav, vitty, vsu, vt
Version: unstable   
Hardware: all   
OS: Linux   

Description Mikhail Zabaluev 2002-06-18 02:37:03 MSD
The detectloader script doesn\'t exclude CD-ROMs from bootloader search.

The following subroutine failed to exclude my CD-ROM:

sub read_partitions {
    my (undef, undef, @all) = cat_(\&quot;/proc/partitions\&quot;);
    grep {
        $_-&gt;{size} != 0x3fffffff # skip cdroms (otherwise stops cd-audios)
    } map { 
        my %l; 
        @l{qw(major minor size dev)} = split; 
        \\%l;
    } @all;
}

The CDROM\'s entry in /proc/partitions, with some iso9660 CD-ROM inserted, is as follows:
  22     0     166222 hdc 118 5762 23880 6210 0 0 0 0 65 2182210 15874111

---

---

Comment 1 Dmitry V. Levin 2004-06-03 20:15:15 MSD
Reassigned to maintainer.
Comment 2 Michael Shigorin 2006-09-27 21:19:45 MSD
Didn't stumble upon that.  Might be fixed?
Comment 3 Repository Robot 2009-09-16 18:13:52 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).