Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-03-2007, 11:16 AM
|
#1
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Rep:
|
Java install error causes being stuck in TWM
I have done much research about why I got stuck in TWM after a failed JAVA install attempt and I now know the problem after hours of searching...It is totally different than I originally thought in my post "Urgent help need" so I am posting in a seperate topic so as not to confuse users who may need this forum at later times.
Note: I use Fedora Red-Hat 7
The problem was a mistyping of
/etc/profile.d/java.sh during the install process.
I was instructed to write this:
export JAVA_HOME=/opt/jre1.6.0_03
export PATH=\$JAVA_HOME/bin:\$PATH
I have since found out that I need to take away the \ before the $ because they are killing the path.
The problem is almost solved. I figured it out, which is half the battle!
However, Gedit is not working and I tried a VIM command and it also did not work.
The terminal in TWM is not recognizing many of the normal commands.
Any ideas on how I can change that file, and hopefully restore my Fedora?
|
|
|
11-03-2007, 11:26 AM
|
#2
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
With the path disabled, it's no wonder that most commands aren't working. The most convenient would probably be to work from a livecd.
|
|
|
11-03-2007, 11:38 AM
|
#3
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
Alright, I'm logged in with the "Live CD" and I am logged in under root, although it shows up "fedora" because it's a live CD...when I do the 'Gedit command" it shows that the file is empty, but I think that's probably only because it's the CD. So if I change it there, will it change it for root and my user name as well????
|
|
|
11-03-2007, 12:34 PM
|
#4
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
There is only one /etc/profile for both root and users - that's the point of /etc/profile, it's the system-wide configuration file. Yes, any edits should take effect when you reboot your Fedora. Just make sure that you are actually editing the Fedora /etc/profile and not that of the livecd. That wouldn't break anything but it would be less than effective as you wouldn't have modified anything in the end, not as far as your installed system is installed at least (and not for the livecd as modifications are not persistent anyway).
Another hint: if you would like to avoid the sort of trouble you are going through, consider from now on changing your path not in the system-wide /etc/profile but in the user's profile (hidden file(s) in your home directory). If you have a little accident, you can still log in as root to repair the user's environment. Obviously, the enhanced path would then only apply to that one user but if that's all that is needed, it is by far the safest choice.
|
|
|
11-03-2007, 01:05 PM
|
#5
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
Ok, this is a newbie question and I apologize for that but I've been trying for the last 1/2 hour trying to figure out how exactly I access my hard drive from the live cd....
I know, let's all laugh at me....
but if someone could take 30 seconds and explain, I'd appreciate it!
|
|
|
11-03-2007, 01:21 PM
|
#6
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
Well, just mount your Fedora partition. Begin by doing
fdisk -l
and identify the device that corresponds to your Fedora / partition.
Then make a mountpoint on the livecd:
mkdir /mnt/fedora
then mount the partition:
mount /dev/sd?? /mnt/fedora (for the exact values of ??, see output of fdisk -l)
If all is going well, you can now access your hard drive from the livecd. Edit with:
gedit /mnt/fedora/etc/profile.d/java.sh (assuming that the livecd has gedit but any other editor should work too: nano, vim, kedit, ...)
Of course, you need root permissions to achieve all this. Some live distros will give you those by default, other ones need you to log in at the terminal as root first.
When you are ready (don't forget to save), unmount the partition again:
umount /mnt/fedora
Now you can reboot and all should be fine.
|
|
|
11-03-2007, 01:48 PM
|
#7
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
When I do that, I get a message that says /dev/sda already mounted or mnt/fedora busy
|
|
|
11-03-2007, 02:02 PM
|
#8
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
When you do what? I can't really advise if you don't give details.
|
|
|
11-03-2007, 02:06 PM
|
#9
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
When I do the /dev/sda2 /mnt/fedora command.
Thank you so much for your patience! You rock!
|
|
|
11-03-2007, 02:12 PM
|
#10
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
Additional information which may be helpful:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3648 29198137+ 8e Linux LVM
Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 28.7 GB, 28789702656 bytes
255 heads, 63 sectors/track, 3500 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
|
|
|
11-03-2007, 02:17 PM
|
#11
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
Ah, so apparently the drive gets automounted so you can simply skip that one. Now it's simply a matter of finding out exactly where it is mounted. Have a look in the /mnt and /media directories to find out. If you find "sda2" or "fedora" under mnt, you'd continue with
gedit /mnt/fedora(or sda2)/etc/profile.d/java.sh
|
|
|
11-04-2007, 04:12 AM
|
#12
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
That's what I thought at first as well.
I've tried both places, and there is nothing there. There is the 'fedora' folder under 'MNT', but it has nothing in it. It was the empty one I created earlier in the command. There is nothing under media - it is completely empty. I have looked in other possible places and have not found it. I also used the 'search' function to search the entire file system for the names of files I know I have on my computer - for instance the name of a specific document I was working on. They did not turn up in the search of the file system.
I still get the same output above when I do fdisk -l and the same error when I try to mount it.: already mounted or busy. There is no reason for it to be busy. I have tried restarting the computer. My friend and I were considering connected my hard drive via USB to another computer and accessing the file there but we do not have the neccessary cables.
Any ideas? I just need to change these two letters to restore the file path and get back to fedora. And a quick reminder for those just coming in - most normal commands are NOT responding in TWM. I am now booted into 'root' on the 'Fedora 7 Live' cd.
Thanks guys!
|
|
|
11-04-2007, 04:54 AM
|
#13
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
I would say, try providing the path to the command line yourself. The easiest thing would be simply to delete the java.sh file altogether. You'd just have to recreate it afterwards - although, as I said, you would be well-advised to use .bash_profile in your home directory rather than system-wide files. Here's the recipe:
/bin/rm /etc/profile.d/java.sh
|
|
|
11-04-2007, 04:58 AM
|
#14
|
Member
Registered: Dec 2005
Location: norfolk, va
Distribution: kubuntu, debian
Posts: 36
Rep:
|
try typing mount at the command prompt. this will give you a list of all mounted file systems.
if you dont see it there look in /proc/mounts.this will return a more detailed and up to date list of mounted file systems.
|
|
|
11-04-2007, 05:10 AM
|
#15
|
LQ Newbie
Registered: Nov 2007
Posts: 18
Original Poster
Rep:
|
Thank you, Jay73! That worked! The second I saw my neices picture on my background when I logged into GNome as MY NAME I was like "YESSSSSSSSS!" Thank you so, so much for all of your help! I can not tell you how much I appreciate this! I work in the media department (website design) for a non-profit organization and I will now be able to get my work done tomorrow!
Also special thanks to XWeb for your wonderful advice! It is definantly well-noted!
Job well done, guys!
|
|
|
All times are GMT -5. The time now is 06:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|