FS#18585 - [mkinitcpio] Silent error message: No medium found in autodetect hook

Attached to Project: Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Saturday, 06 March 2010, 22:03 GMT
Last edited by Thomas Bächler (brain0) - Saturday, 12 February 2011, 02:01 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

New blkid from util-linux-ng-2.17.1 show error messages from removable devices without medium on it, like cdrom or 4-in-1 readers.

Additional info:
mkinitcpio-0.6.3-1
util-linux-ng-2.17.1-1
This task depends upon

Closed by  Thomas Bächler (brain0)
Saturday, 12 February 2011, 02:01 GMT
Reason for closing:  Fixed
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 07 March 2010, 00:31 GMT
Change how autodetect hook lookup for filesystems

In this way, remove eval hacks and enviroments vars, just use blkid
syntax.
I guess in this way will fix/hide "command not found" when fstype
is not property setup in fs, reported by some users.
Comment by Thomas Bächler (brain0) - Sunday, 07 March 2010, 00:55 GMT
The last patch didn't work for me, it was my first idea though: The "-p" option of blkid doesn't work with many other options - it ignores -o value entirely, among other things. If this changed in some recent version, I am willing to apply this.

About the rest: I am against silencing errors. We should rather exclude removable devices from autodetection entirely.
Comment by Thomas Bächler (brain0) - Sunday, 07 March 2010, 00:56 GMT
Addendum: WWWWOOOOOOWWWWW, they fixed -o value with -p (I just tested it). This is in fact very good news.
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 07 March 2010, 01:18 GMT
-o value with -p works for me in util-linux-ng-2.17 and 2.17.1, maybe was an issue in 2.16.2?

about silent errors and removable media: yes, should remove sr0 and others. But require a better scan than a simple find -type b | exclude...
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 08 March 2010, 01:57 GMT
Maybe can be wrong, but can be lookup at /sys/block/XXX/removable to see if removable device. Maybe if device is not removable but reported as removable, this will be wrong. (I just guessing)

Unrelated change (but is around these lines): I guess function findfs should be renamed, there is a command findfs part of util-linux-ng. (to avoid confusion)
Comment by Roman Kyrylych (Romashka) - Monday, 03 May 2010, 22:13 GMT
Why should we exclude removable media from autodetect?
How about live Arch installation on a USB stick?
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 04 May 2010, 22:01 GMT
(1.a) For example initramfs generated from installation on the target machine, will also include modules unneeded for booting the target machine (cd-rom, udf, ...)
(1.a) Generating the initramfs image from an existing installation with removable media inserted, result in a initramfs image with modules needed for access to these removables mediums. (usb*, cd-rom, vfat, ...)

(2) If you are talking about archiso, scanning for removable media is unrelated on mkinitcpio step. There is no relation between scanning what removable mediums are on the machine that generates the archiso, and what modules will be on initramfs for archiso. (archiso does not use autodetect hook)
Comment by Roman Kyrylych (Romashka) - Wednesday, 05 May 2010, 06:55 GMT
I am not talking about archiso.
What if I run my system from a USB drive (in a normal read-write mode) _and_ update the kernel on that system, so initramfs image is regenerated and the system should still be able to boot (i.e. the modules for USB should be included).
The right solution is to look what device has / on it (which may be removable device), and ignore all other devices.

Loading...