SRCDS Steam group


Linux kernel
#1
Hello.

I've just finished compiling this kernel 2.6.26.8-rt16.

Now that I want to set that one as default I cannot find exactly where to set it? I've tried to run "update-grub" and it updated successfully.
Code:
realchamp@kk10:/boot/grub$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic-pae
Found initrd image: /boot/initrd.img-2.6.31-14-generic-pae
Found linux image: /boot/vmlinuz-2.6.26.8-rt16
Found initrd image: /boot/initrd.img-2.6.26.8-rt16
Found memtest86+ image: /memtest86+.bin
done

When I goto my boot/grub/menu.lst or grub.conf I find both of them empty. How I am supposed to set it to boot on that as default?

Linux Ubuntu Server 9.10 32bit.

- realchamp.
Reply
#2
Hi realchamp,

Just double checking. So you have compiled the kernel and installed all the following files successfully:
Quote:/lib/modules/2.6.26.8-rt16/
/boot/config-2.6.26.8-rt16
/boot/vmlinuz-2.6.26.8-rt16
/boot/initrd.img-2.6.26.8-rt16

And in your /boot/grub/menu.lst (grub.conf is a symlink to menu.lst, which you might not have), you have:
Quote:title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid (same string as the other existing ones are having)
kernel /boot/vmlinuz-2.6.26.8-rt16 root=UUID=(same string as the other existing ones are having) ro quiet splash
initrd /boot/initrd.img-2.6.26.8-rt16
quiet

Still talking about the kernel list section in menu.lst. Let's say you got 2 different kernels, as:
Quote:title Ubuntu 9.10, kernel (whatever the working default you have)
uuid
kernel
initrd
quiet

title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid
kernel
initrd
quiet

In the beginning part of menu.lst, there is a line:
Quote:default (some integer)

Set that integer to match the position of your desired kernel in the kernel list. The numbering starts from 0. So according to the above sample, your working default kernel is 0, and your 2.6.26.8-rt16 is 1.

Yet, I would suggest doing this:
Quote:default saved
.
.
.

title Ubuntu 9.10, kernel (whatever the working default you have)
uuid
kernel
initrd
quiet
savedefault

title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid
kernel
initrd
quiet
savedefault

Then before rebooting, set your working kernel as the default, and set your new kernel to run once after a reboot. To do that, type grub, then you will see the shell prompt changed to grub>, then input the following one by one:
Quote:savedefault --default=0
savedefault --default=1 --once
quit

then reboot.

After the reboot, 2.6.26.8-rt16 will be the default for once. If you reboot again, it will set back to the old one.

If 2.6.26.8-rt16 is working fine, then just use grub again, and do:
Quote:savedefault --default=1
quit


Hope that helps.
A less annoying signature... (link)
Reply
#3
(01-14-2010, 12:43 AM)realchamp Wrote:  When I goto my boot/grub/menu.lst or grub.conf I find both of them empty.

Oh, I missed that part... Why would they both be empty...

I don't remember off my head about how to generate a new one, but you can try the following:

1)
You got two available kernels:

2.6.31-14-generic-pae // Your default I assume
2.6.26.8-rt16

2)
Find out your primary partition UUID by doing:
Quote:df

which will display your partition setup, and you check which is your primary partition.

Then:
Quote:vol_id /dev/< Name of that primary >

For example:

vol_id /dev/sda1

3)
Then copy & paste the following to your /boot/grub/menu.lst:
Quote:# Default Options
default saved

timeout 5

hiddenmenu

# Debian Kernels list
title Ubuntu 9.10, kernel 2.6.31-14-generic-pae
uuid (replace with the UUID you have found in step 2)
kernel /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=(replace with the UUID you have found in step 2) ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic-pae
quiet
savedefault

title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid (replace with the UUID you have found in step 2)
kernel /boot/vmlinuz-2.6.26.8-rt16 root=UUID=(replace with the UUID you have found in step 2) ro quiet splash
initrd /boot/initrd.img-2.6.26.8-rt16
quiet
savedefault

4)
Use the method in my previous post, to set the default booting kernel.

5)
Done.
A less annoying signature... (link)
Reply
#4
just to be sure: it's /boot/grub/menu.lst (with leading /)... if that one is empty, grub will not be able to boot. but: grub can be told to use another partition to look for it's configuration. on some systems there is an additional boot partition, maybe it's just not mounted. try "mount /boot" (will only work if that boot partition is in /etc/fstab) or look for a small partition e.g. with cfdisk.
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#5
Thanks for replies.

When I write df I get this.
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/kk10-root
                     474485920   4430832 445952588   1% /
udev                   1030336       228   1030108   1% /dev
none                   1030336         4   1030332   1% /dev/shm
none                   1030336        52   1030284   1% /var/run
none                   1030336         0   1030336   0% /var/lock
none                   1030336         0   1030336   0% /lib/init/rw
/dev/sda5               233335     26165    194722  12% /boot
/home/realchamp/.Private
                     474485920   4430832 445952588   1% /home/realchamp
