Results 1 to 10 of 14
Hi I have Fedora on a Drive that that has been running fine as a server until I added a program path environment to bashrc something like PATH:$APPLICATIONNAME... which has ...
- 11-05-2011 #1Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
Fedora doesnt get to Login Screen
Hi I have Fedora on a Drive that that has been running fine as a server until I added a program path environment to bashrc something like PATH:$APPLICATIONNAME... which has screwed everything up. I've been running the setup for a couple of years and everything was running sweet. So hopefully a nice person out there can get me back on the road
Heres the the setup
1000 GB Hard Disk
|WD My Book 1110
|MBR Partition Table
|
|___210 MB Filesystem
| Linux Ext4 (version 1.0) Type Linux(0x83) Bootable
|
|___80 GB LVM2 Physical Volume Type Linux LVM (0x8e)
| 80 GB
|
|___SPACE
919 GB FAT (32-bit version) Type W95 FAT32 (0x0b) Bootable
On the installation I created a user drqueue and a drqueue.localdomain on the 80GB partition which is used as the server part (there are NFS shares, samba setup etc ).
//to try and rectify things
I went into the F9 on startup and edited the GRUB and accessed the /etc/bashrc file using vi bash. This bashrc file is on the 80GB partition ( I can see all my other files using ls)
and made sure it had PATH= $PATH:/bin:/usr/bin:/usr/local/bin:/usr/lib/qt-3.3:/usr/local/drqueue/software/bin:/sbin to try and correct things but it made no difference.
What should happen is I should get to the login screen with drqueue.localdomain. At the moment things just get paused on a fedora screen.
I ran df-h in GRUB and get this
Filesystem____________________________Size____ Used______Avail Use____________Mounted on
/dev/mapper/vg_may-lv_root _____ 70G_____ 48G_______22G_____69%_____ /
tmpfs _____ 881M____ 0 ___881M___0%______ /dev/shm
/dev/sda1 _________194M ___ 22M ______163M__12%_______ /boot
Regards and Thanks for any possible help.
Luke
- 11-06-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
Start the system with a recovery disc or live CD/DVD/USB, mount the root file system, and edit the bashrc file to remove the new path. Then, simply reboot.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-06-2011 #3Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
Thanks for the reply, I'm reading through
i'm having a read through docs.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/s1-rescuemode-boot.html]17.2.*Booting into Rescue Mode
Can you clarify - is the root file system on the 210MB partition? I dont quite understand the read out from df-h where it says "/dev/mapper/vg_may-lv_root" mounted on "/"
I thought "/" is the root and how can it be the root on the 210MB partition if it is 70G in size. or is the root "/boot" on dev/sda1
What is workflow to mount the root file system after installing the installation disc? Is the root file system something you can't edit when your in the grub? And also is there a bashrc on the 210MB as well as the one I've edited on the 80GB partition? Sorry for all the newbie sounding questions. I've been using Linux for a couple of years and lot of it still feels opaque to me!!Last edited by linuxuser3000; 11-06-2011 at 03:07 PM. Reason: clarification
- 11-08-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
No, the root filesystem, "/", is on your /dev/mapper/vg_may-lv_root partition (yours is 80GB).
The /dev/sda1 partition is mounted at /boot. The /boot partition (210MB in your case) contains grub loader and config files, bootable kernels and kernel-related files. All profile files (/etc/bashrc, ~/.bashrc, etc.) will be in the root ("/") filesystem.
The init process mounts your root partition for you, after the kernel is done loading. You don't have to do anything to make it happen (and you shouldn't want to). I don't know if you can edit the filesystem within grub - I wouldn't if I could.
If I were you, I'd try appending init=/bin/sh to the kernel boot arguments at the grub boot prompt. After the kernel loads, that should skip the most of the init process and drop you right to a simple bash prompt w/o reading any (bad) profile scripts. Then you should be able to edit whatever you did and then reboot.
- 11-10-2011 #5Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
ok I can now get fully into Linux - I removed export PATH=$APPLICATIONNAME/bin from the /etc/profile file. which caused the issue.
I have a different issue now
What I used to get and what I want is
"[root@drqueue drqueue]#" when ever I opened terminal
now I get "bash-4.0#"
Any suggestions how I can get back what it should it be??Last edited by linuxuser3000; 11-10-2011 at 10:09 AM.
- 11-10-2011 #6Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
What you are missing is the nice custom prompt (PS1). Sounds like one of your profile scripts got mangled. Check the output of this command for any modified files:
The setup package owns /etc/profile and /etc/bashrc, amongst others. If the rpm command lists any of them as modified, post their contents. Also, look for the existence of these files, and examine them for problems. You can put 'set -x' at the top of them to see what is going on.Code:rpm -qV setup
If you're not sure, you can post the contents of them and we'll look at them.Code:~/.bashrc ~/.profile ~/.bash_profile
Also note that any scripts in /etc/profile.d/*.sh exist, they will get sourced, too - so if one of them is borked, you may see problems.
- 11-11-2011 #7Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
Hi Atreyu, thanks for the reply and any further advice.
rpm -qV setup give me
bash-4.0# rpm -qV setup
S.5....T. c /etc/bashrc
.M....... c /etc/exports
S.5....T. c /etc/profile
S.5....T. c /etc/securetty
.M....... /usr/share/doc/setup-2.8.9
.M....... d /usr/share/doc/setup-2.8.9/COPYING
.M....... d /usr/share/doc/setup-2.8.9/uidgid
bash-4.0#
If M means modified then I have the following
gedit /etc/exports
/usr/local/software 192.168.4.4(rw,no_root_squash,sync) 192.168.4.6(rw,no_root_squash,sync) 192.168.4.7(rw,no_root_squash,sync) 192.168.4.8(rw,no_root_squash,sync) 192.168.4.9(rw,no_root_squash,sync) 192.168.4.10(rw,no_root_squash,sync)
gedit /usr/share/doc/setup-2.8.9/COPYING
/usr/share/doc/setup-2.8.9/COPYING
/usr/share/doc/setup-2.8.9/COPYING: line 1: Setup: command not found
/usr/share/doc/setup-2.8.9/COPYING: line 3: You: command not found
/usr/share/doc/setup-2.8.9/COPYING: line 4: without: command not found
bash-4.0#
gedit /usr/share/doc/setup-2.8.9/uidgid
NAME UID GID HOME SHELL PACKAGES
root 0 0 /root /bin/bash setup
bin 1 1 /bin /sbin/nologin setup
daemon 2 2 /sbin /sbin/nologin setup
sys - 3 - - setup
adm 3 4 /var/adm /bin/bash setup
tty - 5 - - setup
disk - 6 - - setup
lp 4 7 /var/spool/lpd /sbin/nologin setup
mem - 8 - - setup
kmem - 9 - - setup
wheel - 10 - - setup
cdrom - 11 - - udev,MAKEDEV
sync 5 (0) /sbin /bin/sync setup
shutdown 6 (0) /sbin /sbin/shutdown setup
halt 7 (0) /sbin /sbin/halt setup
mail 8 12 /var/spool/mail /sbin/nologin setup
news 9 13 /var/spool/news /sbin/nologin setup
uucp 10 14 /var/spool/uucp /sbin/nologin setup
operator 11 (0) /root /sbin/nologin setup
games 12 (100) /usr/games /sbin/nologin setup
gopher 13 30 /usr/lib/gopher-data /sbin/nologin setup
ftp 14 50 /var/ftp /sbin/nologin setup
man - 15 - - setup
oprofile 16 16 /home/oprofile /sbin/nologin oprofile
pkiuser 17 17 /usr/share/pki /sbin/nologin pki-ca,rhpki-ca
dialout - 18 - - udev,MAKEDEV
floppy - 19 - - dev,MAKEDEV
games - 20 - - setup
slocate - 21 - - slocate
utmp - 22 - - initscripts,libutempter
squid 23 23 /var/spool/squid /dev/null squid
pvm 24 24 /usr/share/pvm3 /bin/bash pvm
named 25 25 /var/named /bin/false bind
postgres 26 26 /var/lib/pgsql /bin/bash postgresql-server
mysql 27 27 /var/lib/mysql /bin/bash mysql
nscd 28 28 / /bin/false nscd
rpcuser 29 29 /var/lib/nfs /bin/false nfs-utils
console - 31 - - dev
rpc 32 32 / /bin/false portmap
amanda 33 (6) /var/lib/amanda /bin/false amanda
tape - 33 - - udev,MAKEDEV
netdump 34 34 /var/crash /bin/bash netdump-client, netdump-server
utempter - 35 - - libutempter
vdsm 36 - / /bin/bash kvm, vdsm
kvm - 36 - - kvm, vdsm, libvirt
rpm 37 37 /var/lib/rpm /bin/bash rpm
ntp 38 38 /etc/ntp /sbin/nologin ntp
video - 39 - - setup
dip - 40 - - setup
mailman 41 41 /var/mailman /bin/false mailman
gdm 42 42 /var/gdm /bin/bash gdm
xfs 43 43 /etc/X11/fs /bin/false XFree86-xfs
pppusers - 44 - - linuxconf
popusers - 45 - - linuxconf
slipusers - 46 - - linuxconf
mailnull 47 47 /var/spool/mqueue /dev/null sendmail
apache 48 48 /var/www /bin/false apache
wnn 49 49 /home/wnn /bin/bash FreeWnn
smmsp 51 51 /var/spool/mqueue /dev/null sendmail
puppet 52 52 /var/lib/puppet /sbin/nologin puppet
tomcat 53 53 /var/lib/tomcat /sbin/nologin tomcat
lock - 54 - - lockdev
ldap 55 55 /var/lib/ldap /bin/false openldap-servers
frontpage 56 56 /var/www /bin/false mod_frontpage
nut 57 57 /var/lib/ups /bin/false nut
beagleindex 58 58 /var/cache/beagle /bin/false beagle
tss 59 59 - /sbin/nologin trousers
piranha 60 60 /etc/sysconfig/ha /dev/null piranha
prelude-manager 61 61 - /sbin/nologin prelude-manager
snortd 62 62 - /sbin/nologin snortd
audio - 63 - - setup
condor 64 64 /var/lib/condor /sbin/nologin condord
nslcd 65 (55) / /sbin/nologin nslcd
wine - 66 - - wine
pegasus 66 65 /var/lib/Pegasus /sbin/nologin tog-pegasus
webalizer 67 67 /var/www/html/usage /sbin/nologin webalizer
haldaemon 68 68 / /sbin/nologin hal
vcsa 69 69 - /sbin/nologin dev,MAKEDEV
avahi 70 70 / /sbin/nologin avahi
realtime - 71 - - -
tcpdump 72 72 / /sbin/nologin tcpdump
privoxy 73 73 /etc/privoxy /bin/bash privoxy
sshd 74 74 /var/empty/sshd /sbin/nologin openssh-server
radvd 75 75 / /bin/false radvd
cyrus 76 (12) /var/imap /bin/bash cyrus-imapd
shadow - 76 - - cyrus-imapd
arpwatch 77 77 /var/lib/arpwatch /sbin/nologin arpwatch
fax 78 78 /var/spool/fax /sbin/nologin mgetty
nocpulse 79 79 /etc/sysconfig/nocpulse /bin/bash nocpulse
desktop 80 80 - /sbin/nologin desktop-file-utils
dbus 81 81 / /sbin/nologin dbus
jonas 82 82 /var/lib/jonas /sbin/nologin jonas
clamav 83 83 /tmp /sbin/nologin clamav
screen - 84 - - screen
quaggavt - 85 - - quagga
sabayon 86 86 - /sbin/nologin sabayon
polkituser 87 87 / /sbin/nologin PolicyKit
wbpriv - 88 - - samba-common
postfix 89 89 /var/spool/postfix /bin/true postfix
postdrop - 90 - - postfix
majordomo 91 91 /usr/lib/majordomo /bin/bash majordomo
quagga 92 92 / /sbin/nologin quagga
exim 93 93 /var/spool/exim /sbin/nologin exim
distcache 94 94 / /sbin/nologin distcache
radiusd 95 95 / /bin/false freeradius
hsqldb 96 96 /var/lib/hsqldb /sbin/nologin hsqldb
dovecot 97 97 /usr/libexec/dovecot /sbin/nologin dovecot
ident 98 98 / /sbin/nologin ident
nobody 99 99 / /sbin/nologin setup
users - 100 - - setup
qemu 107 107 / /sbin/nologin libvirt
ovirt 108 108 / /sbin/nologin libvirt
saned 111 111 / /sbin/nologin sane-backends
gnats ? ? ? ? gnats, gnats-db
listar ? ? ? ? listar
nfsnobody 65534 65534 /var/lib/nfs /sbin/nologin nfs-utils
# Note: nfsnobdy is 4294967294 on 64-bit platforms (-2)
- 11-11-2011 #8Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
So according to the output of the rpm verification command, your /etc/bashrc and /etc/profile have changed. Can you post their contents?
If you want, you can also just reinstall that package, which will replace those files:
Above is untested - the setup package is fairly important, so no idea if that will work, flat-line your system, etc. - you've been warned!Code:rpm -e --justdb --nodeps setup yum install setup
Also, be sure to check out the other login scripts in /root, as I mentioned.
- 11-15-2011 #9Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
hi again, ok i get
#/etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
# It's NOT good idea to change this file unless you know what you
# are doing. Much better way is to create custom.sh shell script in
# /etc/profile.d/ to make custom changes to environment. This will
# prevent need for merging in future updates.
# By default, we want this to get set.
# Even for non-interactive, non-login shells.
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi
# are we an interactive shell?
if [ "$PS1" ]; then
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\033\\"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
# You might want to have e.g. tty in prompt (e.g. more virtual machines)
# and console windows
# If you want to do so, just add e.g.
# if [ "$PS1" ]; then
# PS1="[\u@\h:\l \W]\\$ "
# fi
# to your custom modification shell script in /etc/profile.d/ directory
fi
if ! shopt -q login_shell ; then # We're not a login shell
# Need to redefine pathmunge, it get's undefined at the end of /etc/profile
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|
$1($|
" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# Only display echos from profile.d scripts if we are no login shell
# and interactive - otherwise just process them to set envvars
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. $i
else
. $i >/dev/null 2>&1
fi
fi
done
unset i
unset pathmunge
fi
# vim:ts=4:sw=4
#EXR
# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
PATH=$PATH:/usr/lib/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/drqueue/bin
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
# It's NOT good idea to change this file unless you know what you
# are doing. Much better way is to create custom.sh shell script in
# /etc/profile.d/ to make custom changes to environment. This will
# prevent need for merging in future updates.
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|
$1($|
" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
pathmunge /sbin after
fi
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname 2>/dev/null`
HISTSIZE=1000
HISTCONTROL="ignoreboth"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. $i
else
. $i >/dev/null 2>&1
fi
fi
done
unset i
unset pathmunge
# DRQUEUE
export DRQUEUE_ROOT=/usr/local/drqueue/bin/slave.Linux.i686
export DRQUEUE_MASTER=192.168.4.3
export DRQUEUE_TMP=/usr/local/drqueue/tmp
export DRQUEUE_DB=/usr/local/drqueue/db
export DRQUEUE_LOGS=/usr/local/drqueue/logs
export DRQUEUE_ETC=/usr/local/drqueue/etc
export DRQUEUE_BIN=/usr/local/drqueue/bin
#3DELIGHT
export DELIGHT=/usr/local/software/3delight-9.0.0/Linux-i686
export DL_DISPLAYS_PATH=/usr/local/software/3delight-9.0.0/Linux-i686/displays
export DL_SHADERS_PATH=/usr/local/software/3delight-9.0.0/Linux-i686/shaders
source /usr/local/software/3delight-9.0.0/.3delight_bash
# export DELIGHT=/media/SPACE/3delight-9.0.0/Linux-i686
# export DL_DISPLAYS_PATH=/media/SPACE/3delight-9.0.0/Linux-i686/displays
# export DL_SHADERS_PATH=/media/SPACE/3delight-9.0.0/Linux-i686/shaders
# source /media/SPACE/3delight-9.0.0/.3delight_bash
#EXR
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
- 11-15-2011 #10Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
When change the PATH environment to add something to the current PATH, then enclose the PATH variable in curly braces, as in:
This is the, AFAIK, the only safe way to recursively define $PATH.Code:export PATH=newdir1:${PATH}:newdir2Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote