how to change fstab so the system can startup in multi-user mode
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.
how to change fstab so the system can startup in multi-user mode
i have the following version of Fedora based Linux system:
Linux alpha 2.6.19-1.2911.6.5.fc6xen #1 SMP Sun Mar 4 16:23:59 EST 2007 x86_64?86_64 x86_64 GNU/Linux
I had a bad read on one of the internal disk.
I cannot change fstab it says it's a read-only filesystem.
what should I do to boot up this box?
Why is the root partition, which is on a separate drive, read only?
how do I make it writeable
so I can change fstab
OR
how can I boot it up and ignore the /disk/i1 errors?
1. you do not alter fstab to change the init level at boot... you modify GRUB.
2. If the root fs is mounted read only, then you have a problem and need to fix it. (That is, a problem other than the ro setting.)
So, please quote exactly what errors you get which prompt ro mode.
During boot I see a bunch of I/O errors on /dev/sdb1, such as
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 1
: :
It is an internal drive, but not the physically separate root disk.
I then get this error:
Starting udev: Wait timeout.
Then I get this:
No devices found
Setting up Logical Volume Management: /dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
No volume groups found
fsck.ext3: Unable to resolve 'LABEL=disk-i1'
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Before the reboot, there was a bad block(s) but I was able to access the drive, copy and view files, etc.
The entry in fstab for this drive is:
LABEL=disk-i1 /disk/i1 ext3 defaults 1 1
I tried to recover it using fsck:
# fsck -t ext3 /dev/sdb1
I get this error:
fsck.ext3: Attempt to read block from filesystem resulted in a short read while trying to open /dev/sdb1
The return code is 8 (Operational Error)
So I try using multiple backup superblocks, as follows:
# mke2fs -n /dev/sdb1
(returns 32768, 98304, ...)
# fsck -t ext3 -b 102400000 /dev/sdb1
Now I get a variation of the same error:
disk-i1: Attempt to read block from filesystem resulted in short read while reading block 1545
disk-i1: Attempt to read block from filesystem resulted in short read reading journal superblock
fsck.ext3: Attempt to read block from filesystem resulted in short read while checking ext3 journal for disk-i1
For any superblock I pass via the -b option, I get the same exact message, including block number 1545.
Since I cannot recover the drive easily, I would like to remove it from /etc/fstab and simply ignore the drive. However, the root filesystem is mounted read-only, even though all of the errors occurred on /dev/sdb1 (the 2nd internal drive).
My immediate, pressing need is to ignore /disk/i1 and get the machine booted in multi-user mode. You said "you modify GRUB". Sadly I am a newbie and unfamiliar with GRUB. What is the quickest way to be able to simply ignore /disk/i1 for now via GRUB?
My secondary need is to recover what I can from the /disk/i1 drive. I know the drive isn't fried, I was able to access it before the reboot. Is my next option to buy another linux box and put it into another machine?
Your sdb drive is breaking ... backup and get a new drive. (What is on that drive?)
Some observations:
1. It looks like you are running the xen kernel... why? (There is usually another kernel installed as well, try booting from that.
2. The quickest and easiest way to, safely, ignore the partition is to delete it.
3. disk-i1 is a label ... how do you know the label is for /dev/sdb1?
Try modifying the fstab file from another so (for example knoppix livecd). Login as root in this distro you'll have permission to modify everything that's on the drive.
Quote:
you do not alter fstab to change the init level at boot... you modify GRUB.
In fact, if you want to change the init level permanently, you need to modify the inittab file instead.
To each his own... grub.conf/menu.lst usually has a default runlevel in there, and you can change this for each menu entry. Of course, you could also change runlevels with an init script... so many choices! Perhaps we're talking about linux? Why, mercy me, so we are...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.