[Bug 1997511] [NEW] cifs root fails with read-only share
Luiz Angelo Daros de Luca
1997511 at bugs.launchpad.net
Wed Nov 23 04:21:23 UTC 2022
Public bug reported:
If someone uses this kernel cmdline with casper:
ip=dhcp maybe-ubiquity initrd=initrd netboot=cifs
nfsroot=//myserver/share/ubuntu22.10/
It will fail if //myserver/share is marked as readonly. It fails on the
losetup step:
losetup /dev/loop0 /cdrom/casper/filesystem.squashfs
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=-oro,user=root,password=" to the kernel command line
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
** Affects: casper (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/1997511
Title:
cifs root fails with read-only share
Status in casper package in Ubuntu:
New
Bug description:
If someone uses this kernel cmdline with casper:
ip=dhcp maybe-ubiquity initrd=initrd netboot=cifs
nfsroot=//myserver/share/ubuntu22.10/
It will fail if //myserver/share is marked as readonly. It fails on
the losetup step:
losetup /dev/loop0 /cdrom/casper/filesystem.squashfs
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=-oro,user=root,password=" to the kernel command line
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1997511/+subscriptions
More information about the foundations-bugs
mailing list