Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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 .....
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.
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
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.
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.
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.
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.
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.?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.