Message ID | 20230105125223.398216-1-felix.moessbauer@siemens.com |
---|---|
Headers | show |
Series | wic/plugins/images/direct: replace fstab entries | expand |
Am Thu, 5 Jan 2023 12:52:21 +0000 schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > For comparison, here the fstab files for the ext4 and the wic version > of the core-image-minimal (see below). In fact one probably really wants no fstab / line at all, unless it is ever somehow explicitly asked for. The bootloader and kernel need to know that, in the rootfs it only makes some sense if you have "special needs". Having it in the rootfs just means that your rootfs is kind of device specific ... say you want to use the same rootfs for nfs and nvme, or same content but in ext4 vs btrfs I think the best way would be to drop / from the template first. Later allow wic to edit and add it like proposed here. But only when that is explicit ... --root-fstab-update Or in the end people can decide what to do about their own template, but i suggest making this explicit for this special mountpoint with something like --root-fstab-update Henning > Putting all persons in CC who have been involved in the first try and > in the revert. > > Best regards, > Felix Moessbauer > Siemens AG > > .ext4 > ``` > # stock fstab - you probably want to override this with a machine > specific one > > /dev/root / auto defaults > 1 1 proc /proc proc > defaults 0 0 devpts /dev/pts > devpts mode=0620,ptmxmode=0666,gid=5 0 0 tmpfs > /run tmpfs mode=0755,nodev,nosuid,strictatime > 0 0 tmpfs /var/volatile tmpfs defaults > 0 0 > > # uncomment this if your device has a SD/MMC/Transflash slot > #/dev/mmcblk0p1 /media/card auto > defaults,sync,noauto 0 0 ``` > > .wic > ``` > # stock fstab - you probably want to override this with a machine > specific one > > proc /proc proc defaults > 0 0 devpts /dev/pts devpts > mode=0620,ptmxmode=0666,gid=5 0 0 tmpfs /run > tmpfs mode=0755,nodev,nosuid,strictatime 0 0 tmpfs > /var/volatile tmpfs defaults 0 > 0 > > # uncomment this if your device has a SD/MMC/Transflash slot > #/dev/mmcblk0p1 /media/card auto > defaults,sync,noauto 0 0 > > /dev/sda1 /boot vfat defaults 0 0 > UUID=c53e2046-48db-4533-8083-b997d9976fbf / ext4 > defaults 0 0 ``` > > > Felix Moessbauer (2): > wic/plugins/images/direct: replace fstab entries > Revert "Revert "wic/plugins/images/direct: Allow changes in fstab on > rootfs"" > > scripts/lib/wic/plugins/imager/direct.py | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >
On 05.01.23 14:22, Henning Schild via lists.openembedded.org wrote: > Am Thu, 5 Jan 2023 12:52:21 +0000 > schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > >> For comparison, here the fstab files for the ext4 and the wic version >> of the core-image-minimal (see below). > > In fact one probably really wants no fstab / line at all, unless it is > ever somehow explicitly asked for. > The bootloader and kernel need to know that, in the rootfs it only > makes some sense if you have "special needs". Having it in the rootfs > just means that your rootfs is kind of device specific ... say you want > to use the same rootfs for nfs and nvme, or same content but in ext4 vs > btrfs Henning, for now we're not trying to introduce any architectural or fundamental change. We simply fix a bug (duplicate / entry in fstab). The duplicate entry was not a problem in the past but that changed with newer systemd versions. That was the reason why the initial implementation was reverted. If necessary wic can now replace the entry for the rootfs if it has to, e.g. for adding a correct UUID. In addition the image stays consistent when wic is not used as imager (like for ext4 images). > > I think the best way would be to drop / from the template first. Later > allow wic to edit and add it like proposed here. But only when that is > explicit ... --root-fstab-update > > Or in the end people can decide what to do about their own template, > but i suggest making this explicit for this special mountpoint > with something like --root-fstab-update > > Henning > >> Putting all persons in CC who have been involved in the first try and >> in the revert. >> >> Best regards, >> Felix Moessbauer >> Siemens AG >> >> .ext4 >> ``` >> # stock fstab - you probably want to override this with a machine >> specific one >> >> /dev/root / auto defaults >> 1 1 proc /proc proc >> defaults 0 0 devpts /dev/pts >> devpts mode=0620,ptmxmode=0666,gid=5 0 0 tmpfs >> /run tmpfs mode=0755,nodev,nosuid,strictatime >> 0 0 tmpfs /var/volatile tmpfs defaults >> 0 0 >> >> # uncomment this if your device has a SD/MMC/Transflash slot >> #/dev/mmcblk0p1 /media/card auto >> defaults,sync,noauto 0 0 ``` >> >> .wic >> ``` >> # stock fstab - you probably want to override this with a machine >> specific one >> >> proc /proc proc defaults >> 0 0 devpts /dev/pts devpts >> mode=0620,ptmxmode=0666,gid=5 0 0 tmpfs /run >> tmpfs mode=0755,nodev,nosuid,strictatime 0 0 tmpfs >> /var/volatile tmpfs defaults 0 >> 0 >> >> # uncomment this if your device has a SD/MMC/Transflash slot >> #/dev/mmcblk0p1 /media/card auto >> defaults,sync,noauto 0 0 >> >> /dev/sda1 /boot vfat defaults 0 0 >> UUID=c53e2046-48db-4533-8083-b997d9976fbf / ext4 >> defaults 0 0 ``` >> >> >> Felix Moessbauer (2): >> wic/plugins/images/direct: replace fstab entries >> Revert "Revert "wic/plugins/images/direct: Allow changes in fstab on >> rootfs"" >> >> scripts/lib/wic/plugins/imager/direct.py | 12 +++++++++++- >> 1 file changed, 11 insertions(+), 1 deletion(-) >> > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#175524): https://lists.openembedded.org/g/openembedded-core/message/175524 > Mute This Topic: https://lists.openembedded.org/mt/96070800/5792637 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [florian.bezdeka@siemens.com] > -=-=-=-=-=-=-=-=-=-=-=- >