[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#307471: marked as done (initrd-tools: wish init would not run mount_root if rootdev=255 (ie nfs root).)



Your message dated Mon, 05 May 2008 10:23:24 +0200
with message-id <1209975804.931671.28737.nullmailer@xanadu.blop.info>
and subject line initrd-tools has been removed from Debian, closing #307471
has caused the Debian Bug report #307471,
regarding initrd-tools: wish init would not run mount_root if rootdev=255 (ie nfs root).
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
307471: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=307471
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initrd-tools
Version: 0.1.78
Severity: wishlist
Tags: patch

Debian now has NSFroot network booting with initrd support thanks to the 
combination of initrd-tools and initrd-netboot-tools.

However this combination seems to work more by luck than design!
When booting a Linux kernel for NFSroot one needs to rdev the kernel 
with device code major=0 minor=255 or pass the command line argument 
root=/dev/nfs. The upshot of either of these is that the kernel 
real-root-dev (/proc/sys/kernel/real-root-dev) ends up being "255".

initrd-tools:/sbin/init script calls the scipts in the initrd:/scripts/ 
directory inturn... this is where initrd-netboot-tools places scripts to 
mount the NFSroot on /mnt. After that initrd-tools:/sbin/init  contains 
the stanza:
if [ $rootdev != 256 ]; then
        mount_root
        cd mnt
        [ $DEVFS ] && mount -nt devfs devfs dev
        pivot_root . initrd
fi

This stanza is run for the NFSroot case as rootdev=255.
By calling the mount_root function the get_device and mount_device 
functions are in turn called. The mount device function than tries to 
mount the block device major=0 minor=255 as if it were a normal block 
device. This fails as one would expect and so initrd-tools:/sbin/init 
continues on to run pivot_root and continue booting the NFSroot system.

What is the problem you may say... well I think that rather than 
assuming that the mount of block device major=0 minor=255 will fail in a 
way that is safe we should trap the rootdev=255 earlier and not allow 
the mount command to be attempted. The following patch to 
initrd-tools:/sbin/init performs this trap.

---8<---
--- init.orig	2005-05-03 11:13:32.000000000 +0100
+++ init	2005-05-03 11:14:19.000000000 +0100
@@ -418,7 +418,9 @@
 cmdline=$(cat /proc/cmdline)
 umount -n proc
 if [ $rootdev != 256 ]; then
+    if [ $rootdev != 255 ]; then
 	mount_root
+    fi
 	cd mnt
 	[ $DEVFS ] && mount -nt devfs devfs dev
 	pivot_root . initrd
---8<---

Regards
Alex Owen

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (400, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-1-686
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages initrd-tools depends on:
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
ii  cpio                          2.5-1.2    GNU cpio -- a program to manage ar
ii  cramfsprogs                   1.1-6      Tools for CramFs (Compressed ROM F
ii  dash                          0.5.2-4    The Debian Almquist Shell
ii  util-linux                    2.12-10    Miscellaneous system utilities

-- no debconf information


--- End Message ---
--- Begin Message ---
Version: 0.1.84.2+rm

The initrd-tools package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.

For more information about this package's removal, read
http://bugs.debian.org/393092 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.

Don't hesitate to reply to this mail if you have any question.

Thank you for your contribution to Debian.
-- 
Lucas


--- End Message ---

Reply to: