cifs root fails with read-only share
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
If someone uses this kernel cmdline with casper:
ip=dhcp maybe-ubiquity initrd=initrd netboot=cifs nfsroot=
It will fail if //myserver/share is marked as readonly. It fails on the losetup step:
losetup /dev/loop0 /cdrom/
Because losetup will try to open that file as read/write and samba denies it. It looks like mount.cifs does not know/care about share read-only state and mount it as rw.
There are two ways to make losetup work:
1) mount the samba share as ro adding "NFSOPTS=
2) add '-r' to that losetup call
The first option is already possible without any code changes. However, I do believe there is no reason to try to access a squashfs file as read/write. It should somehow propagate to the function that calls losetup that it is dealing with a file that will not be written and losetup can use '-r'.
Tested with ubuntu 22.10 media