Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936593 - findmediamount() in initrd.scripts mounts /mnt/cdrom as read-write
Summary: findmediamount() in initrd.scripts mounts /mnt/cdrom as read-write
Status: CONFIRMED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: LiveCD/DVD/USB (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-24 14:54 UTC by Ulrich Müller
Modified: 2024-07-24 14:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2024-07-24 14:54:18 UTC
I stumbled upon this when preparing a LiveUSB drive as described in the wiki:
https://wiki.gentoo.org/wiki/LiveUSB#Manually_preparing_a_LiveUSB_drive
using install-amd64-minimal-20240721T164902Z.iso as ISO image.

From console output:

>> Looking for the cdrom
>> Attempting to mount media: /dev/sda
>> Attempting to mount media: /dev/sda1
>> Media found on /dev/sda1
>> Determining root device (trying /dev/sda1) ...
>> Root device detected as /dev/sda1!

It is then mounted read-write:

livecd ~ # grep sda1 /proc/mounts
/dev/sda1 /mnt/cdrom vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0

Now when shutting the system down, readonly remount fails, and the FS ends up with the dirty bit set. In turn, the BIOS (HP) is picky and won't show the USB drive in the boot menu upon the next boot.

I'd have expected the file system to be mounted readonly, in the first place. Writing to it is not necessary and isn't even possible when it's iso9660.