For understanding what's going on you need to understand how Linux PXE boots.
- The kernel
vmlinuz
is transferred
- The initrd
initrd.gz
is transferred
- The kernel mounts initrd and starts its
init
script
initrd is an ultra-minimal Linux system containing the minimal functionality for connecting to (NFS) or retrieving (HTTP/CIFS) the "real" OS (in your case contained within ubuntu_os.squashfs
), mounting it and finally "chrooting" into it.
A PXE ready init
script is in charge of parsing the kernel variables, starting the net services, handling NFS, HTTP, CIFS, etc.
In most of the cases a particular initrd.gz
is not able to deal with all the protocols mentioned above then you need to "customize" your initrd.gz
or to create a "complementary" initrd providing the missing features when needed.
In your case your init
script still think it has to mount an NFS directory and not a file; then if you want to use NFS you should mount the directory where your ubuntu_os.squashfs
is located and next mounting the ubuntu_os.squashfs
file. THis of course means patching init
(and/or its associated components)
If you do not mind offering ubuntu_os.squashfs
on a CIFS share you can see
what Serva does for PXE booting Ubuntu live distros; you will see there all the parameters for CIFS booting (I'm related to Serva development)
i.e. Ubuntu LTS 14.04 Desktop Live
[PXESERVA_MENU_ENTRY]
asset = Ubuntu LTS 14.04 Desktop Live
platform = amd64
kernel = /NWA_PXE/$HEAD_DIR$/casper/vmlinuz
append = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/casper/initrd.lz,/NWA_PXE/$HEAD_DIR$/casper/INITRD_N11.GZ boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE_SHARE/$HEAD_DIR$ NFSOPTS=-ouser=serva,pass=avres,ro ip=dhcp ro
Windows supports drive mountpoints too (Microsoft calls them "reparse points", but the concept is the same). Since you are more familiar with Windows than with *NIX operating systems, here's a little experiment you can perform in Windows to help you understand the concept:
- Insert a USB flash drive into your computer.
- Create a new, empty folder on your desktop.
- Open up the Disk Management console, right-click your flash drive, and select
Change Drive Letters and Paths...
- In the dialog that comes up, hit the
Add...
button.
- Make sure the
Mount in the following empty NTFS folder:
button is selected, and browse to the path of that folder you created on your desktop (e.g. C:\Users\<your profile>\Desktop\New Folder
)
- Hit OK and OK. Now check out your desktop. You will see that the folder you created has a drive shortcut icon:
If you look at it from a command prompt window, you will see it as a <JUNCTION>
object type:
Note that your flash drive now has two mount points; E:
(or whatever) and that folder you created in step 2. You can remove the drive letter if you want, and you will still be able to copy files to/from it through the folder on your desktop. You can even add multiple drive letters for it if you want. This is what a mount point is: It's simply a path for you to access your drives/partitions.
Unlike Linux, Windows is representing this folder to you as some kind of oddball shortcut. Windows does this because mountpoints are a bit of a strange concept in Microsoft's world (hence your confusion). They don't even work properly in a lot of cases. But in *NIX operating systems, this is just the way things are done. A directory can be either a folder or a mountpoint in Linux, and most of the time the distinction between the two doesn't matter.
*NIX operating systems do not have a concept of drive letters. Your "root" filesystem (/
) is always at the top of the tree, and is (usually but not always) mounted as your system's boot drive. This is what C:\
is to Windows. There can only ever be one root (just like there can only be one C:
drive). Every other drive or partition on your system must be mounted to a path (directory) under this root. So, what would be D:
or E:
in Windows would be /mnt/D_Drive
, /media/cdrom
, or even /var
, /home
, or whatever in Linux.
Now this is an important thing, and is a big source of your confusion:
A device node is not the same thing as a mountpoint. Both Windows and Linux have device nodes. The difference is that Windows never shows them to you, and they do not exist as files on your hard drive the way they do in Linux.
In the command prompt screenshot above, you'll notice that the folder you created is listed as \??\Volume{GUID}\
. In both Linux and Windows the raw device itself has a device node (e.g. /dev/sda1
in Linux or \??\Volume{GUID}
in Windows). The mountpoint is the filesystem on that device. In Windows, you can think of drive letters (E:\
for example) as mountpoints for your drives/partitions. The only difference is that Windows never shows you the \??\Volume{GUID}
device node. It only shows you mountpoints, and those mountpoints are almost always drive letters (but, as we see from the experiment above, don't have to be).
I hope this clears things up for you.
Now, go back into Disk Management and delete that mountpoint before you accidentally do something stupid, like trying to copy/move it somewhere! :-)
Best Answer
It's not an option – it's the device name.
Remember that the syntax for
mount(8)
is:So even for filesystems that don't correspond to a specific device, you still need to give a dummy name, whether it's
none
ortmpfs
orfluttershyfs
.