Archive for Linux Help

Grub boot kernel only once vs Lilo -R

People which started to use Linux in the `90 probably miss nowdays Lilo. Grub is now installed by default on every linux distro. However Grub is not that bad at all its only hard to get use to it in the begining.

I came accross one problem, trying to test vanila kernel which i compiled, however i did not know how to make grub to boot my kernel only once for a test (good old lilo -R new-kernel) command.

I started to search on google and i have found this:

booting-only-once
This seems to be quite old method because you would run into this problem:

root@boss [~]# grub-set-default 1
-bash: grub-set-default: command not found
root@boss [~]#
As you can see there is NO such command grub-set-default. I tought, okey maybe there are some additional rpm packages for grub which will replace this missing command, but i was not able to find ANYTHING!

After looking for grub`s tutorial i have came accross one nice command:

savedefault –default=X –once

This is the right command which replaces lilo -R or grub-set-default!

Now here is working example:

my /etc/grub.conf:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hdc
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title Fedora Core (VZ)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.1.4.el5.028stab035.1 ro root=/dev/VolGroup00/LogVol00 rhgb
initrd /initrd-2.6.18-8.1.4.el5.028stab035.1.img

title Fedora Core (2.6.17-1.2187_FC5)
root (hd0,0)
kernel /vmlinuz-2.6.17-1.2187_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb
initrd /initrd-2.6.17-1.2187_FC5.img

As you can see by my config file, the "VZ" kernel is default and it will be booted first.

The second kernel is "2.6.17-1.2187_FC5" - which is old FC5 kernel.

For test i want to boot "2.6.17-1.2187_FC5" old kernel first instead default "VZ" kernel.

To do that at shell prompt type:

grub

GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub>

Now type this: savedefault –default=1 –once

grub> savedefault –default=1 –once

Next line type: reboot

grub> reboot

and you are back into shell prompt.

Now reboot your system and thats it !

Simple! I did not come accross any tutorial which will explain in plain english how to boot kernel once !

Comments

Setup firewall on MySQL port 3306 by using Iptables.

how can i close port 3306.. I was told people can hack into my server through mysql on port 3306

you should close all ports, by default, and you can run mysql locally only

do you have a firewall?

how can i go at doing that.. by turning iptables off ?

yes, firewall should default to everything blocked, then open only what you need. No, you need iptables running for your firewall

I did iptables -A INPUT -p tcp -d 3306 -j REJECT

I guess I just said all that for nothing

I just googled it and thats what it said to do

Did you read _any_ of what I typed?

yes

You can run mysql on the localhost only, if you don't need to connect from another box, besides the firewall issue

i dont know how to do that :(

bind-address = 127.0.0.1, in my.cnf, and no external addresses

OK, thank you!

Comments

Keyboard shortcuts file for X,Gnome & Ubuntu

Sorry to bother you again, but do you know where I can find the keyboard shortcuts file for x/gnome/ubuntu? I need to edit it manually.

No, you've already asked me that

Alright, sorry. yeah, I asked a few guys yesterday. no one seems to know, which I find odd.

What does amavisd-new do exactly? The website isn't that clear.

Something to do with xset and xmodmap

I'll look it up, thanks.

http://www.wlug.org.nz/XFree86KeyboardMouseNotes

Awesome. thanks a lot. ;-)

Comments

Encrypted partition on Linux server

do anyone of you know if it is possible to have the partition table on a file and insert that to the kernel instead of using actual MBR from harddrive?

what would the point be?

booting from usb keyring and leaving MBR with only a windows partition to boot, as a part of disk encryption

obscurity is never a good security measure

I don't see the connection.

without usb keyring it is impossible to boot and readout partition table

oh ,you mean "hidden partitions" on teh disk? have fun patching the kernel.

if you want encryption, create a large file on a normal partition with a normal filesystem, adn then mount the file using aesloop and format it

i understood malex that was his idea

note that software can in theory examine the "empty" space and notice there's a filesystem on it.

that's the idea, luks device mapper or something

not empty urandom filled or encrypted

no zero parity bits

wheter there is a partition or not doesn't matter. it's how you use it that does. if it's encrypted, it's encrypted. might as well have a sane partition table

if it's empty or filled with random data it's NOT A FILESYSTEM.

even an encrypted filesystem ahs a partition and a signature. taht's how the kernel can know there's a filesystem there. if you're talking about an arbitrary non-partition disk block in empty space, have fun writing the driver.

i am not

the security nuts people I know, simply have a normal system install, and then their home directory is aesloop mounted file on the normal drive. They keep all things that should be secure in the aesloop home.

malex suggested only having the partition table known on the bootable usb keyring, not on the harddrive itself, kid of make it impossible to prove exist

doesn't sound useful to me at all

that's a completely unnecessary step.

If my friend things aesloop is a good solution for it, I have no reason to doubt it.

s/things/thinks/

ok, thanks for giving your point =)

Comments

Install mod_perl on apache 2.2 with Linux Fedora

how can I install mod_perl on apache 2.2 with fedora?

fedora claims that mod_perl is on the system in "add/remove software" but i cant find it

rpm -qa|grep perl
thx
mod_perl
mod_perl is listed…but …im not sure how to put it in httpd.conf
cuz i cant find any relevant files outside of documentation

rpm -q –filesbypkg mod_perl
thx
THAT one says "package mod_perl is not installed"
mod_perl requires apache files to compile
god damn it
huh ?

you said the other one showed it ?
it did
ok
woops lol wrong vnc
hahahahaha
use shell not vnc!

Comments

Using Yum at Linux

I have a question about using yum
Well.. a particular package is at 2.6 in the Yum repositories but it crashes all the time and this is a known issue.

In G entoo you can install older versions by specifiying the version number.
Can you install previous versions of an app using Yum?
Any ideas Jy?

I don't think you can with yum
using older versions is stupid

and yes you can do it using rpms

not advisable though

And im with JY on this one too
PsychOmeg: I use FC5 as my desktop at work. Evolution 2.6 crashes left and right… everytime I open it. It's apparently a known issue with 2.6.
I've read 2.2 is quite stable.
well what does the developers site say ?

Wouldnt it be better to get a fixed version and compile a rpm ?
Haven't gotten that far yet.
thats what id do
I have the source for 2.2. But its now dependency hell time. :)
yes

Get something newer
check with the developers
Yeah I could.. Smetimes takes so long for a reply.
no i meant check for newer source

well and then debug info
should be in the tar ball
Oh they have 2.4 and 2.6 and 2.7 (unstable) source
then get a spec file modify it to suit needs and compile rpm

done
That's just it. Not sure what makes it crash. Could be the way the RPM was built. Could be the version itself.
strace ftw

debug ftw

error codes ftw

;-p

logs ftw!
Man.. a lot of damn work just to connect to an Exchange server! :)

Comments

Crontab problems

does /etc/cron.daily run at midnight?

depends what cron is set to

/etc/crontab
02 4 * * * root run-parts /etc/cron.daily
i suck at cron rofl
let me read

thats 4am ?
0 4 * * * root run-parts /etc/cron.daily
0 0 * * * root run-parts /etc/cron.daily
that be right?

* * * * * command to be executed
- - - - -
| | | | |
| | | | —– day of week (0 - 6) (Sunday=0)
| | | ——- month (1 - 12)
| | ——— day of month (1 - 31)
| ———– hour (0 - 23)
————- min (0 - 59)

ok :)
Thank you
Thanks for the help man

Comments

« Previous entries ·