http://jwalanta.blogspot.com/2011/05/grub2-recordfail-fail.html
I have this headless, keyboardless server running on Ubuntu 10.04. Runs fine, but once in a while while there's power cut off the server still remains dead when the power is back. I connected monitor and keyboard and found that the problem is with Grub2.
Turns out there's a variable named recordfail which is set to 1 during next boot whenever there's some problem with the computer (like due to power failure).
Now if you see /boot/grub/grub.cfg file, it has the following lines:
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
Which means, the timeout counter is disabled whenever the recordfail variable is set. This is nice for desktop environment, which has a monitor, so I can see the Grub countdown is disabled so I can proceed with Repair option if I have to, but for headless servers the computer just sits idle at Grub screen, puzzling the poor sysadmin.
Fix? I changed the timeout=-1 to timeout=10.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Tuesday, December 13, 2011
Sunday, December 11, 2011
Installing ubuntu 11.04 server via USBstick
The installer halts at "[!!] Detect and mount CD-ROM" - "Your installation CD-ROM couldn't be mounted. Try again to mount the CD-ROM? (Yes/No)"
1. When you get the error, Alt-F2 to a second console.
2. Find out which device your USB stick is (tail -n 100 /var/log/syslog)
3. Then mount it to /cdrom (mount -t vfat /dev/sd[abcd] /cdrom
4. Alt-F1 to get back to the install console, and try detecting again
***Make the startup USB disk writable when create it, it will be no such error after restart
1. When you get the error, Alt-F2 to a second console.
2. Find out which device your USB stick is (tail -n 100 /var/log/syslog)
3. Then mount it to /cdrom (mount -t vfat /dev/sd[abcd] /cdrom
4. Alt-F1 to get back to the install console, and try detecting again
***Make the startup USB disk writable when create it, it will be no such error after restart
Wednesday, February 16, 2011
find your computer's neighbourhood ip address by one linux command
Run below line as one command in linux
for i in `seq 0 254`; do sudo arping -I eth0 -c1 -f 192.168.1.$i; done |grep Unicast
Wednesday, February 9, 2011
linux & mysql shell shorcut - good for mobile ssh
Key Sequence | Meaning |
---|---|
Up arrow or Ctrl-P | Recall previous line |
Down arrow or Ctrl-N | Recall next line |
Left arrow or Ctrl-B | Move cursor left (backward) |
Right arrow or Ctrl-F | Move cursor right (forward) |
Escape b | Move backward one word |
Escape f | Move forward one word |
Ctrl-A | Move cursor to beginning of line |
Ctrl-E | Move cursor to end of line |
Ctrl-D | Delete character under cursor, Ctrl-U Clear the line before cursor position |
Delete | Delete character to left of cursor |
Escape D | Delete word |
Escape Backspace | Delete word to left of cursor |
Ctrl-K | Erase everything from cursor to end of line |
Ctrl-_ | Undo last change; may be repeated |
Ctrl + R Let’s you search through previously used commands
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + K Clear the line after the cursor
Subscribe to:
Posts (Atom)