reopen 380506
thanks
1.63+debian-1 did NOT fix this bug!
I have a new patch that STARTS to address this issue... This patch
gets a mounted NFS fs then dumps to a shell in the initramfs;
--8<--
Begin: Mounting root file system... ...
Begin: Running /scripts/casper-premount ...
Done.
ipconfig: /tmp/net-eth0.conf: SIOCGIFINDEX: No such device
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is off for TX and off for RX.
nfs: server 138.37.51.95 not responding, timed out
nfs: server 138.37.51.95 not responding, timed out
mount: I/O error
short read: 0 < 28
cat: /sys/block/cloop*/size: No such file or directory
losetup: /dev/cloop*: File name too long
/init: /init: 131: blockdev: not found
/init: /init: 131: blockdev: not found
/init: /init: 131: dmsetup: not found
/init: /init: 131: dmsetup: not found
/init: /init: 131: cannot open /dev/cloop*: No such file
/init: /init: 131: cannot open /dev/cloop*: No such file
mount: Cannot read /etc/fstab: No such file or directory
Can not mount /dev/mapper/casper/snapshot on /root
BusyBox v1.1.3 (Debian 1:1.1.3-2) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
(initramfs)
--8<--
Will continue working on this!
Alex Owen
--- casper.orig 2006-08-02 16:23:10.000000000 +0000
+++ casper 2006-08-05 11:21:03.000000000 +0000
@@ -90,7 +90,7 @@
match_files_in_dir "$directory/casper/*.ext2" ||
match_files_in_dir "$directory/casper/*.dir"; then
setup_unionfs "$directory/casper" "$rootmnt"
- else
+ yelse
:
fi
}
@@ -233,7 +233,6 @@
do_netmount() {
# Will mount a remote share and return the mountpoint
- modprobe -q nfs
# For DHCP
modprobe -q af_packet
@@ -242,22 +241,30 @@
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
- #choose NFS or CIFS mount
- if [ ${netboot} = "NFS" ] ; then
- echo $(do_nfsmount)
- else
- echo $(do_cifsmount)
- fi
+ #choose NFS or CIFS mount
+ case ${netboot} in
+ NFS)
+ echo $(do_nfsmount)
+ ;;
+ CIFS)
+ echo $(do_cifsmount)
+ ;;
+ *)
+ panic "Unrecognized casper netboot method: ${netboot}"
+ ;;
+ esac
}
do_nfsmount() {
+ modprobe -q nfs
if [ "x${NFSOPTS}" = "x" ]; then
NFSOPTS=""
fi
[ "$quiet" != "y" ] && log_begin_msg "Mounting NFS with nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}"
+ # FIXME: This while loop is an ugly HACK round an nfs bug
while true ; do
- nfsmount -o nolock -o ro ${NFSOPTS} "${NFSROOT}" "${mountpoint}" && break
+ nfsmount -o nolock -o ro ${NFSOPTS} "${NFSROOT}" "${mountpoint}" && break
sleep 1
done
echo "${mountpoint}"
@@ -266,6 +273,7 @@
}
do_cifsmount() {
+ modprobe -q cifs
NFSOPTS="-ouser=root,password="
[ "$quiet" != "y" ] && log_begin_msg "Mounting using mount.cifs with ${NFSROOT} ${mountpoint} ${NFSOPTS}"
@@ -275,6 +283,7 @@
}
setup_unionfs() {
+ #NEED TO GET rofsstring setup properly!
image_directory="$1"
rootmnt="$2"
image_type="$3"
@@ -424,18 +433,27 @@
set_usplash_timeout
- if grep -q netboot /proc/cmdline; then
- netboot="CIFS"
+ if [ "${ROOT}" = "/dev/nfs" ] || grep -q netboot /proc/cmdline ; then
+ # netbooting
+ if [ "${ROOT}" = "/dev/nfs" ] ; then
+ netboot="NFS"
+ else
+ netboot="CIFS"
+ fi
for x in $(cat /proc/cmdline); do
case $x in
netboot=*)
- netboot=${x#netboot=}
+ if [ "${x#netboot=}" = "CIFS" -o "${x#netboot=}" = "cifs" ; then
+ netboot="CIFS"
+ elif [ "${x#netboot=}" = "NFS" -o "${x#netboot=}" = "nfs" ; then
+ netboot="NFS"
+ fi
;;
esac
done
- livefs_root=$(do_netboot)
+ livefs_root=$(do_netmount)
else
- # Scan devices for the image
+ # Scan local devices for the image
for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13; do
livefs_root=$(find_livefs)
if [ "${livefs_root}" ]; then