mount.cifs is not included in initramfs, so netboot=cifs doesn't work

Bug #668429 reported by maxim
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: initramfs-tools

This bug being reported and fixed in Debian over a year ago still exists in lucid lynx LTS 10.04.1 Daily (Aug 16, 2010):

http://<email address hidden>/msg01833.html

Essentially, mount.cifs is missing from the initramfs, so it's impossible to use the netboot=cifs option on the kernel append parameters.

I'm currently looking for a solution to just insert the mount.cifs into the initramfs.

It would also be nice if there were actually some indicator as to what the problem is when it's encountered by the initramfs scripts.

Currently it displays:
nfsmount: need a server
nfsmount: need a server
nfsmount: need a server
nfsmount: need a server
nfsmount: need a server
...

Revision history for this message
maxim (maximn) wrote :

It seems something more is needed in order to get it to work properly. Performing the following results in initramfs saying this when attempting to mount the root file system:

mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
nfsmount: need a server
nfsmount: need a server
nfsmount: need a server
...

To get mount.cifs into the initrd, first you must have install mount.cifs

To do this run:
# sudo apt-get install smbfs

Found some instructions here:
https://help.ubuntu.com/community/LiveCDCustomization

# mkdir lztempdir
# cd lztempdir
# lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames

Then do:

# cp `which mount.cifs` sbin/mount.cifs

Then pack it back up:

# find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.cifs.lz

Revision history for this message
maxim (maximn) wrote :

Even after working with it. Rebuilding module decadency, and inserting the cifs kernel module. It seems to still have difficulty properly functioning. It returns numerous types of errors after properly mounting the CIFS share, and loop mounting the squash filesystem.

It seems there are some other things that I'm not familiar with that are still mis-configured or missing.

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
jhansonxi (jhansonxi) wrote :
Revision history for this message
maxim (maximn) wrote :

This is so close to working.

Using releases such as 12.04, and the daily build of quantal (http://cdimage.ubuntu.com/daily-live/current/) as of today, the mount.cifs application is present in the initramfs.

However, there is an authentication error that presents itself and prevents a mount from occurring. This message appears just before casper tries to mount the CIFS share:

FS-Cache: Netfs 'cifs' registered for caching
CIFS VFS: default security mechanism requested. The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3
CIFS VFS: Error -2 during NTLM authentication
CIFS VFS: Send error in SessSetup= -2
CIFS VFS: cifs_mount failt w/return code= -2

The mount that happens shortly after is not successful, and mount.cifs reports "No such file or directory." The error is misleading as to the true cause.

After being dumped to the initramfs shell, manual attempts to mount.cifs the share return the error:
CIFS VFS: mdfour: Crypto md4 allocation error -2

CIFS VFS: Error -2 during NTLM authentication
CIFS VFS: Send error in SessSetup = -2
CIFS VFS: cifs_mount failed w/return code = -2

This error appears to be hidden during the attempt that the casper script makes and isn't displayed on the screen.

Looking up md4 crypto on the net it seems to be a kernel module (md4.ko). I'm not familiar with it so I'm not sure what needs to be done in order to get it to work.

Here is the kernel/append line that I'm using with PXELINUX:
LABEL Ubuntu 12.10 desktop-amd64 (Live)
  kernel boot/ubuntu/12.10/desktop-amd64/vmlinuz
  append initrd=boot/ubuntu/12.10/desktop-amd64/initrd.lz boot=casper netboot=cifs nfsroot=//192.168.1.1/netboot$/ubuntu/12.10/desktop-amd64 --

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.