Remounting fs as read-write
I tried to add a second hard drive to my Suse PC, but
after I partitioned it and formatted it as /usr (selected by Suse as default)
I discovered a lot of my installed programs were nowhere to be found. I
tried rebooting but I could no longer get to a desktop, so I removed the
second hard drive again, thinking it would all be back to normal. However
it now goes into a "diagnostic mode", and asks me to "do" bash# mount -n
-o remount,rw /
--- Leave out "bash#" as that only indicates a root bash prompt....you
want to be typing just:
--- Just looking at what caused the problem in the first place. The problem happened because you formatted the drive and didn't copy over the contents of /usr to it. When you now boot the system it mounts the empty drive under /usr....so you no longer have /usr/bin, /usr/lib, /usr/local, /usr/sbin, /usr/share etc. I would fix it the following way: 1) Boot into "diagnostic mode" or use a live CD like knoppix, just so that you can have access to your root file system. 2) To fix it so you can boot suse again edit /etc/fstab.
You want to comment out the line with /usr in it. To comment out the line
just put a # at the beginning. It should look something like:
3) Create a temp mount point for it and mount it:
4) Copy over the entire contents of your /usr to the new
drive:
5) Make a cup of tea, walk the dog or have a beer! ;) 6) Once copying has finished, mount the drive in the correct
place and test:
7) Uncomment that line from /etc/fstab so that the drive is mounted automatically when booting.
Quick Links:
Frequently Used Options
Linux Books
Hints and Tips on: Linux System Administration (c) www.gotothings.com All material on this site is Copyright.
|