Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#11412 - Fresh installation from package list has problem with missing /dev/null

Attached to Project: Arch Linux
Opened by Michael Towers (gradgrind) - Sunday, 07 September 2008, 09:53 GMT
Last edited by Aaron Griffin (phrakture) - Tuesday, 08 September 2009, 22:40 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Installing to an empty directory using 'pacman -r ...' with a list of packages (including the base group) results in the following problems for packages binutils and ca-certificates:

( 1/121) installing ncurses [#####################] 100%
( 2/121) installing readline [#####################] 100%
( 3/121) installing bash [#####################] 100%
( 4/121) installing kernel-headers [#####################] 100%
( 5/121) installing tzdata [#####################] 100%
( 6/121) installing glibc [#####################] 100%
( 7/121) installing attr [#####################] 100%
( 8/121) installing acl [#####################] 100%
( 9/121) installing binutils [#####################] 100%
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
/tmp/alpm_esalri/.INSTALL: line 6: /dev/null: No such file or directory
( 10/121) installing bzip2 [#####################] 100%
( 11/121) installing cracklib [#####################] 100%
( 12/121) installing gcc-libs [#####################] 100%
( 13/121) installing db [#####################] 100%
( 14/121) installing pam [#####################] 100%
( 15/121) installing shadow [#####################] 100%
( 16/121) installing coreutils [#####################] 100%
( 17/121) installing findutils [#####################] 100%
( 18/121) installing openssl [#####################] 100%
( 19/121) installing sed [#####################] 100%
( 20/121) installing run-parts [#####################] 100%
( 21/121) installing ca-certificates [#####################] 100%
Clearing symlinks in /etc/ssl/certs...done.
usr/sbin/update-ca-certificates: line 86: /dev/null: No such file or directory
Updating certificates in /etc/ssl/certs....( 22/121) installing cpio ( 22/121) installing cpio [#####################] 100%
( 23/121) installing device-mapper [#####################] 100%
...

/dev/null seems to be created only much later:

...
( 52/121) installing util-linux-ng [#####################] 100%
( 53/121) installing udev [#####################] 100%
creating device nodes: console null zero
( 54/121) installing initscripts [#####################] 100%


It is easy enough to work around this (create /dev/null before installing), but I guess this behaviour isn't intended, i.e. it is a bug.

This task depends upon

Closed by  Aaron Griffin (phrakture)
Tuesday, 08 September 2009, 22:40 GMT
Reason for closing:  Won't fix
Additional comments about closing:  It is generally expected to have requisites such as /dev, /sys, and /proc in a root dir before installing via pacman -r. See comments for more details
Comment by Pierre Schmitz (Pierre) - Sunday, 07 September 2008, 17:49 GMT
We should have a look at the dependencies of the base group. I had several problems when building the iso. Our goal should be a working pacman -S base. Dependencies to the filesystem package, coreutils, awk ettc. are often missing.
Comment by Roman Kyrylych (Romashka) - Sunday, 07 September 2008, 17:50 GMT
doh! .INSTALL-caused dependency again... :-(
/me remembers /bin/true in .INSTALL scrips...

Any ideas how to solve the issue in the best way? Or maybe this doesn't worth solving at all?
Comment by Aaron Griffin (phrakture) - Monday, 08 September 2008, 23:33 GMT
Does filesystem actually provide /dev/null though?
Comment by Pierre Schmitz (Pierre) - Sunday, 14 September 2008, 13:14 GMT
@Roman: of cousre we should fix this. We should check all packages in base which use an install script. This way we wouild get rid of adding workarounds to archiso. Remember: Some of those bugs don't show up everytime because pacman installs a group an alphabetical order if unsure.
Comment by Thomas Bächler (brain0) - Friday, 31 October 2008, 09:41 GMT
No, filesystem does not provide it, as that wouldn't work. /dev/null is created by some magic in the udev post-install: If /dev is the same filesystem as /, /dev/{null,console,zero} are created. If /dev is a different filesystem than /, we mount --bind / /some/temp/location/ and thus the underlying real /dev directory becomes visible, so we can create /some/temp/location/dev/{null,console,zero}. This is the only way to ensure that we always have /dev/console on the / filesystem when /sbin/init is launched.

I think this bug should be left unresolved:
1) It will be overly complex to solve
2) In the installer, we mount --bind /dev /mnt/dev (same for /proc and /sys) before we pacman -r /mnt (this is necessary for mkinitcpio to work properly)
3) If you are going to use pacman -r ... you either use the method described above or simply mknod null, zero and console on your new system. The latter might not be enough, as random, urandom and many more might be necessary, too, we can't really predict that.
Comment by Michael Towers (gradgrind) - Friday, 31 October 2008, 11:49 GMT
I can live with that, if it is too difficult to fix - for my purposes (larch) it is enough (at the moment!) to create /dev/null before starting the installation.

It would be helpful if the gist of Thomas' comment could be included in the man page (or at least the wiki).
Comment by Andreas Radke (AndyRTR) - Saturday, 05 September 2009, 10:08 GMT
state?
Comment by Allan McRae (Allan) - Saturday, 05 September 2009, 22:57 GMT
I guess this is a won't fix from Thomas' comment. I tend to agree. The packages are written expecting certain minimums of the filesystem and if they are not present it fails. In this case, our minimums seem acceptable and are difficult to provide otherwise.

Loading...