Which id? Smile
Reply
#6
As BehaartesEtwas pointed out, when you checked menu.lst, and found it was empty, did you miss the leading /, that you did something like:

Quote:vim boot/grub/menu.lst

or

cat boot/grub/menu.lst

but that shouldn't find the file and returned an error message to you. It could be even on another partition as BehaartesEtwas said. I don't know...

So again, you do have those files?
Quote:/lib/modules/2.6.26.8-rt16/
/boot/config-2.6.26.8-rt16
/boot/vmlinuz-2.6.26.8-rt16
/boot/initrd.img-2.6.26.8-rt16


Before editing the menu.lst, you might want to double check your existing menu.lst file first.

Do (as su, or su -):
Quote:updatedb
locate menu.lst -b

The -b is for showing only the results, with the ending part matching your file name.


(01-15-2010, 01:12 AM)realchamp Wrote:  Which id? Smile

vol_id /dev/sda5
A less annoying signature... (link)
Reply
#7
or maybe it's the opposite from what I said: unmount your /boot partition (i.e. umount /boot), maybe it's not used by grub and the files are on the root partiton...
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#8
(01-14-2010, 02:41 PM)3choE Wrote:  Hi realchamp,

Just double checking. So you have compiled the kernel and installed all the following files successfully:
Quote:/lib/modules/2.6.26.8-rt16/
/boot/config-2.6.26.8-rt16
/boot/vmlinuz-2.6.26.8-rt16
/boot/initrd.img-2.6.26.8-rt16

And in your /boot/grub/menu.lst (grub.conf is a symlink to menu.lst, which you might not have), you have:
Quote:title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid (same string as the other existing ones are having)
kernel /boot/vmlinuz-2.6.26.8-rt16 root=UUID=(same string as the other existing ones are having) ro quiet splash
initrd /boot/initrd.img-2.6.26.8-rt16
quiet

Still talking about the kernel list section in menu.lst. Let's say you got 2 different kernels, as:
Quote:title Ubuntu 9.10, kernel (whatever the working default you have)
uuid
kernel
initrd
quiet

title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid
kernel
initrd
quiet

In the beginning part of menu.lst, there is a line:
Quote:default (some integer)

Set that integer to match the position of your desired kernel in the kernel list. The numbering starts from 0. So according to the above sample, your working default kernel is 0, and your 2.6.26.8-rt16 is 1.

Yet, I would suggest doing this:
Quote:default saved
.
.
.

title Ubuntu 9.10, kernel (whatever the working default you have)
uuid
kernel
initrd
quiet
savedefault

title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid
kernel
initrd
quiet
savedefault

Then before rebooting, set your working kernel as the default, and set your new kernel to run once after a reboot. To do that, type grub, then you will see the shell prompt changed to grub>, then input the following one by one:
Quote:savedefault --default=0
savedefault --default=1 --once
quit

then reboot.

After the reboot, 2.6.26.8-rt16 will be the default for once. If you reboot again, it will set back to the old one.

If 2.6.26.8-rt16 is working fine, then just use grub again, and do:
Quote:savedefault --default=1
quit


Hope that helps.

Running.. savedefault --default=0 gave me this: Segmentation fault
Reply
#9
(01-16-2010, 08:55 AM)realchamp Wrote:  Running.. savedefault --default=0 gave me this: Segmentation fault

realchamp,

(Again, do the following as either su, or su -)

Did you run the grub command from console mode, or from the terminal in desktop (Gnome or KDE)?

If you run the grub command from desktop terminal, it might be issue like the following (as it happens in the terminal):
Quote:# grub

grub> savedefault --default=1

grub> savedefault --default=1Segmentation fault

If so, stop GDM or KDM first, by doing :
Quote:/etc/init.d/gdm stop

or

/etc/init.d/kdm stop

then run grub in console.


Or don't use the "default saved" option, so you don't have to run the grub command to set the default.
(But for setting a remote box, if running into issue with the new custom kernel, it would be hard to fix it at your end)

Edit your menu.lst as:
Quote:# Default Options
default 1

timeout 5

hiddenmenu

# Debian Kernels list
title Ubuntu 9.10, kernel 2.6.31-14-generic-pae
uuid (replace with the UUID you have found in step 2)
kernel /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=(replace with the UUID you have found in step 2) ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic-pae
quiet

title Ubuntu 9.10, kernel 2.6.26.8-rt16
uuid (replace with the UUID you have found in step 2)
kernel /boot/vmlinuz-2.6.26.8-rt16 root=UUID=(replace with the UUID you have found in step 2) ro quiet splash
initrd /boot/initrd.img-2.6.26.8-rt16
quiet


You can also try not to use UUID.

Then first find some needed info. Use my box for example (say I use 2.6.26.8-rt16):
Quote:df -h /boot
[Image: 01151001.png]

cat /boot/grub/device.map
[Image: 01151002.png]

df -h /
[Image: 01151003.png]

From the above:

- /boot is mounted on /, and / is as sda1, but Grub partition numbers are one less than Linux numbers, so for my setup, it is 0.

- then sda = hd0

- thus translates the whole thing to hd0, 0

So for my menu.lst, is:
Quote:title Ubuntu 9.10, kernel 2.6.26.8-rt16
root (hd0, 0)
kernel /boot/vmlinuz-2.6.26.8-rt16 root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.26.8-rt16
quiet
A less annoying signature... (link)
Reply
#10
I am lost.... I re installed the entire box last night and I still can't get it to work. . .

Even attempted to delete default kernel and boot, no success. And I installed webmin so I could try with a GUI, didn't work either. : (,)

Now when I got the boot menu(sitting at the physical PC) I got a mount issue on ext4 while attempting to boot costum kernel.
Reply
#11
(01-17-2010, 04:03 AM)realchamp Wrote:  Now when I got the boot menu(sitting at the physical PC) I got a mount issue on ext4 while attempting to boot costum kernel.

then make sure ext4 is compiled into your custom kernel (meaning not as a module, [X] instead of [M]!).
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#12
(01-17-2010, 04:03 AM)realchamp Wrote:  I am lost.... I re installed the entire box last night and I still can't get it to work. . .

realchamp,

1)
Just curious, how many HDD are you using for this Linux setup?

2)
Are you using this Linux setup mainly for hosting game servers? If so, for the partitions, instead of using the default, I would suggest using just:

Quote:/
As = Primary
Size = (Fill up with the available)
Use as = ext3
Mount point = /
Mount options = relatime
Label = (Label or not, your choice)
Reserved blocks = 5%
Typical usage = standard
Bootable = Yes
Location = Beginning of the available space

swap
Use as = Swap
Size = 2.0 GB
Bootable = No
Location = Beginning of the available space

That isn't the best practice, but it is more straightforward, and it works fine for me.

3)
By the way, use ext3 instead of ext4 for the /boot partition. I tried that just a month ago myself, and I can confirm it causes issues.

Just do a web search with ext4 boot partition, that should find you some explanations on this.

4)
Again, just use one HDD during the installation, with only / & swap.


As BehaartesEtwas mentioned, for 2.6.26.8-rt16, make sure ext4 is [X] (I think it is [*]. Anyway, minor thing), as by default, 2.6.26.8-rt16 doesn't have that enabled.

I would suggest trying the 2.6.32.3 though, as it has HPET implemented.

According to the wiki (link), HPET works better than RTC, and I believe that's the reason a member of this forum is having good result with the vanilla 2.6.32.x kernel.

Of course your mobo has to have HPET available.

My home box is a dinosaur (link), and I am using Windows for my remote dedi now, so I cannot confirm that myself.
A less annoying signature... (link)
Reply
#13
(01-18-2010, 09:33 AM)3choE Wrote:  Are you using this Linux setup mainly for hosting game servers? If so, for the partitions, instead of using the default, I would suggest using just:

I suggest separating the system from the game servers and all other "data"-like stuff (e.g. web pages), for several reasons:
- if you decide to reinstall linux, you don't loose everything
- if you root partition gets full, linux will crash. so it's better to keep all dynamic stuff out of the root partiton
- speed is generally slightly better

Additionally I would recommend to use a tmpfs for /tmp (i.e. a ram disk).

Generally, what 3choE works fine as well, but you can save a lot of trouble with an additional partition.

Quote:I think it is [*]. Anyway, minor thing
true, sorry ;-)

Quote:I would suggest trying the 2.6.32.3 though, as it has HPET implemented.
HPET is implemented since ages. Where did you read that it's implemented only in 2.6.32? I use it since 2.6.22 or so (and it wasn't new then). But maybe you meant something different than I understand? So please give us a quote where you read it :-)
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#14
BehaartesEtwas,

Yup, I misinformed him on this one (stupid me Toungue).

I have never compiled Linux kernel before until few months ago (by following your guide), and probably have overlooked the HPET when compiling the previous kernels. Somehow when compiling the 2.6.32.3, the HPET option was right in front of my eyes (it must be The Force), so I thought it was new (Well, Columbus didn't actually discover America).

Thanks for correcting me.

[Image: nowyouknow.jpg]
A less annoying signature... (link)
Reply
#15
1) I use 1 single 500GB hdd.

2) Game servers, web page and MySQL + gcc(c++ compiler)

3) Re-installaling with ext3

My motherboard has HTEP I think :p

Re installed with EXT3. BehaartesEtwas last time you guided me from start till end and then it worked. Can we do that agian? Toungue (IRC!)
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)