0

I have three partition(/dev/sda1, sda2 and sda3). The first partition /dev/sda1 is default ubuntu and mounted as root("/"), remaining two partition not any mount points. If I want then go to mount the partitions.

I want to install ubuntu in /dev/sda2 partition. manually I unsquashfs the filesystem and copied kernel and initrd from iso image. After that I adding the menu entries in grub configuration file. finally that booted fine but it was mount read-write mode. I want to write read-only(ro) mode. how to mounted read only or where to mention read-only flag. please any one have answer let me know.

3
  • Hello. What version of Ubuntu are you installing? From your question < If I want then go to mount the partitions.> What does this mean? Lastly why are you trying to do what ever it is you are trying to do?
    – David
    Apr 13, 2022 at 11:30
  • Have you tried adding 'ro' param to your kernel command line?
    – nsilent22
    Apr 13, 2022 at 20:03
  • I am taking ubuntu 20.04 version from community.
    – MOHAN M
    Apr 14, 2022 at 7:09

1 Answer 1

1

The way a partition is mounted can be specified through the mount options. To mount the file system read only, the option you add simply is ro, either on the command line, or, if the partition is automatically mounted during startup, in the configuration file /etc/fstab.

See man mount for possible mount options for different file systems. For ntfs file systems, this information is available in man mount.ntfs.

2
  • Yes I hands-on with your idea I faced the error during the booting. If you are mount the partition (/dev/sda2) read-only, then faced the some service not started during the booting. I think may be read-write rights required for booting.
    – MOHAN M
    Apr 14, 2022 at 7:08
  • Your question is how to mount a partition read only. If yo have another issue, feel free to open a question for it. It this answers the question, then please accept the answer.
    – vanadium
    Apr 14, 2022 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .