LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-31-2001, 07:06 AM   #1
martin_fortmann
LQ Newbie
 
Registered: May 2001
Posts: 5

Rep: Reputation: 0
Exclamation


When LINUX boots, the file system is read only. When Mandrake 7.2 starts, a whole bunch of errors result ie. they get the [ FAILED ] status. The first error is as follows

Kernel (hd0,1) /boot/vmlinuz root > /dev/hda2 Remounting
Activating swap partition : swapon : / : Invalid argument

Some errors follow this but they wizz by too fast to record

The next [ Failed ] is

Mounting loop back filesystems : mount : /dev/hda1 already mounted or /mnt/windows busy

Then there are few [ OK ]s but a number of 'touch'commands fail because the file system is read only.

The startup pauses for a long while on

Starting system logger:

It continues after a while with a few more [ OK ]s and [ FAILED ]s and then goes through a loop of the following

INIT: Id "1" respawing too fast : disabled for 5 minutes
INIT: Id "2" respawing too fast : disabled for 5 minutes
INIT: Id "3" respawing too fast : disabled for 5 minutes
INIT: Id "4" respawing too fast : disabled for 5 minutes
INIT: Id "5" respawing too fast : disabled for 5 minutes
INIT: Id "6" respawing too fast : disabled for 5 minutes
INIT: Id "x" respawing too fast : disabled for 5 minutes
No more processes at this level

I never get to a prompt to try the mount -n -o remount / which is upposed to fix a read only file system. How do I go about fixing this? I've tried using the rescue facility on the install disk but don't really know how and the fiddling and prodding I've done has come to nothing. I really think a re-install is overkill for this problem but if nothing else .....

Thanks in advance
Martin
 
Old 05-31-2001, 08:10 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,017
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
Any software uninstalled/installed that might have caused a change?
Any errors before this?
Hard reset/reboots?

Im no Mandrake man, but Ill throw in what I think, ok.
Quote:
Kernel (hd0,1) /boot/vmlinuz root > /dev/hda2 Remounting
After fsck checks the partitions and finds em ok, itll remount in rw mode, so this seems ok.

Quote:
Activating swap partition : swapon : / : Invalid argument
Swapon loads all /swaps from /etc/fstab, Here the /swap seems to be pointing to the rootsystem, not a "special file" aka swap partition. Look in /etc/fstab if the swap line points to the right partition.

Quote:
Mounting loop back filesystems : mount : /dev/hda1 already mounted or /mnt/windows busy
This is weird, cuz loopback fs'es arent partitions. It doesnt seem a major fault, tho Id append "noauto" on the fstab line.

Quote:
INIT: Id "1" respawing too fast : disabled for 5 minutes
etc. Could be anything from missing libraries to using the "wrong" getty. Showing us the corresponding lines in ure /etc/inittab will tell. Boot "Linux single" to try and bypass this, check /etc/inittab.

Ok. heres what I would do.
Boot into linux with the rescue CD/bootfloppy.
Mount ure rootsystem read-only. Copy /var/log (or /var/adm ?) messages, syslog and dmesg to /mnt/windows (mount first) or read em there, whatever u like.

If nothing else shows up that is important, boot into Linux using on the Lilo prompt "Linux single", this will, if all goes well, drop u past the init phase into a passwordless root-owned bash shell for fixing. If it doesnt add INIT=/bin/sh: "Linux single init=/bin/sh".
Now clean up /etc/fstab with the arguments from above, and look at /etc/inittab for the respawn lines & post one here.

*If however I got all of this wrong, and fsck DIDNT come out of it to mount stuff read-write, it would be better to first "fsck -f(force) /dev/(all ext2fs partitions here), to make sure theres no corruption.
 
Old 06-02-2001, 03:20 AM   #3
martin_fortmann
LQ Newbie
 
Registered: May 2001
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply unSpawn. Least I'm learning a bit about how this all hangs together. Funny, I never seem to learn about anythign until I break something and then have to fix it.

I seem to remember playing around with DiskDrake which is Mandrakes version of disk druid any other Linuxes disk partitioner. I wasn't trying to be clever but I guess I asked it to do something that messed it up. In Messages I found the following which don't look too good.

May 28 20:52:00 localhost DrakX: reading fstab
May 28 20:52:01 localhost DrakX: trying to load en_GB.po from ./po.cz2
May 28 20:52:01 localhost DrakX: trying to load en.po from ./po.cz2
May 28 20:52:25 localhost DrakX: calling umount()
May 28 20:52:25 localhost DrakX: ERROR: error unmounting : No such file or directory at /usr/lib/libDrakX/fs.pm line 230.
May 28 20:52:46 localhost DrakX: calling umount()
May 28 20:52:46 localhost DrakX: ERROR: error unmounting : No such file or directory at /usr/lib/libDrakX/fs.pm line 230.
May 28 20:52:58 localhost DrakX: calling umount(/mnt/windows)
May 28 20:53:01 localhost DrakX: calling umount()
May 28 20:53:01 localhost DrakX: ERROR: error unmounting : No such file or directory at /usr/lib/libDrakX/fs.pm line 230, <> line 8.
May 28 20:53:16 localhost DrakX: mounting /dev/hda1 on /mnt/windows as type vfat
May 28 20:53:16 localhost DrakX: running: modprobe vfat
May 28 20:53:16 localhost DrakX: calling mount(/dev/hda1, /mnt/windows, vfat, -1058209792, check=relaxed)
May 28 20:53:28 localhost DrakX: calling umount()
May 28 20:53:28 localhost DrakX: ERROR: error unmounting : No such file or directory at /usr/lib/libDrakX/fs.pm line 230, <> line 8.
May 28 20:54:23 localhost DrakX: calling umount()
May 28 20:54:23 localhost DrakX: ERROR: error unmounting : No such file or directory at /usr/lib/libDrakX/fs.pm line 230, <> line 8.
May 28 21:06:48 localhost modprobe: modprobe: Can't locate module char-major-108

My fstab looks like this

/dev/hda2 / ext2 rw 1 1
none /dev/pts devpts mode=0620 0 0
/mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
/mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0
/dev/hda1 /mnt/windows vfat user,exec,umask=0 0 0 noauto
none /proc proc defaults 0 0
/ none swap exec,dev,suid,rw 1 1



The last spawn lines in inittab are
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
# xdm is now a separate service
x:5:respawn:/etc/X11/prefdm -nodaemon


I've booted Linux with the init=/bin/sh. One thing I noticed right before the prompt was

VFS: mounted root (ext2 filesystem) read only

Where is the 'flag'to make the root files system read only stored and how do you go about unsetting it? By the way, the point at which I get to the prompt, I take it that all ahs happend here is the kernel has booted? Is that correct?

I've also used fsck to check /dev/hda2 and it now clean or so it thinks.

Many thanks for your help
Martin

 
Old 06-02-2001, 09:24 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,017
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
The char-major thing only occurs in kernel-2.3x and higher.
put the next line
"alias char-major-108 off"
in /etc/conf.modules or modules.conf, that should mute it. it is harmless tho.

In fstab, last line:
/ none swap exec,dev,suid,rw 1 1
cant be correct, it needs a partition for swap to work.
find it or make it :-]

the mingetty lines from inittab look pristine to me, so the problem is not there.

the mount command handles the read-write and read-only mounting itself, when fsck ok's the partitions states.
u could force mount with -n to load the disk in read-write mode, or remount like "mount -o rw, remount /dev/hda2" when it was already mounted read-only.

did u use fsck -f(force) on /dev/hda2 ?
and u know u gotta unmount partitions before u reboot or shutdown right?

Btw, when u boot a kernel kernel the first file gets run is /etc/rc.d/rc.sysinit which does network, mounting, daemons starting, module loading, fscking and more, the "system boot", then the rc.local gets run with stuff that is local to ure machine only, like setting up /etc/issue banners etc.
only after that finished a prompt will be shown (unless u booted linux single).

anyway, there are still errors to be solved, tho I cant see what they are so it would be kewl to cat /varlog/messages and grep for /dev/hd* to see if theres any probs left with partitions: cat /var/log/messages | grep hd
and /cat /proc/swaps to see if the swap loaded right.
swap cant be "seen" from /etc/mtab or issuing a "mount" to check.
 
Old 06-03-2001, 06:46 PM   #5
martin_fortmann
LQ Newbie
 
Registered: May 2001
Posts: 5

Original Poster
Rep: Reputation: 0
Hi

Thanks for the info. I'm getting a better picture now.

Ok, I edited the rc.sysinit file and put sleep command in to see which commands where no working. Obviously it was the Remounting file system as read write. That command was

mount -o -n remount,rw /

The error message ther was 'mount point none unknown'.

So I changed it to

mount -o -n remount,rw /dev/hda2

and it booted and started fine except for swapon -a which still gives swapon: /: Invalid argument.

Now I've figured out that I don't actually have a swap partition. I think that's a hole in the Mandrake installation as at no point was I asked to create one or warned that there was none. I know Redhat prompted me to create partitions when I attempted to install that but Mandrake just went off on its own mission.

Anyway, why have I lost the correlation between / and /dev/hda2. My fstab is in threads above. I don't THINK there's a problem there. Also, when I restart, the files system is checked even though when I shutdown the file systems are unmounted OK? This is new. Any ideas on fixing that?

To the best of my knowledge, I did unmount the files system after running fsck but the problem remained the same.

thanks for the help. I'm making progress here.

Seeya
Martin
 
Old 06-03-2001, 10:36 PM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Your fstab file still needs work.

Change it from this:

/dev/hda2 / ext2 rw 1 1
none /dev/pts devpts mode=0620 0 0
/mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
/mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0
/dev/hda1 /mnt/windows vfat user,exec,umask=0 0 0 noauto
none /proc proc defaults 0 0
/ none swap exec,dev,suid,rw 1 1


To:

/dev/hda2 / ext2 defaults 1 1
none /dev/pts devpts mode=0622 0 0
/mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
/mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0
/dev/hda1 /mnt/windows vfat noauto,user,exec,umask=0 0 0
none /proc proc defaults 0 0
#/hdaX swap swap defaults 0 0


I commented out the last line because you said that you had no swap file. When you do, you can change the X to correct partition number.

The remount command should look like this ' mount -n -o remount,rw / '. The -n should be before the -o. The -n tell mount not to write to the mtab file.

I believe what starts the root partition out as being read-only is in the lilo.conf file. There is a stanza in there that tells the system to mount the root partition read-only. Later on, the sysinit file remounts root as read-write.







 
Old 06-04-2001, 04:31 AM   #7
martin_fortmann
LQ Newbie
 
Registered: May 2001
Posts: 5

Original Poster
Rep: Reputation: 0
Talking

SCHWEEEET!!!

fstab changed and all fixed now - except for the part of no swap partition.

Thanks very much for the help, guys/girls!

Could I bug you for some info and creating the swap partition. I have partition magic which I thought of using under windoze. Was going to reduce windoze partition, move linux partition back to start at end of windoze partition and then create swap partition in the remaing space. Would this work ie. would grub (i use this instead of lilo) pick up that hda2 now starts at a different cylinder etc.?

Thanks again
Martin
 
Old 06-04-2001, 05:47 PM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
GREAT!!!

You can use Partition Magic in windows to repartition your drive. I used Partition Magic to partition my drive for TurboLinux. My drive was all one partition for windows.

First, I used Partition Magic to reduce the windows size from 4.3Gigs to 3Gigs. Next, I created a swap partition. Partition Magic suggested a swap file size of 132Megs. Usually, a size of twice your ram is used, but 128Megs is ok. I let it use the 132Megs and created the swap file. Then I formatted it. This swap file is right after my windows partition and it works fine. So, I don't belive that you have to move your root ' / ' partition next to the windows partition. By not moving it, you won't have worry about grub.

Once you've done this, you'll have to find out what partition your swap file is. As root, enter the command ' fdisk -l /dev/hda '. You'll see a listing of the partitions. Look for the one that says ' Linux swap '. It should be a type ' 82 '. Make a note of the partition ( like /dev/hda3 ) , then exit fdisk. Next, edit the fstab file. I made a mistake in the swap file line. It should read:
#/dev/hdaX swap swap defaults 0 0 . Change the ' X ' to your swap partition number and remove the ' # ' at the beginning of the line. Then run the command ' swapon -a ' and your swap file should be mounted.

One thing, be carefull using Partition Magic. It could mess up your system.
 
Old 06-05-2001, 06:09 PM   #9
martin_fortmann
LQ Newbie
 
Registered: May 2001
Posts: 5

Original Poster
Rep: Reputation: 0
Thumbs up

The penguin is alive and well and swapping.

Thanks a lot!!!!!
 
Old 06-05-2001, 06:35 PM   #10
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Great to hear everything is OK. You're welcome.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thunderbird .msf files broken! Windws/D read-only file system? xbaez Linux - Software 4 11-15-2012 04:50 PM
help, terrable problems about read-only mounting when starting my system Snerkel Linux - Software 3 01-21-2005 01:25 PM
Unpacking files=Cannot mkdir: Read-only file system Regenten Linux - Newbie 5 09-08-2004 03:23 AM
difficulties with large files and system call read/write jwstric2 Programming 2 08-22-2004 11:42 PM
Uncompress + Unpack files: (Read Only File System) ptreves Linux - Newbie 8 08-16-2004 02:52 PM


All times are GMT -5. The time now is 11:17 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration