Re: Server cannot boot : mount root> got stuck

2010-07-01 Thread Bryan Venteicher
> From: "dhaneshk k" 
> To: freebsd-questions@freebsd.org
> Sent: Friday, July 2, 2010 12:26:34 AM
> Subject: Server cannot boot : mount root> got stuck

> Fellow FreeBSDians,
> 
> 
> I am experiencing a problem with my FreeBSD server box. I can't get
> the system up. when I boot the machine its boots asking for boot
> options, and going with the default boot option
> This is an old freeBSD server box with FreeBSD-6.1
> 
> then its reaching mount root>
> 
> after that nothing, its stuck on this prompt mount root>
> 
> mount root>
> 
> I didn't do anything, day before yesterday its working..
> Yesterday when I tried to login from my desktop , it not allowing me
> to login through my ssh keys
> so I checked physically the server and connected a monitor, seeing the
> boot splash image is garbled with some alphabetic characters.. and
> tried to reboot, hardware reboot.
> But it reaching the boot splash image of FreeBSD with boot options
> displayed, but what ever boot option I select , it not going further,
> but reboots again to the boot splash image screen.
> 
> Today morning I just took its hard disk and connected to another box
> having same specs
> Then I started the box, with the harddisk of my server ..., then it
> going after the boot, so I thought issues over...
> 
> But my bad, this time it comes to a prompt mount root > and stuck
> there..

When you moved the disk to the other server, the device name
probably was changed. When you get a working keyboard, you can use
'?' at that prompt to see what devices GEOM knows about or determine
it from the boot messages.

> 
> No key board inputs works in mount root> prompt

Odd. Are you using a USB keyboard?

> 
> 
> Any hints to recover this issue, most appreciated, and this is a
> production server , and I want it up as early as possible.
> 
> Thanks in Advance
> Dhanesh
> 
> _
> Bollywood This Decade
> http://entertainment.in.msn.com/bollywoodthisdecade/___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions To
> unsubscribe, send any mail to
> "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Bash and arrays

2009-07-14 Thread Bryan Venteicher

- Jay Hall  wrote:
> Ladies and Gentlemen,
> 
> I thought I understood how arrays work in bash, but I have been proven  
> wrong.  I am reading lines from a file and placing them in an array.   
> However, when I am finished, the array has a length of 0.
> 
> Following is the code I am using.
> 
> #!/usr/local/bin/bash
> COUNTER=0
> cat ./test_file.txt | while read LINE
> do
>  echo ${LINE}
>  FOO[${COUNTER}]=${LINE}
>  COUNTER=`expr ${COUNTER} + 1`
> done
> 
> echo ${#f...@]}
> echo ${#FOO[*]}
> 
> 
> And, here is the output.
> 
> test_file
> file_size
> 0
> 0
> 
> Thanks in advance for any help you can offer.

The right hand side of the pipe is running in its own subshell so
it has its own copy of FOO.

One fix is
#!/usr/local/bin/bash
COUNTER=0
while read LINE
do
 echo ${LINE}
 FOO[${COUNTER}]=${LINE}
 COUNTER=`expr ${COUNTER} + 1`
done < ./test_file.txt

> 
> 
> Jay
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"