LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-02-2019, 08:50 AM   #1
percy_vere_uk
Member
 
Registered: Oct 2008
Location: Dorset, UK
Distribution: Arch, Lfs, Gentoo, Debian, Slackware
Posts: 98

Rep: Reputation: 12
lfs verion 8.4 read only file system


Hi

I have just followed 'linux from scratch Version 8.4'

The system boots up OK but I seem to be unable to write to any files.

Boot scripts show:

Code:
.
VFS: Mounted root (ext4 filesystem) read only on device 259:1
.
Looking at the permissions as an example the / directory gives:

Code:
drwxr-xr-x   2 root   root  4096 Mar 22 10:29 bin
drwxr-xr-x   2 root   root  4096 Apr  1 13:35 boot
drwxr-xr-x   2 root   root  4096 Mar  8 13:59 dev
drwxr-xr-x  15 root   root  4096 Apr  2 12:55 etc
drwxr-xr-x   3 root   root  4096 Mar 21 13:47 home
drwxr-xr-x   7 root   root  4096 Mar 21 13:26 lib
drwxr-xr-x   2 root   root  4096 Mar 11 13:02 lib64
drwx------   2 graham root 16384 Mar  4 14:12 lost+found
drwxr-xr-x   4 root   root  4096 Mar 11 12:40 media
drwxr-xr-x   3 root   root  4096 Mar 29 14:21 mnt
drwxr-xr-x   2 root   root  4096 Mar 11 12:40 opt
drwxr-xr-x   2 root   root  4096 Mar  8 13:58 proc
drwxr-x---   2 root   root  4096 Apr  2 13:37 root
drwxr-xr-x   3 root   root  4096 Mar 30 11:07 run
drwxr-xr-x   2 root   root  4096 Apr  2 13:01 sbin
drwxrwxrwt   3 graham root  4096 Apr  2 13:37 sources
drwxr-xr-x   2 root   root  4096 Mar 11 12:40 srv
drwxr-xr-x   2 root   root  4096 Mar  8 13:58 sys
drwxrwxrwt   2 root   root 20480 Apr  2 13:10 tmp
drwxr-xr-x  13 graham root  4096 Mar  6 14:17 tools
drwxr-xr-x  10 root   root  4096 Mar 11 12:40 usr
drwxr-xr-x  10 root   root  4096 Mar 11 12:44 var

This appears to be the case right through all directories.

But when I try to write to any of the files as root I get 'read ony file system'

/var/log/boot.log is empty and shows permissions of : -rw-r--r--

Any ideas on the cause of this please?

percy
 
Old 04-02-2019, 10:40 AM   #2
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled
Could you post the output of:

Code:
cat /etc/mtab
cat /etc/fstab
You might be able to do a remount of your root filesystem. Try this as root:

Code:
mount -o remount /dev/your_root_partition /
Remounting is just a temporary fix. You will still need to figure out why / isn't mounted rw at boot.
 
1 members found this post helpful.
Old 04-02-2019, 11:16 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,583
Blog Entries: 19

Rep: Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454
Just for interest, what kind of drive are you using? I've never seen a major device number as high as that for a disk.
 
Old 04-03-2019, 07:34 AM   #4
percy_vere_uk
Member
 
Registered: Oct 2008
Location: Dorset, UK
Distribution: Arch, Lfs, Gentoo, Debian, Slackware
Posts: 98

Original Poster
Rep: Reputation: 12
.....................
tyler2016 wrote
.....................

After booting into system:

Quote:
cat /etc/mtab
Code:
cat /etc/mtab      (file was empty)
Quote:
cat /etc/fstab
Code:
# Begin /etc/fstab

# file system  mount-point  type     options             dump     fsck
#                                                                 order

/dev/sda17     /             ext4    defaults                          1       1
/dev/sda3      swap       swap     pri=1                            0       0
proc             /proc        proc     nosuid,noexec,nodev    0       0
sysfs            /sys          sysfs    nosuid,noexec,nodev    0       0
devpts         /dev/pts   devpts   gid=5,mode=620         0       0
tmpfs          /run         tmpfs    defaults                        0       0
devtmpfs     /dev        devtmpfs mode=0755,nosuid   0       0

# End /etc/fstab

Quote:
mount -o remount /dev/your_root_partition /
This seems to have done the trick. But has to be repeated after re-boot.

--------------------------------------------------------------------------------------------
.................
hazel wrote
.................

Quote:
Just for interest, what kind of drive are you using? I've never seen a major device number as high as that for a disk.
Code:
*-disk
             description: ATA Disk
             product: ST1500LM006 HN-M
             vendor: Seagate
             physical id: 0.0.0
             bus info: scsi@4:0.0.0
             logical name: /dev/sda
             version: 0002
             serial: S35LJ9FG300023
             size: 1397GiB (1500GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=d40a1a5

Thanks for your input on this Folks!
 
Old 04-03-2019, 08:10 AM   #5
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled
Good, we know you have a working disk and filesystem. I wonder if for some reason the /etc/init.d/mountfs isn't being run? What is the output of this:

Code:
cd /etc/rc.d
find . -name "*mountfs"
 
1 members found this post helpful.
Old 04-03-2019, 08:48 AM   #6
percy_vere_uk
Member
 
Registered: Oct 2008
Location: Dorset, UK
Distribution: Arch, Lfs, Gentoo, Debian, Slackware
Posts: 98

Original Poster
Rep: Reputation: 12
.....................
tyler2016 wrote
.....................

Quote:
cd /etc/rc.d
find . -name "*mountfs"
Code:
./init.d/mountfs
 
Old 04-03-2019, 09:30 AM   #7
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled
Ok. I think your lfs-bootscripts may have a problem. You are missing some files. You should have a file called /etc/rc.d/rcS.d/S40mountfs. What happens when you do this:

Code:
ls /etc/rc.d/rcS.d
I would go back and install the lfs bootscripts again. I just took a look at the Makefile. Reinstalling them won't hurt anything.

http://www.linuxfromscratch.org/lfs/...otscripts.html
 
1 members found this post helpful.
Old 04-04-2019, 07:51 AM   #8
percy_vere_uk
Member
 
Registered: Oct 2008
Location: Dorset, UK
Distribution: Arch, Lfs, Gentoo, Debian, Slackware
Posts: 98

Original Poster
Rep: Reputation: 12
tyler2016

I have re-installed lfs bootscripts.

All looks OK now.

Thanks very much for your help.

percy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i install mumble verion 123a on linux 10.3 jury Linux - Newbie 1 10-15-2012 04:13 PM
unable to install axel in debian 6.0 i386 Verion venu5b8 Linux - Newbie 1 03-23-2011 01:00 AM
Known working verion of Flash for RH9/7.3 Mr. Swillis Linux - Desktop 3 12-17-2008 05:16 AM
LFS 6.2 a read-only file system? tryLinux&see Linux From Scratch 7 03-13-2007 07:14 PM
registered verion software wants to write to widows registry phoneguy Linux - Desktop 4 11-21-2006 08:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration